RE: [fw-general] Setting large memory_limit in php.in cause zend framework 1.10.1 to fatal
Yea theres 16G in that particular machine. It was only while getting a one of job up and running that the memory_limit was set so high. It just appeared odd to me that all of our other apps worked but the ZF one wouldn't run. This is no issue for our site as its raw we need to push the limit so high and normally do in the script if its really nesscary. Cheers, Si. > -Original Message- > From: till [mailto:klimp...@gmail.com] > Sent: 17 February 2010 15:40 > To: Ralph Schindler > Cc: Simon Griffiths; fw-general@lists.zend.com > Subject: Re: [fw-general] Setting large memory_limit in php.in cause > zend framework 1.10.1 to fatal > > Adding to Ralph's reply: > > You may want to trace it using valgrind or truss, etc.. Might lead to > another issue. > > Also, I'm assuming you really have 4+ GB? > > Till > > On Wed, Feb 17, 2010 at 4:18 PM, Ralph Schindler > wrote: > > Fatal errors emminating from PHP itself are PHP issues. I am > actually not > > sure there is an issue here as memory_limit should be set to > something > > sensible (like say max a couple of hundred megs for really intensive > > scripts). > > > > Also, I notice you are running the Suhosin patch. While that is > solid code, > > you should not that it hooks into various places in the PHP engine > itself > > and might cause random undocumented behaviors in PHP in strange > situations. > > Either way, you might want to check with them as well. > > > > -ralph > > > > Simon Griffiths wrote: > >> > >> Hello, > >> > >> > >> Setting a large (4096M in my case) memory_limit in php.ini cause > Zend > >> Framework to fatal. This occurred both on existing code and using > zend_tool > >> (zf.sh). > >> > >> > >> /usr/local/www/zf/ZendFramework-1.10.1/bin]# ./zf.sh > >> > >> PHP Fatal error: Allowed memory size of 262144 bytes exhausted > (tried to > >> allocate 7680 bytes) in > >> /usr/local/www/zf/ZendFramework- > 1.10.1/library/Zend/Tool/Framework/Client/Console.php > >> on line 93 > >> > >> > >> Fatal error: Allowed memory size of 262144 bytes exhausted (tried to > >> allocate 7680 bytes) in > >> /usr/local/www/zf/ZendFramework- > 1.10.1/library/Zend/Tool/Framework/Client/Console.php > >> on line 93 > >> > >> > >> Resetting the memory_limit to a smaller value, 512M in my case, > corrected > >> this issue. > >> > >> > >> Machine is: > >> > >> FreeBSD acetone 8.0-STABLE FreeBSD 8.0-STABLE #0: Sat Dec 19 > 01:58:00 GMT > >> 2009 amd64 > >> > >> > >> PHP Version: > >> > >> PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Dec 19 2009 > 14:29:30) > >> > >> Copyright (c) 1997-2009 The PHP Group > >> > >> Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies > >> > >> > >> I cannot be sure this necessarily a zf issue but I have only > encountered > >> it when using zf, maybe it something else entirely like php config. > >> > >> > >> Hope this helps and if you need any more information please let me > know. > >> > >> > >> Regards, > >> > >> > >> > >> Simon Griffiths > >> > >> PS. I attempted to create an issue ticket on > >> http://framework.zend.com/issues/ but it insisted I was not logged > in. > >> > >
[fw-general] Setting large memory_limit in php.in cause zend framework 1.10.1 to fatal
Hello, Setting a large (4096M in my case) memory_limit in php.ini cause Zend Framework to fatal. This occurred both on existing code and using zend_tool (zf.sh). /usr/local/www/zf/ZendFramework-1.10.1/bin]# ./zf.sh PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 7680 bytes) in /usr/local/www/zf/ZendFramework-1.10.1/library/Zend/Tool/Framework/Client/Co nsole.php on line 93 Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 7680 bytes) in /usr/local/www/zf/ZendFramework-1.10.1/library/Zend/Tool/Framework/Client/Co nsole.php on line 93 Resetting the memory_limit to a smaller value, 512M in my case, corrected this issue. Machine is: FreeBSD acetone 8.0-STABLE FreeBSD 8.0-STABLE #0: Sat Dec 19 01:58:00 GMT 2009 amd64 PHP Version: PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Dec 19 2009 14:29:30) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies I cannot be sure this necessarily a zf issue but I have only encountered it when using zf, maybe it something else entirely like php config. Hope this helps and if you need any more information please let me know. Regards, Simon Griffiths PS. I attempted to create an issue ticket on http://framework.zend.com/issues/ but it insisted I was not logged in.
RE: [fw-general] Dojo, and Zend Studio
From: Robert Gormley [mailto:rgorm...@mgcare.com] Sent: 05 March 2009 23:02 To: fw-general@lists.zend.com Subject: [fw-general] Dojo, and Zend Studio Hi all, I realise that this isn't really ZF's "fault", and a bit more related to Zend Studio for Eclipse, but I'm surely not the only person having this issue. Creating a new skeleton ZF project from within ZSE, and including Dojo support "helpfully" gives me a clean slate project with over 3,000 warnings, making that section rather useless. I don't want to turn off warnings, and nor do I want to "fix" Dojo. Any suggestions on what I could do? Robert Hi Robert, Although not a *fix* what I did was to create the project in a trial version of ZSE and then moved back to Zend Studio 5.5! Sucks huh! Si
RE: [fw-general] lastInsertId()
> -Original Message- > From: Bob O [mailto:b...@electricgraffitti.com] > Sent: 27 February 2009 20:31 > To: fw-general@lists.zend.com > Subject: Re: [fw-general] lastInsertId() > > > FYI..all 3 tables have auto_incrementing id fields that are PK's > and when all parts pertaining my problem > > i am able to submit all of the other information correctly.. > > > > Bob O wrote: > > > > Im having a heck of a time with this one..I have searched high and low, > > and what has seemed to be a remedy isnt working for me.. > > > > any help would be great > > > > I have 1 form and 3 tables that i submit to with 1 post. > > These tables are joined by ids > > [snip] > - > Bob Hanson > Web Developer > SLC, UT To follow up on Jason's post here is some code I use here to insert into a master table (contact), do a lookup on a lookup table (contact_category) and then insert to the relation table (FK, contact_area) HTH, // Insert the main contact information into the database; $contact = new CustomerContact(); $data = array( 'co_title' => $form->getValue('title'), 'co_firstname' => $form->getValue('firstname'), 'co_lastname' => $form->getValue('lastname'), 'co_companyname'=> $form->getValue('companyname'), 'co_email' => $form->getValue('email'), 'co_querytext' => $form->getValue('querytext') ); $contactid = $contact->insert($data); // Insert the query area into contact_area if ($form->getValue('queryarea')) { // Match the query area to contct_categories and insert. // loop through the query area array and find update foreach ($form->getValue('queryarea') as $key) { // Create a zend_db_table instance of contact category $contactCategory = new ContactCategory(); // find the id of the key passed from the form $catid = $contactCategory->fetchRow($contactCategory->select()->from($contactCategory ,'ct_id') ->where('ct_name = ?',$key)); // create an instance of our contact area db $contactArea = new ContactArea(); // fill out the data $contactAreaData = array( 'ca_co_id' => $contactid, 'ca_ct_id' => $catid->ct_id ); // commit the data to the db $contactArea->insert($contactAreaData); } }
RE: [fw-general] Re: How to dispatch a 404 error
> -Original Message- > From: news [mailto:n...@ger.gmane.org] On Behalf Of Colin Guthrie > Sent: 27 February 2009 14:56 > To: fw-general@lists.zend.com > Subject: [fw-general] Re: How to dispatch a 404 error > > 'Twas brillig, and gllop at 27/02/09 10:07 did gyre and gimble: > > I'm trying to thow a Zend_Controller_Action_Exception to dispatch a 404 > page > > error. The ErrorController and the Plugin_Handler instance are already > > implemented but I don't know how can i exactly dispatch the exception. I > > supose it will be something like: > > throw new Zend_Controller_Action_Exception('Error exception'); > > > > But this don't render my corresponent 404 page. I get only "Error > exception" > > message. > > > > Any help would be apreciated. Thx! > > Not sure if it's the right approach but I have a nonfound action in my > default module's error controller. > > I _forward to this from indexAction if I don't handle the error in some > other way. > > In some cases I also specifically forward to this action. > > >public function notfoundAction() >{ > $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found'); > $this->getResponse()->appendBody('Not found'); >} > > There are probably more elegant ways to get the same result tho'. > > Col > > -- > > Colin Guthrie > gmane(at)colin.guthr.ie > http://colin.guthr.ie/ > > Day Job: >Tribalogic Limited [http://www.tribalogic.net/] > Open Source: >Mandriva Linux Contributor [http://www.mandriva.com/] >PulseAudio Hacker [http://www.pulseaudio.org/] >Trac Hacker [http://trac.edgewall.org/] I not so sure this will help you but here is my errorAction from ErrorController public function errorAction() { $errors = $this->_getParam('error_handler'); switch ($errors->type) { case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: $this->view->message = "No controller is available to service your request."; $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found'); break; case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION: // 404 error -- controller or action not found $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found'); $this->view->title = 'HTTP/1.1 404 Not Found'; $this->view->message = "Sorry the page you requested has not been found."; break; default: // application error; display error page, but don't change // status code $this->view->title = 'Application Error'; $this->view->message = "An unexpected error has occured, please copy and paste the message below and mail to mailto:webmas...@tenenbaum.co.uk\";>webmas...@tenenbaum.co.uk"; $this->view->message .= "".$errors->exception.""; break; } } You could replace the default action etc... Hope this helps, Simon Griffiths