Search Results

Search found 5683 results on 228 pages for 'zend pdf'.

Page 44/228 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Best way to structure AJAX for a Zend Framework application

    - by John Nall
    Sorry, but there's a lot of outdated and just plain bad information for Zend Framework, since it has changed so much over the years and is so flexible. I thought of having an AJAX module service layer, with controllers and actions that interact with my model. Easy, but not very extensible and would violate DRY. If I change the logistics of some process I'll have to edit the AJAX controllers and the normal controllers. So ideally I would load the exact same actions for both javascript and non-javascript users. I have thought about maybe checking for $_POST['ajax'], if it is set I would load a different (json'y) view for the data. Was wondering how/a good way to do this (front controller plugin I imagine?) or if someone can point me to an UP TO DATE tutorial that describes a really good way for building a larger ajax application. thx

    Read the article

  • Tracking DB changes with Zend Framework?

    - by Chad Johnson
    I am trying to decide between the Zend Framework and Ruby On Rails for my web application. If I go with ZF, I need the following: A way to incrementally track changes to my database, as with RoR's migration feature (001_something.sql, 002_something_else.sql). A place to put SQL for the next release of my software. At work in our custom PHP solution, we just have release.sql, which gets run, archived, and blanked out upon release. ZF has Zend_Db_Schema_Manager, which does the same thing, but I'm not interested as its not official, complete, or maintained. Is there an official mechanism that ZF provides for doing something similar to what I described? EDIT I ended up going with Rails. Nothing compares.

    Read the article

  • Zend Framework on a Shared Host

    - by manyxcxi
    I am trying to push my first ZF project to my shared hosting provider. I have done a lot of testing on my home server and everything is working great. My issue is that I do not know how to set up my .htaccess files on the shared hosting provider to make it work correctly. The ZF documentation says to configure my Apache config VirtualServer DocumentRoot to /whatever/path/project-folder/public, but I don't have that kind of access. How do I get around this? I have seen http://stackoverflow.com/questions/1115547/zend-framework-on-shared-hosting but none of those solutions have worked for me. My application path looks like this / - .htaccess - /application ... - /public -- .htaccess -- index.php -- ... ... My .htaccess files look like: /.htaccess RewriteEngine On RewriteRule !\.(js|gif|jpg|png|css|txt)$ public/index.php [L] RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(.*)$ public/$1 [L] /public/.htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L]

    Read the article

  • htpasswd, secure specific files in zend framework

    - by AKFourSeven
    Hi I have been bashing my head against the wall with this riddle and cannot find the way to solve this. I would like to secure couple of files to restrict access to certain pages but my attempts so far are unsuccessful. I do not want to use Zend Auth as it is a very small web site doing simple stuff. Here is a sample of what I have done: AuthUserFile /path/to/my/.htpasswd AuthName "Admin Restriction" AuthType Basic <Files file.phtml> require valid-user </Files> Is there any way to achieve this ?

    Read the article

  • how to integrate Zend Framework MVC with existing site

    - by Joel
    Hi guys, So I'm slowly tackling OO and Zend Framework and their MVC process in particular. I have an existing website and web-based calendar application that was designed by me, but coded by a different person and done procedurally. I understand that it will be very difficult for my application to ever be completely OO without a full re-write, and I'm fine with that. I have a lot of updates and modifications I want to do in the future, so I'm wanting to start replacing some of the basic components (login, authentication. etc) now, and continue to learn as I go. Again, I'm really a newbie at programming and OO. What I'm wondering is if I'm wanting to incorporate the Framework, then would I just first drop my whole site into the /public folder of the Framework and then start pulling functionality out from there?

    Read the article

  • Zend Framework - Not Connecting to IMAP mail server - instead dumps empty php file

    - by Ali
    Hi guys I'm trying to connect to an imap mail server using zend frameworks Zend_Mail_Storage_Imap function. Its working with some accounts but with most accounts it just dies out. I'm connecting using: $mail = new Zend_Mail_Storage_Imap(array('host' =>$current_dept->incoming_server, 'ssl' =>$current_dept->ssl, 'port'=>$current_dept->incoming_port, 'folder'=>$mbox_name, 'user' =>$current_dept->email, 'password' =>$current_dept->email_psd)); WIth some email accounts teh code doesn't go past this statement - and instead I'm prompted to 'download' the php file being run. Whats happening here - the mail server details are correct.

    Read the article

  • .NET, ASHX, "Server cannot append header after HTTP headers have been sent" after sending PDF Streem

    - by Inturbidus
    I visit my ASHX file, and it outputs a PDF perfectly. If I visit the very same ASHX with a different query string (I append DateTime.Now.Ticks to the end each visit), and I get this error: Server cannot append hader after HTTP headers have been sent. My code is below: copy.CloseStream = false; document.Close(); var r = context.Response; r.ExpiresAbsolute = DateTime.Now; r.BufferOutput = true; r.ContentType = "application/pdf"; r.AppendHeader("Content-Type", r.ContentType); r.AppendHeader("Content-disposition", "inline; filename=" + context.Server.UrlEncode(formType.File_Name)); r.BinaryWrite(copyStream.ToArray()); r.StatusCode = 200; r.End(); originalReader.Close(); copy.CloseStream = true; copy.Close(); There is no other place in this code that headers are sent. You are seeing the entire interaction with the Response object. I've tried to use r.Flush(); and r.End(); I've also tried not sending them if they are already there, but this causes other issues.

    Read the article

  • Zend - Deny access to CSS, JS, Image files

    - by Vincent
    All, I have the following Zend application structure: helloworld - application - configs - controllers - models - layouts - include - library - public - design -- css -- site.css -- js -- global.js -- images -- siteheader.gif -- sitefooter.gif - .htaccess - index.php My .htaccess file in public folder looks like this: Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] My document root points to the "public" folder. Currently, if the user visits a directory level URL, (Ex: http://localhost/design or localhost/css) , my .htaccess file above make sure to show him the "Access Forbidden" page. But if he visits the file level URL, (Ex: http://localhost/design/css/site.css), it shows him the CSS file or the js file or PHP file.. How can I make sure to lock file level access for the above file types, if accessed directly from the URL? Since my application is JS intensive, I want to protect it from users looking at it. Thanks

    Read the article

  • Zend Framework multiple databases

    - by Uffo
    I'm currently using only one database with Zend Framework, but now I have to add ONE MORE. I'm using this code right now: public static function setupDatabase() { $config = self::$registry->configuration; $db = Zend_Db::factory($config->db->adapter, $config->db->toArray()); $db->query("SET NAMES 'utf8'"); self::$registry->database = $db; Zend_Db_Table::setDefaultAdapter($db); } What code do I need to write in order to use ONE MORE database; and how I will reference it, when I need to make some queries or so.. Best Regards!

    Read the article

  • Can't detect MIME type when using Zend Zend_File_Transfer_Adapter_Http !

    - by mrblue
    Hi all, I am writing a small script to upload and detect MIME type, using Zend Framework. For the design purpose, I can't use Zend_Form but normal instead. And I simply apply from the manual : $adapter = new Zend_File_Transfer_Adapter_Http(); $files = $adapter-getFileInfo(); $mime = $files-getMimeType(); But the system inform that the funcion getMimeType() does not existed. Then, I tried: $adapter = new Zend_File_Transfer(); $files = $adapter-getFileInfo(); $mime = $files-getMimeType(); This time, it didn't work either. So, how can I get the MIME type ? Thank you so much for your help

    Read the article

  • Validators are not working anymore in Zend Framework?

    - by Pavel Dubinin
    Eariler I happily used the following code for creating form elements (inside Zend_Form descendant): //Set for options $this->setOptions(array( 'elements' => array( 'title' => array( 'type' => 'text', 'options' => array( 'required' => true, 'label' => 'Title', 'filters' => array('StringTrim'), 'validators' => array( array('StringLength', false, array('minLength'=>1, 'maxLength'=>50)), ), ) ) )); But now I've noticed that validators are not working.. I suspect this might be due to zend updates.. Does anyone face this problem?

    Read the article

  • PDF (VisPDF component) Problem with DecimalSeparator in Delphi/C++Builder2009

    - by Katsumi
    Hello. I use VisPDF component Delphi/C++Builder 2009 and show text with ShowMessage(FloatToStrF(1.23, ffFixed, 6, 2)); // Output: 1,23 (right!) UnicodeString Text = "Hello world!"; VPDF->CurrentPage->UnicodeTextOutStr( x, y, 0, Text); ShowMessage(FloatToStrF(1.23, ffFixed, 6, 2)); // Output: 1.23 (false!) afer UnicodeTextOutStr() the DecimalSeparator is changed. I have look in VisPDF source and found, that: Abscissa := Angle * Pi / 180; X := XProjection(X) + StrHeight * sin(Abscissa); Y := (YProjection(Y)) - StrHeight * cos(Abscissa); MtxA := cos(Abscissa); MtxB := sin(Abscissa); SetTextMatrix(MtxA, MtxB, -MtxB, MtxA, X, Y); with SetTextMatrix() show up the bug. comment out this line, DecimalSeparator is right, but no text in my pdf. procedure TVPDFPage.SetTextMatrix(a, b, c, d, x, y: Single); var S: AnsiString; begin S := _CutFloat(a) + ' ' + _CutFloat(b) + ' ' + _CutFloat(c) + ' ' + _CutFloat(d) + ' ' + _CutFloat(x) + ' ' + _CutFloat(y) + ' Tm'; SaveToPageStream(S); end; procedure TVPDFPage.SaveToPageStream(ValStr: AnsiString); begin PageContent.Add(string(ValStr)); // PageContent: TStringList; end; I don't understand this function. Can somebody help? VisPDF does not use any DLL or other software to create PDF files. Using VisPDF is very easy and have good examples.

    Read the article

  • Can't call method in model table class using Doctrine with Zend Framework

    - by Jeremy Hicks
    I'm using Doctrine with Zend Framework. For my model, I'm using a base class, the regular class (which extends the base class), and a table class. In my table class, I've created a method which does a query for records with a specific value for one of the fields in my model. When I try and call this method from my controller, I get an error message saying, "Message: Unknown method Doctrine_Table::getCreditPurchases". Is there something else I need to do to call functions in my table class? Here is my code: class Model_CreditTable extends Doctrine_Table { /** * Returns an instance of this class. * * @return object Model_CreditTable */ public static function getInstance() { return Doctrine_Core::getTable('Model_Credit'); } public function getCreditPurchases($id) { $q = $this->createQuery('c') ->where('c.buyer_id = ?', $id); return $q->fetchArray(); } } // And then in my controller method I have... $this->view->credits = Doctrine_Core::getTable('Model_Credit')->getCreditPurchases($ns->id);

    Read the article

  • Best method of Zend Framework caching

    - by iamthejeff
    I have a blog built using Zend Framework, which I realize might be a bit overkill for a blog alone, but I am planning on adding other features in the future. Nevertheless, I've noticed pages could be a little speedier. I've done a basic caching method that basically captures everything in index.php (Core frontend and File backend), which works great, but unfortunately it also prevents dynamic page contents from updating (messages like "this was posted 5 minutes ago", etc) until the cache period expires. So my question is what would be the best method of caching to improve performance? I am doing fairly basic queries which are mostly simple selects, not many joins or anything fancy (using Zend_Db_Table), and even on a small database page loads are a little sluggish. Is it worth it to cache queries or should I focus my time elsewhere?

    Read the article

  • Zend Server CE Apache mod_rewrite REQUEST_FILENAME SCRIPT_FILENAME Problem

    - by liumiuyong
    Hi,there! I use this .htaccess file in a project: RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] It works well in Apache 2.2 Recently I started to use Zend Server CE , the ReWrite Rule didn't work ! And this works: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] This is what Apache's document say: The variables SCRIPT_FILENAME and REQUEST_FILENAME contain the same value - the value of the filename field of the internal request_rec structure of the Apache server. The first name is the commonly known CGI variable name while the second is the appropriate counterpart of REQUEST_URI (which contains the value of the uri field of request_rec). Anyone can figure out why? Appreciate!

    Read the article

  • Model class is not found in zend framework project (quickstart) ,please help

    - by Dumindu
    The things I did is zf create project demo1 in command prompt add the lines to application.ini appnamespace = "Application" resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts" add a layout with header and footer using partial() (They are perfectly worked) create Data.php in models directory and add this simple class <?php class Application_Model_Data{ }//Application for appnamespace then I tried to load this class(by creating instance)from index controller index action $data = new Application_Model_Data(); but when I test it even in this level it gives an error Fatal error: Class 'Application_Model_Data' not found in C:\Zend\...\IndexController.php Question Do I want to add a autoloader to load models in the application( I'm not used modules) if not what was I missed to add please help I'm stuck in the beginning,Thank you

    Read the article

  • Zend router problem

    - by Fluffy
    Hi, folks. I have some problems with zend routes I have shops controller. It has 3 actions(for now): index - lists all of shops using paginator(so I have /shops/?page=2) show - shows concrete shop (show/Apple+store) search - shows search form So now I need to make routing for that. I have followin routes 'shop', new Zend_Controller_Router_Route ('/shops/:title',array('controller' = 'shops', 'action' = 'show'),array('title' = '/^(?!search$).+$/')) 'search_shops',new Zend_Controller_Router_Route_Static ('/shop/search',array('controller' = 'shops', 'action' = 'show')) but when i try to go /shops/Apple+store it says, that there is no Apple store action. If I ommit regexp part on shop route, I can't go to search. What am I doing wrong?

    Read the article

  • Zend Framework Autoloading in 3 modules

    - by haohan
    I am new to ZF and I am writing in Zend Framework 1.10 . Here is my application directory structure. APPLICATION_PATH` +-configs +-layouts +-modules +-admin ¦ +-controllers ¦ +-forms ¦ +-models ¦ +-views ¦ +-filters ¦ +-helpers ¦ +-scripts ¦ +-authentication ¦ +-cars ¦ +-index +-default +-controllers +-forms ¦ +-admin +-models ¦ +-DbTable +-plugins +-views +-helpers +-scripts +-about +-contact +-error +-index +-insurance +-used-cars I have 3 bootstrap.php files in APPLICATION_PATH, /default/ and /admin, i used AutoLoader to load models and forms $modelLoader = new Zend_Application_Module_Autoloader(array( 'namespace' => '', 'basePath' => APPLICATION_PATH . '/modules/default')); The code above will load all models and forms automatically in modules/default, and now, I have a problem to load forms and models in /modules/admin, Any solutions to solve this problem? How should I name the class name in /modules/admin Thanks.

    Read the article

  • Zend Framework problem with adding CSS files

    - by priktop
    Hi, I have a small problem when loading CSS files with the Zend Framework. This is my code: <?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/reset.css'); ?> <?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/main.css'); ?> When i open the page in my browser, it puts the main before the reset. This way i get my page unstyled because it gets reset by the reset.css. Any suggestions? Thanks.

    Read the article

  • Major inconsistencies in Zend Framework

    - by John Nall
    Okay first of all let me just say Zend Framework is the greatest tool I have ever used in 30+ years of programming (well, for web development, Qt wins the desktop market). However, through my use I have noticed some glaring and annoying inconsistencies. For instance, Zend_Form_Element's have a setAttrib() method. Now why the hell is this the only method in that API which is abbrev.? Why then am I using setRequired() instead of setReq()? I have more examples, I am extremely nerd raged about this. It is completely ruining what could have been God's gift to web development. FOR FUTURE REFERENCE NEVER ABBREV. THINGS WHEN MAKING AN API. also always filter data before storing it i m o Who do we talk to about this, where something will actually get done about it?

    Read the article

  • Zend Namespace - Check if Session Exists

    - by Vincent
    All, I am using Zend Framework and Zend_Session to do global session management for my application. I plan to clear all sessions on logout and hence am using the following code: if($this->sessionExists()) { $this->destroy(); } But it seems like it's not doing a good job.. I am getting an error: PHP Warning: session_destroy() [<a href='function.session-destroy'> function.session-destroy</a>]: Trying to destroy uninitialized session How can I get rid of this error? Is there an alternative to sessionExists()?

    Read the article

  • Zend and Jquery (Ajax Post)

    - by Zend_Newbie_Dev
    I'm using zend framework, i would like to get POST data using Jquery ajax post on a to save without refreshing the page. //submit.js $(function() { $('#buttonSaveDetails').click(function (){ var details = $('textarea#details').val(); var id = $('#task_id').val(); $.ajax({ type: 'POST', url: 'http://localhost/myproject/public/module/save', async: false, data: 'id=' + id + '&details=' + details, success: function(responseText) { //alert(responseText) console.log(responseText); } }); }); }); On my controller, I just don't know how to retrieve the POST data from ajax. public function saveAction() { $data = $this->_request->getPost(); echo $id = $data['id']; echo $details = $data['details']; //this wont work; } Thanks in advance.

    Read the article

  • Zend Framework additional Get params with NGINX

    - by Johni
    I configured my NGINX for Zend in the following way (PHP 5.3 with fpm): server { root /home/page/public/; index index.php index.html index.htm; server_name localhost; location / { try_files $uri $uri/ /index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } } Now i want to process additional get params like: http://web.site/index?par=1 WIth my local dev system (Apache) it works fine but not under NGINX which did'T deliver the get params. Anny suggestions? Edit: Now i use the following config which seems to work but i'm not happy with it since everybody suggests "use try_files whenever possible". location / { if (!-e $request_filename) { rewrite /(.*)$ /index.php?q=$1 last; break; } }

    Read the article

  • Add Page Parameter in Zend Framework Doesn't Work

    - by deerawan
    Hello guys, I've been trying to figure this out these days. I got a problem when I want to add 'page' parameter in my URL for my pagination. This is my router -addRoute('budi',new Zend_Controller_Router_Route(':lang/budi',array('controller' = 'budi', 'action' = 'index', 'page' = 1), array('lang'=$s, 'page' = '\d+'))) -addRoute('budi1',new Zend_Controller_Router_Route(':lang/budi/page/:page',array('controller' = 'budi', 'action' = 'index', 'page' = 1), array('lang'=$s, 'page' = '\d+'))) Then I access my URL http://localhost/learningsystem/en/budi but when I hover on my pagination links, the page parameter doesn't appear. The URL is still http://localhost/learningsystem/en/budi but if I enter same URL with index in the end like this one http://localhost/learningsystem/en/budi/index or like this one http://localhost/learningsystem/en/budi/page/1 the page parameter appears perfectly when I click the page 2 link http://localhost/learningsystem/en/budi/index/page/2 Actually, I don't want include 'index' or 'page' at first in my URL. Anyway, I use default pagination.phtml template from Zend. Anyone please help me to solve this problem? Thank you very much

    Read the article

  • zend like mysql problem

    - by pradeep
    hi, I am trying to use like in zend switch($filter2) { case 'name': switch($filter1) { case 'start_with': $search = "\"pd_name like ?\", '$patient_search_name%'"; break; case 'contains': $search = "'pd_name like ?', '%$patient_search_name%'"; break; case 'exact_match': $search = "'pd_name = ?', $patient_search_name"; break; } break; case 'phone': switch($filter1) { case 'start_with': $search = "'pd_phone like ?', '$patient_search_name%'"; break; case 'contains': $search = "'pd_phone like ?', '%$patient_search_name%'"; break; case 'exact_match': $search = "'pd_phone = ?', $patient_search_name"; break; } break; } $select = $this->getDbTable()->select() ->from("patient_data", array('*')) ->where("$search"); but when i see the query log its like SELECT `patient_data`.* FROM `patient_data` WHERE ("pd_name like ?", 'bhas%') where as the ? should have been replaced by the value ....how to solve this??

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >