RE: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748361.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
Hi Ashish I don't think your SQL problems can be attributed to the Apache configuration - can you compare the final SQL query from the 'old' server with the new? Is the 'fetchCount' called from within a model that extends Zend_Db_Table? Have you also run the query from within the database on the same machine to ensure there's nothing incorrect about the new setup in PHP? One sure fire way would be to install PHPUnit on your newer server and run the unit tests to see if it's a ZF problem or perhaps more related to the way your code extends it. Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748361.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com
Re: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
Thanks Simon, Here I would like add one more thing which I have missed in my previous posts (and I apologize for that) we had also upgraded our ZF to ZF-1.03 to ZF-1.5.2 I think this is causing the problem but I don't know why? Do you have any idea? As a temporary fix, we have re-install ZF-1.03 on our server and the site is now working again. Do you have any idea as why it was not working on ZF 1.5.2? Why it is showing errors in running queries also in actions? Thank you very mush for your time. Ashish Simon Mundy wrote: Hi Ashish I don't think your SQL problems can be attributed to the Apache configuration - can you compare the final SQL query from the 'old' server with the new? Is the 'fetchCount' called from within a model that extends Zend_Db_Table? Have you also run the query from within the database on the same machine to ensure there's nothing incorrect about the new setup in PHP? One sure fire way would be to install PHPUnit on your newer server and run the unit tests to see if it's a ZF problem or perhaps more related to the way your code extends it. Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748361.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748777.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
Zend_Db_Table_Abstract had major changes in the 1.5 release. On Mon, Jun 9, 2008 at 11:43 PM, ashish.sharma [EMAIL PROTECTED] wrote: Thanks Simon, Here I would like add one more thing which I have missed in my previous posts (and I apologize for that) we had also upgraded our ZF to ZF-1.03 to ZF-1.5.2 I think this is causing the problem but I don't know why? Do you have any idea? As a temporary fix, we have re-install ZF-1.03 on our server and the site is now working again. Do you have any idea as why it was not working on ZF 1.5.2? Why it is showing errors in running queries also in actions? Thank you very mush for your time. Ashish Simon Mundy wrote: Hi Ashish I don't think your SQL problems can be attributed to the Apache configuration - can you compare the final SQL query from the 'old' server with the new? Is the 'fetchCount' called from within a model that extends Zend_Db_Table? Have you also run the query from within the database on the same machine to ensure there's nothing incorrect about the new setup in PHP? One sure fire way would be to install PHPUnit on your newer server and run the unit tests to see if it's a ZF problem or perhaps more related to the way your code extends it. Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748361.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748777.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Jordan Ryan Moore
Re: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
Thanks Jordan. Can you refer some URL from where I can checkout the changes done in ZF-1.5.2 as you have mentioned that Zend_Db_Table_Abstract had major changes in the 1.5 release. Also, could you please let me know the correct procedure to upgrade the system. This is what I am not getting. I agree that the SQL issue can be related to the changes in Zend_Db_Table_Abstract class BUT why it is also showing errors in ACTIONS .. any idea? Thanks Ashish Jordan Moore wrote: Also... I'd highly recommend against upgrading so many components at once. It's almost always a bad idea. On Mon, Jun 9, 2008 at 11:43 PM, ashish.sharma [EMAIL PROTECTED] wrote: Thanks Simon, Here I would like add one more thing which I have missed in my previous posts (and I apologize for that) we had also upgraded our ZF to ZF-1.03 to ZF-1.5.2 I think this is causing the problem but I don't know why? Do you have any idea? As a temporary fix, we have re-install ZF-1.03 on our server and the site is now working again. Do you have any idea as why it was not working on ZF 1.5.2? Why it is showing errors in running queries also in actions? Thank you very mush for your time. Ashish Simon Mundy wrote: Hi Ashish I don't think your SQL problems can be attributed to the Apache configuration - can you compare the final SQL query from the 'old' server with the new? Is the 'fetchCount' called from within a model that extends Zend_Db_Table? Have you also run the query from within the database on the same machine to ensure there's nothing incorrect about the new setup in PHP? One sure fire way would be to install PHPUnit on your newer server and run the unit tests to see if it's a ZF problem or perhaps more related to the way your code extends it. Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748361.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6---URGENT-tp17748031p17748777.html Sent from the
Re: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
This will go some way to explaining your actions problem... http://framework.zend.com/manual/en/zend.controller.migration.html Besides the usual array of minor fixes and enhancements, the big change to Zend_Db_Table was the way the WHERE, ORDER and LIMIT clauses were added via the API. The new Zend_Db_Table_Select component is now the preferred way to assemble queries for all fetch/find methods. However, you didn't mention how the query you're specifically having trouble with was created, nor the final SQL, nor whether your database still supported the same call. Can you confirm these - it makes it harder to provide specific advice without knowing what you're trying to achieve or how you've approached the issue. Thanks Jordan. Can you refer some URL from where I can checkout the changes done in ZF-1.5.2 as you have mentioned that Zend_Db_Table_Abstract had major changes in the 1.5 release. Also, could you please let me know the correct procedure to upgrade the system. This is what I am not getting. I agree that the SQL issue can be related to the changes in Zend_Db_Table_Abstract class BUT why it is also showing errors in ACTIONS .. any idea? Thanks Ashish Jordan Moore wrote: Also... I'd highly recommend against upgrading so many components at once. It's almost always a bad idea. On Mon, Jun 9, 2008 at 11:43 PM, ashish.sharma [EMAIL PROTECTED] wrote: Thanks Simon, Here I would like add one more thing which I have missed in my previous posts (and I apologize for that) we had also upgraded our ZF to ZF-1.03 to ZF-1.5.2 I think this is causing the problem but I don't know why? Do you have any idea? As a temporary fix, we have re-install ZF-1.03 on our server and the site is now working again. Do you have any idea as why it was not working on ZF 1.5.2? Why it is showing errors in running queries also in actions? Thank you very mush for your time. Ashish Simon Mundy wrote: Hi Ashish I don't think your SQL problems can be attributed to the Apache configuration - can you compare the final SQL query from the 'old' server with the new? Is the 'fetchCount' called from within a model that extends Zend_Db_Table? Have you also run the query from within the database on the same machine to ensure there's nothing incorrect about the new setup in PHP? One sure fire way would be to install PHPUnit on your newer server and run the unit tests to see if it's a ZF problem or perhaps more related to the way your code extends it. Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6
RE: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT
If I'm not mistaken there may have also been some changes in 1.5 to the way URLs are interpreted...something about the way camel case URLs are treated...this could be causing your actions errors. -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 5:34 PM To: fw-general@lists.zend.com Subject: Re: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Thanks Jordan. Can you refer some URL from where I can checkout the changes done in ZF-1.5.2 as you have mentioned that Zend_Db_Table_Abstract had major changes in the 1.5 release. Also, could you please let me know the correct procedure to upgrade the system. This is what I am not getting. I agree that the SQL issue can be related to the changes in Zend_Db_Table_Abstract class BUT why it is also showing errors in ACTIONS .. any idea? Thanks Ashish Jordan Moore wrote: Also... I'd highly recommend against upgrading so many components at once. It's almost always a bad idea. On Mon, Jun 9, 2008 at 11:43 PM, ashish.sharma [EMAIL PROTECTED] wrote: Thanks Simon, Here I would like add one more thing which I have missed in my previous posts (and I apologize for that) we had also upgraded our ZF to ZF-1.03 to ZF-1.5.2 I think this is causing the problem but I don't know why? Do you have any idea? As a temporary fix, we have re-install ZF-1.03 on our server and the site is now working again. Do you have any idea as why it was not working on ZF 1.5.2? Why it is showing errors in running queries also in actions? Thank you very mush for your time. Ashish Simon Mundy wrote: Hi Ashish I don't think your SQL problems can be attributed to the Apache configuration - can you compare the final SQL query from the 'old' server with the new? Is the 'fetchCount' called from within a model that extends Zend_Db_Table? Have you also run the query from within the database on the same machine to ensure there's nothing incorrect about the new setup in PHP? One sure fire way would be to install PHPUnit on your newer server and run the unit tests to see if it's a ZF problem or perhaps more related to the way your code extends it. Thanks for your Steven. Could you please explain as what exactly needs to be checked in Apache configuration. As far as the .htaccess file is concerned, it is same as ealier (no changes made in that). The most weird part which I am not getting is why the SQL query is not working now? The function .. public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } . .. is returning all the columns from the table and NOT the count only. Steven Brown-7 wrote: Check that your Apache configuration and .htaccess files are the same/correct -Original Message- From: ashish.sharma [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 June 2008 3:25 PM To: fw-general@lists.zend.com Subject: [fw-general] Zend Framework Stop Working after PHP upgrade to 5.2.6 - URGENT Hello ALL, Yesterday we had upgraded our server to PHP 5.2.6 and after that our applications based on ZF1.0 are NOT WORKING. The sections which were working earlier are not working now and showing errors and warning. For example the count function to get the count of records from a table in showing an error saying Specified column total_records is not in the row here is the function code ... public function fetchCount($cols = '*', $where = null) { $rowset = $this-fetchCols(new Zend_Db_Expr(sprintf('COUNT(%s) AS total_records', $cols)), $where); return (integer) $rowset-current()-total_records; } The above code was working fine on LIVE server (running on LINUX) and it is still working fine on LOCAL systems (running on windows using XAMPP) but NOT on LIVE server now (after the upgrade). Also it starts showing errors like ... Could not found the requested action. Action getstates does not exist and was not trapped in __call() But this same code was working absolutely fine earlier (on LIVE server) and it is still working fine on our LOCAL systems (running on windows using XAMPP) FYI: Along with the PHP version upgrade we have recompiled PHP and Apache AND installed PEAR on our server. Kindly treat this as VERY URGENT and post your suggestion / reply ASAP. Thanks to all of you. Ashish -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748031.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Zend-Framework-Stop-Working-after-PHP-upgrade-to-5.2.6 ---URGENT-tp17748031p17748361.html Sent from the Zend Framework
Re: [fw-general] FirePHP and Zend_Db_Profiler
Christoph, I think that's pretty cool. I see you also created FirePhp_Log_Writer_FirePhp for general logging, I have to try that out. Nice work, maybe this could become a part of the standard ZF library (?) Cheers ChristophDorn wrote: You can now profile your ZF DB queries and send them to the Firebug console. See screenshot attached. Requirements: - Firebug Firefox Plugin from http://www.getfirebug.com/ - FirePHP Firefox Plugin from http://www.firephp.org/ - FirePHP Core Library from http://www.firephp.org/ - FirePHP Zend Framework Library from http://firephp.googlecode.com/svn/trunk/Libraries/ZendFramework/ There is a simple demo app showing all current features in the demo/ folder. Here is some sample code to profile your DB queries: $params = array( 'dbname' = ':memory:', 'profiler' = new FirePhp_Db_Profiler_FirePhp() ); $db = Zend_Db::factory('PDO_SQLITE', $params); $db-getProfiler()-setEnabled(true); $db-getConnection()-exec('CREATE TABLE foo ( id INTEGNER NOT NULL, col1VARCHAR(10) NOT NULL )'); $db-insert('foo', array('id'=1,'col1'='original')); $db-fetchAll('SELECT * FROM foo WHERE id = ?', 1); $db-update('foo', array('col1'='new'), 'id = 1'); $db-fetchAll('SELECT * FROM foo WHERE id = ?', 1); $db-delete('foo', 'id = 1'); $db-getConnection()-exec('DROP TABLE foo'); $db-getProfiler()-flush(); Let me know what you think. If you are interested in enhancing the FirePHP ZF Library why don't you head over to the FirePHP mailing list (http://groups.google.com/group/FirePHP) to discuss your ideas. Christoph -- View this message in context: http://www.nabble.com/FirePHP-and-Zend_Db_Profiler-tp17737652p17751188.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Translate in iso-8859-1
hi all, before i get into the core of my problem, i'd like to point out that switching to UTF-8 is not a solution for my problem, taken that i merely add a roof to a card-house ... the server i work on (some intraweb behind a vpn) sends resposne headers set to iso-8859-1, as is the meta tag. i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. does this ring a bell to anyone? greetings ... pierre == links [1] http://wiki.caillou.ch/_media/code:validatorsstrings.g.xml [2] http://paste2.org/p/37728 for syntax highlighted == code $this-form-setAction('.') -setMethod('post') -setAttrib('enctype', 'multipart/form-data'); # set the translator $translator = new Zend_Translate( 'Zend_Translate_Adapter_Tmx', $translation_file, 'de' ); $this-form-setTranslator($translator); # add some elements # [...] if ($_POST) { $form-isValid($_POST); } $view = new Zend_View(); $view-setEncoding('ISO-8859-1'); echo $form-render($view); -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch PGP.sig Description: This is a digitally signed message part
Re: [fw-general] Re: ZF reference guide or how to use a single component
On 6/10/08, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Robin Skoglund [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 03:57 PM +0200): On Tue, Jun 10, 2008 at 3:37 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Thomas Weidner [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 03:25 PM +0200): I just added a new reference table to the documentation where people can see which ZF component depends on which other ZF component. Where is this? Do you have it built anywhere? So if anyone is in need of just one component like Zend_Log he can just look into this table and see which other components he has also to provide that all works properly. Does this take into consideration optional dependencies? For instance, Zend_Db can be used _without_ Zend_Config, but can also consume it. Isn't that a requirement nonetheless? At some point there is a check like 'if ($config instance of Zend_Config)', which means the class requires Zend_Config to do the check. Actually, in recent PHP versions (I'm not sure when it started exactly; somebody will chime in, I'm sure), the class does not need to be loaded for instanceof checks to succeed, so this is still a soft dependency. http://nl2.php.net/instanceof There are a few pitfalls to be aware of. Before PHP version 5.1.0, * instanceof* would call __autoload()http://nl2.php.net/manual/en/language.oop5.autoload.phpif the class name did not exist. In addition, if the class was not loaded, a fatal error would occur. This can be worked around by using a *dynamic class reference*, or a string variable containing the class name: :) -- Vincent
Re: [fw-general] Zend_Translate in iso-8859-1
Pierre, what's your problem ??? Zend_Translate does not convert any input. When your source is ISO then Zend_Translate will also return ISO. When your source is kyrillic it will return kyrillic and visa versa. Can you explain where your problem with Zend_Translate is ? Have you tried to translate your messages manually ? Does this work ? What's the input, what's the output, what've you expected, what've you tried, which release are u using and and and... Without any further informations your mail is quite useless from the point of a helping hand. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Spring Pierre [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 4:01 PM Subject: [fw-general] Zend_Translate in iso-8859-1 hi all, before i get into the core of my problem, i'd like to point out that switching to UTF-8 is not a solution for my problem, taken that i merely add a roof to a card-house ... the server i work on (some intraweb behind a vpn) sends resposne headers set to iso-8859-1, as is the meta tag. i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. does this ring a bell to anyone? greetings ... pierre == links [1] http://wiki.caillou.ch/_media/code:validatorsstrings.g.xml [2] http://paste2.org/p/37728 for syntax highlighted == code $this-form-setAction('.') -setMethod('post') -setAttrib('enctype', 'multipart/form-data'); # set the translator $translator = new Zend_Translate( 'Zend_Translate_Adapter_Tmx', $translation_file, 'de' ); $this-form-setTranslator($translator); # add some elements # [...] if ($_POST) { $form-isValid($_POST); } $view = new Zend_View(); $view-setEncoding('ISO-8859-1'); echo $form-render($view); -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch
Re: [fw-general] Re: ZF reference guide or how to use a single component
On Tue, Jun 10, 2008 at 4:57 PM, Vincent [EMAIL PROTECTED] wrote: On 6/10/08, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Robin Skoglund [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 03:57 PM +0200): On Tue, Jun 10, 2008 at 3:37 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Thomas Weidner [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 03:25 PM +0200): I just added a new reference table to the documentation where people can see which ZF component depends on which other ZF component. Where is this? Do you have it built anywhere? So if anyone is in need of just one component like Zend_Log he can just look into this table and see which other components he has also to provide that all works properly. Does this take into consideration optional dependencies? For instance, Zend_Db can be used _without_ Zend_Config, but can also consume it. Isn't that a requirement nonetheless? At some point there is a check like 'if ($config instance of Zend_Config)', which means the class requires Zend_Config to do the check. Actually, in recent PHP versions (I'm not sure when it started exactly; somebody will chime in, I'm sure), the class does not need to be loaded for instanceof checks to succeed, so this is still a soft dependency. That is excellent news! Time to remove some require_once statements from my code :) http://nl2.php.net/instanceof There are a few pitfalls to be aware of. Before PHP version 5.1.0, * instanceof* would call __autoload()http://nl2.php.net/manual/en/language.oop5.autoload.phpif the class name did not exist. In addition, if the class was not loaded, a fatal error would occur. This can be worked around by using a *dynamic class reference*, or a string variable containing the class name: :) -- Vincent
Re: [fw-general] Zend_Translate in iso-8859-1
dear wolfgang, i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. Maybe some more description what is going wrong would be nice. What is really wrong ? the encoding seems to be wrong . i'd need to output ISO-8859-1, yet it outputs UTF-8. the xml file i read the translations from is in ISO-8859-1 ... c.f. screenshot [1] greetings ... pierre == [1] http://wiki.caillou.ch/_media/code:zend_translate_encoding_problem.png -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch PGP.sig Description: This is a digitally signed message part
Re: [fw-general] Zend_Feed: Accessing data between the tags
Anybody who has any idea? I hatebumping my own post but im stuck untill i can (hopefully) solve this problem.. ;( ofniedan wrote: Sorry for the strange subject title, I just didnt know how to explain this in normal english ^_^ I use zend_feed to parse rss feeds, and some of them have tags that do not consist of opening/closing pair tags, but just one tag, with inside the info i need, for example: enclosure url=http://www.examble.com/image.jpg; / I googled for an hour now, and still i don't know how to use this tag.. if i iterate through the rss items, and use $item-enclosure, it returns (obviously) a NULL. Anybody who could help me: me love you long time! -- View this message in context: http://www.nabble.com/Zend_Feed%3A-Accessing-data-between-the-%3C%3E-tags-tp17702323p17758214.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Feed: Accessing data between the tags
I'm not 100% sure as I've never used Zend_Feed (yet) but have you tried echo $feed-enclosure['url']; /James Dempster On Tue, Jun 10, 2008 at 4:28 PM, ofniedan [EMAIL PROTECTED] wrote: Anybody who has any idea? I hatebumping my own post but im stuck untill i can (hopefully) solve this problem.. ;( ofniedan wrote: Sorry for the strange subject title, I just didnt know how to explain this in normal english ^_^ I use zend_feed to parse rss feeds, and some of them have tags that do not consist of opening/closing pair tags, but just one tag, with inside the info i need, for example: enclosure url=http://www.examble.com/image.jpg; / I googled for an hour now, and still i don't know how to use this tag.. if i iterate through the rss items, and use $item-enclosure, it returns (obviously) a NULL. Anybody who could help me: me love you long time! -- View this message in context: http://www.nabble.com/Zend_Feed%3A-Accessing-data-between-the-%3C%3E-tags-tp17702323p17758214.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] FirePHP and Zend_Db_Profiler
We will be putting in a proposal some time in July after a first stable release of FirePHP. Christoph Karol Grecki wrote: I think that's pretty cool. I see you also created FirePhp_Log_Writer_FirePhp for general logging, I have to try that out. Nice work, maybe this could become a part of the standard ZF library (?) -- View this message in context: http://www.nabble.com/FirePHP-and-Zend_Db_Profiler-tp17737652p17758500.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Validate_Ip
Hello! I'd like to use Zend_Validate_Ip to check if some input strings are - surprise - valid IP addresses. When I got some problems with strings like 192.168.34 or 192.168.34.234 asdf which evaluated to true, I had a look into apidocs and found: Returns true if and only if $value is a valid IP address Both example strings are not valid IP address, in my oppinion. Internally ip2long is used to do the checking, which accepts a lot more than just valid IP addresses. Is this intended behaviour or is it a bug and may change in the future? Regards -joachim knust
Re: [fw-general] Re: ZF reference guide or how to use a single component
-- Vincent [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 04:57 PM +0200): On 6/10/08, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Robin Skoglund [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 03:57 PM +0200): On Tue, Jun 10, 2008 at 3:37 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Thomas Weidner [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 03:25 PM +0200): I just added a new reference table to the documentation where people can see which ZF component depends on which other ZF component. Where is this? Do you have it built anywhere? So if anyone is in need of just one component like Zend_Log he can just look into this table and see which other components he has also to provide that all works properly. Does this take into consideration optional dependencies? For instance, Zend_Db can be used _without_ Zend_Config, but can also consume it. Isn't that a requirement nonetheless? At some point there is a check like 'if ($config instance of Zend_Config)', which means the class requires Zend_Config to do the check. Actually, in recent PHP versions (I'm not sure when it started exactly; somebody will chime in, I'm sure), the class does not need to be loaded for instanceof checks to succeed, so this is still a soft dependency. http://nl2.php.net/instanceof There are a few pitfalls to be aware of. Before PHP version 5.1.0, instanceof would call __autoload() if the class name did not exist. In addition, if the class was not loaded, a fatal error would occur. This can be worked around by using a dynamic class reference, or a string variable containing the class name: :) Which means ZF is safe in this regard, as our minimum supported version is 5.1.4. :-) -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] Zend_Validate_Ip
Feel free to add a feature request to jira for thi new feature. http://framework.zend.com/issues/browse/ZF Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Joachim Knust [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 5:44 PM Subject: [fw-general] Zend_Validate_Ip Hello! I'd like to use Zend_Validate_Ip to check if some input strings are - surprise - valid IP addresses. When I got some problems with strings like 192.168.34 or 192.168.34.234 asdf which evaluated to true, I had a look into apidocs and found: Returns true if and only if $value is a valid IP address Both example strings are not valid IP address, in my oppinion. Internally ip2long is used to do the checking, which accepts a lot more than just valid IP addresses. Is this intended behaviour or is it a bug and may change in the future? Regards -joachim knust
Re: [fw-general] Zend_Validate_Ip
If invalid ip strings are confirmed as passing validation then this should not be logged as a 'new feature' request, but something handled by whomever is considered the security team these days -- probably with a quick point/patch release and a security advisory. The downstream implications of _any_ failing validator are very serious. I've not looked at this specific validator, but if its allowing extra string data into a valid context, it could lead to exploitable circumstances [sql injection, buffer overrun, etc] Kevin P.S. This issue, again, underscores how the project does not have sufficient policy in place for security issues and patch distribution. Thomas Weidner wrote: Feel free to add a feature request to jira for thi new feature. http://framework.zend.com/issues/browse/ZF Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Joachim Knust [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 5:44 PM Subject: [fw-general] Zend_Validate_Ip Hello! I'd like to use Zend_Validate_Ip to check if some input strings are - surprise - valid IP addresses. When I got some problems with strings like 192.168.34 or 192.168.34.234 asdf which evaluated to true, I had a look into apidocs and found: Returns true if and only if $value is a valid IP address Both example strings are not valid IP address, in my oppinion. Internally ip2long is used to do the checking, which accepts a lot more than just valid IP addresses. Is this intended behaviour or is it a bug and may change in the future? Regards -joachim knust -- Kevin McArthur StormTide Digital Studios Inc. Author of the recently published book, Pro PHP http://www.stormtide.ca smime.p7s Description: S/MIME Cryptographic Signature
Re: [fw-general] Zend_Validate_Ip
I'm not the one to blame as I am not the author of Zend_Validate. But I think it's always better to write a issue regardless of what the type is set new or improvement or bug or problem or whatever, than discussing here how the author meant his implementation. Maybe he made a problem in the api doc, maybe in his implementation. Only the author knows this. Related to your PS, this shows only that the author has not wrote the right unit tests. Because this is true for this particular component does not mean that it's true for the complete framework. But it's always easier to complain about the failures of others. I understand this. :-) Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Kevin McArthur [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 8:39 PM Subject: Re: [fw-general] Zend_Validate_Ip If invalid ip strings are confirmed as passing validation then this should not be logged as a 'new feature' request, but something handled by whomever is considered the security team these days -- probably with a quick point/patch release and a security advisory. The downstream implications of _any_ failing validator are very serious. I've not looked at this specific validator, but if its allowing extra string data into a valid context, it could lead to exploitable circumstances [sql injection, buffer overrun, etc] Kevin P.S. This issue, again, underscores how the project does not have sufficient policy in place for security issues and patch distribution. Thomas Weidner wrote: Feel free to add a feature request to jira for thi new feature. http://framework.zend.com/issues/browse/ZF Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Joachim Knust [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 5:44 PM Subject: [fw-general] Zend_Validate_Ip Hello! I'd like to use Zend_Validate_Ip to check if some input strings are - surprise - valid IP addresses. When I got some problems with strings like 192.168.34 or 192.168.34.234 asdf which evaluated to true, I had a look into apidocs and found: Returns true if and only if $value is a valid IP address Both example strings are not valid IP address, in my oppinion. Internally ip2long is used to do the checking, which accepts a lot more than just valid IP addresses. Is this intended behaviour or is it a bug and may change in the future? Regards -joachim knust -- Kevin McArthur StormTide Digital Studios Inc. Author of the recently published book, Pro PHP http://www.stormtide.ca
[fw-general] winar videos
I would like to send the transcription of some videos Of Zend product presentation, for you could check if the transcription of some parts are correct or not, because my listening is not so good. I will be so thankful if you could help me correcting it If you are able to help, please send me your e.mail for I can send the part of the transcription which needs to be corrected or send me and email to my email address: [EMAIL PROTECTED] Thank you again for your help. Yours sincerely, Benjamin Gonzales -- View this message in context: http://www.nabble.com/winar-videos-tp17743517p17743517.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Translate in iso-8859-1
Maybe Thomas can clarify, since I don't use ISO-8849-1, but in the TMX adapter I noted it's using the XML Parser extension but it doesn't specify an output encoding. As far as I know the default out encoding, independent of the input encoding, is UTF-8. Could this be creating a subtle encoding transfer? In goes ISO-8849-1, out comes slightly corrupted UTF-8 for Pierre's 00F6 umlauts? Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation Member-Subscriber - Original Message From: Spring Pierre [EMAIL PROTECTED] To: Wolfgang Forstmeier [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 4:17:54 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 dear wolfgang, i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. Maybe some more description what is going wrong would be nice. What is really wrong ? the encoding seems to be wrong . i'd need to output ISO-8859-1, yet it outputs UTF-8. the xml file i read the translations from is in ISO-8859-1 ... c.f. screenshot [1] greetings ... pierre == [1] http://wiki.caillou.ch/_media/code:zend_translate_encoding_problem.png -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch
Re: [fw-general] Zend_Translate in iso-8859-1
Maybe Thomas can clarify, since I don't use ISO-8849-1, but in the TMX adapter I noted it's using the XML Parser extension but it doesn't specify an output encoding. As far as I know the default out encoding, independent of the input encoding, is UTF-8. Could this be creating a subtle encoding transfer? In goes ISO-8849-1, out comes slightly corrupted UTF-8 for Pierre's 00F6 umlauts? Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation Member-Subscriber - Original Message From: Spring Pierre [EMAIL PROTECTED] To: Wolfgang Forstmeier [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 4:17:54 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 dear wolfgang, i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. Maybe some more description what is going wrong would be nice. What is really wrong ? the encoding seems to be wrong . i'd need to output ISO-8859-1, yet it outputs UTF-8. the xml file i read the translations from is in ISO-8859-1 ... c.f. screenshot [1] greetings ... pierre == [1] http://wiki.caillou.ch/_media/code:zend_translate_encoding_problem.png -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch
[fw-general] Moved: Framework Security ( Was Re: [fw-general] Zend_Validate_Ip )
No one's blaming anyone for the code, it's what the response is, and will be. Bugs will happen... but will backports? If you search the lists you'll find numerous attempts to get a security policy discussion started, and it never goes anywhere. So lets get somewhere already. How is the project going to respond to a validator that is letting tainted information into applications. Maybe Matthew, as architect, can respond on what Zend is doing to address this and other security disclosures with the framework? Kevin P.S. Far from complaining without action, I've tried to get this subject addressed, proactively, numerous times. I've been critical of the SVN externals distribution, critical of attempts to get a Zend Framework 'package' released for Linux distributions, and I've always brought up security issues with the development team as I've found them. We need some leadership and responsibility from Zend on the security policy. Thomas Weidner wrote: I'm not the one to blame as I am not the author of Zend_Validate. But I think it's always better to write a issue regardless of what the type is set new or improvement or bug or problem or whatever, than discussing here how the author meant his implementation. Maybe he made a problem in the api doc, maybe in his implementation. Only the author knows this. Related to your PS, this shows only that the author has not wrote the right unit tests. Because this is true for this particular component does not mean that it's true for the complete framework. But it's always easier to complain about the failures of others. I understand this. :-) Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Kevin McArthur [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 8:39 PM Subject: Re: [fw-general] Zend_Validate_Ip If invalid ip strings are confirmed as passing validation then this should not be logged as a 'new feature' request, but something handled by whomever is considered the security team these days -- probably with a quick point/patch release and a security advisory. The downstream implications of _any_ failing validator are very serious. I've not looked at this specific validator, but if its allowing extra string data into a valid context, it could lead to exploitable circumstances [sql injection, buffer overrun, etc] Kevin P.S. This issue, again, underscores how the project does not have sufficient policy in place for security issues and patch distribution. Thomas Weidner wrote: Feel free to add a feature request to jira for thi new feature. http://framework.zend.com/issues/browse/ZF Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Joachim Knust [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 5:44 PM Subject: [fw-general] Zend_Validate_Ip Hello! I'd like to use Zend_Validate_Ip to check if some input strings are - surprise - valid IP addresses. When I got some problems with strings like 192.168.34 or 192.168.34.234 asdf which evaluated to true, I had a look into apidocs and found: Returns true if and only if $value is a valid IP address Both example strings are not valid IP address, in my oppinion. Internally ip2long is used to do the checking, which accepts a lot more than just valid IP addresses. Is this intended behaviour or is it a bug and may change in the future? Regards -joachim knust -- Kevin McArthur StormTide Digital Studios Inc. Author of the recently published book, Pro PHP http://www.stormtide.ca -- Kevin McArthur StormTide Digital Studios Inc. Author of the recently published book, Pro PHP http://www.stormtide.ca smime.p7s Description: S/MIME Cryptographic Signature
Re: [fw-general] Moved: Framework Security ( Was Re: [fw-general] Zend_Validate_Ip )
Hi! How is the project going to respond to a validator that is letting tainted information into applications. Maybe Matthew, as architect, can respond on what Zend is doing to address this and other security disclosures with the framework? It looks like a bug. Do you have some patch and maybe test example for it? If not, could you submit a bug to issue tracker? -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED]
Re: [fw-general] Zend_Translate in iso-8859-1
I already answered his question 17:04 CET. Just 2 things: First: Zend_Translate can not handle bilge pumps. I think you meant the ISO-8859-1 standard. Second: I am using the western european standard myself in the testbed and in my applications without any problems. Zend_Translate does not change any source... if your source is UTF you will get UTF. If it's Win1503 you will get Win 1503... Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Pádraic Brady [EMAIL PROTECTED] To: Spring Pierre [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 9:27 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 Maybe Thomas can clarify, since I don't use ISO-8849-1, but in the TMX adapter I noted it's using the XML Parser extension but it doesn't specify an output encoding. As far as I know the default out encoding, independent of the input encoding, is UTF-8. Could this be creating a subtle encoding transfer? In goes ISO-8849-1, out comes slightly corrupted UTF-8 for Pierre's 00F6 umlauts? Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation Member-Subscriber - Original Message From: Spring Pierre [EMAIL PROTECTED] To: Wolfgang Forstmeier [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 4:17:54 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 dear wolfgang, i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. Maybe some more description what is going wrong would be nice. What is really wrong ? the encoding seems to be wrong . i'd need to output ISO-8859-1, yet it outputs UTF-8. the xml file i read the translations from is in ISO-8859-1 ... c.f. screenshot [1] greetings ... pierre == [1] http://wiki.caillou.ch/_media/code:zend_translate_encoding_problem.png -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch
[fw-general] ZF project has stopped working!
This is just a quick query, I have just installed my project on my second computer, both running WAMP with Apache 2.2.6 and PHP 5.2.6 but my ZF project now won't run on my second PC but continues to run fine eleswhere. As far as I can tell the apache and PHP config files are the same. I realise it must be something easy I've missed but I don't know where to continue looking! The error is here inside an action helper: // Retrieve the module name from the request object $module = $this-getRequest()-getModuleName(); Fatal error: Call to a member function getModuleName() on a non-object in C:\www\... Would something cause this call to getRequest to fail? I just can't understand and I know I'll be kicking myself soon! Thanks Simon - Simon http://www.ajb007.co.uk/ -- View this message in context: http://www.nabble.com/ZF-project-has-stopped-working%21-tp17763406p17763406.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZF project has stopped working!
Hi, I think that the ZF version on your second PC is newer or older than the version on your other PC. You should probably look to this section of the manual for migration problems: http://framework.zend.com/manual/en/zend.controller.migration.html --- Met vriendelijke groet, Pieter Kokx MaakSite.net PHP Developer SiCo007 schreef: This is just a quick query, I have just installed my project on my second computer, both running WAMP with Apache 2.2.6 and PHP 5.2.6 but my ZF project now won't run on my second PC but continues to run fine eleswhere. As far as I can tell the apache and PHP config files are the same. I realise it must be something easy I've missed but I don't know where to continue looking! The error is here inside an action helper: // Retrieve the module name from the request object $module = $this-getRequest()-getModuleName(); Fatal error: Call to a member function getModuleName() on a non-object in C:\www\... Would something cause this call to getRequest to fail? I just can't understand and I know I'll be kicking myself soon! Thanks Simon - Simon http://www.ajb007.co.uk/
[fw-general] Zend_Feed: accessing single tags (no closing tags)
Sorry for the strange subject title, I just didnt know how to explain this in normal english ^_^ I use zend_feed to parse rss feeds, and some of them have tags that do not consist of opening/closing pair tags, but just one tag, with inside the info i need, for example: enclosure url=http://www.examble.com/image.jpg/ I googled for an hour now, and still i don't know how to use this tag.. if i iterate through the rss items, and use $item-enclosure, it returns (obviously) a NULL. Anybody who could help me: me love you long time! -- View this message in context: http://www.nabble.com/Zend_Feed%3A-accessing-single-tags-%28no-closing-tags%29-tp17619166p17619166.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] zend_form help!
Hi everyone, I'm new to the forum and Zend_framework so hopefully this doesn't sound stupid. I'm working with zend_form to make a signup page and at the bottom I need to put a check box for agreeing to the terms of use. I need to make the terms of use a link to the terms of use page, but it seems like zend form doesn't allow html within a label tag. Is there any way around this? any help would be greatly appreciated. here's the snippet of code from my form, and the output. (I attached it because the anchor tags were rendering as links. heh) http://www.nabble.com/file/p17670427/code.txt code.txt -- View this message in context: http://www.nabble.com/zend_form-help%21-tp17670427p17670427.html Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] Zend_Feed: accessing single tags (no closing tags)
Hey all, you are probably seeing multiple copies of this message. It is not the sender's doing! I'm cleaning out the spam filter for this list, and he's just tried mailing several times from different addresses since he wasn't seeing his messages come through. Sender, if you'd like to get your messages through to lists, I would recommend against using phrases like me love you long time!. ;) ,Wil -Original Message- From: ofniedan [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 3:56 AM To: fw-general@lists.zend.com Subject: [fw-general] Zend_Feed: accessing single tags (no closing tags) Sorry for the strange subject title, I just didnt know how to explain this in normal english ^_^ I use zend_feed to parse rss feeds, and some of them have tags that do not consist of opening/closing pair tags, but just one tag, with inside the info i need, for example: enclosure url=http://www.examble.com/image.jpg/ I googled for an hour now, and still i don't know how to use this tag.. if i iterate through the rss items, and use $item-enclosure, it returns (obviously) a NULL. Anybody who could help me: me love you long time! -- View this message in context: http://www.nabble.com/Zend_Feed%3A- accessing-single-tags-%28no-closing-tags%29-tp17619166p17619166.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Feed: accessing single tags (no closing tags)
lol very funny. Thanks for letting us know Wil, was wondering what was going on. /James Dempster On Tue, Jun 10, 2008 at 9:41 PM, Wil Sinclair [EMAIL PROTECTED] wrote: Hey all, you are probably seeing multiple copies of this message. It is not the sender's doing! I'm cleaning out the spam filter for this list, and he's just tried mailing several times from different addresses since he wasn't seeing his messages come through. Sender, if you'd like to get your messages through to lists, I would recommend against using phrases like me love you long time!. ;) ,Wil -Original Message- From: ofniedan [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 3:56 AM To: fw-general@lists.zend.com Subject: [fw-general] Zend_Feed: accessing single tags (no closing tags) Sorry for the strange subject title, I just didnt know how to explain this in normal english ^_^ I use zend_feed to parse rss feeds, and some of them have tags that do not consist of opening/closing pair tags, but just one tag, with inside the info i need, for example: enclosure url=http://www.examble.com/image.jpg/ I googled for an hour now, and still i don't know how to use this tag.. if i iterate through the rss items, and use $item-enclosure, it returns (obviously) a NULL. Anybody who could help me: me love you long time! -- View this message in context: http://www.nabble.com/Zend_Feed%3A- accessing-single-tags-%28no-closing-tags%29-tp17619166p17619166.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] mailing list problems
Hi! Since our mailing lists are hosted at ThePlanet, which recently experienced major downtime event (http://service-update.theplanet.com/), we had some problems with Framework mailing lists. While the list server itself was not affected, the DNS servers it is using were, so it could not process mails normally. Because of that, some emails from the lists located at lists.zend.com and sent on June 1th and 2th could be delayed and some even gone missing. So if you have sent mail to the list on June 1th or 2th and didn't see it on the list after reasonable time, it might be good idea to resend it. Right now the lists should work normally. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED]
[fw-general] fetchOne issue
Hi, In my query string I have '?' characters which I want to replace by parameters: $sql = 'SELECT COUNT(*) FROM contact_detail D, girls G, partners P ' . 'WHERE D.girl_id = G.id_girl ' . 'AND D.member_confirmed = 1 ' . 'AND G.partner_id = ? ' . 'AND D.isRead = ?'; $this-view-notReadContacts = $db-fetchOne($sql, array($auth-getIdentity()-id_partner, 0)); The problem is that when I use the profiler, I get the following query: Executed SELECT COUNT(*) FROM contact_detail D, girls G, partners P WHERE D.girl_id = G.id_girl AND D.member_confirmed = 1 AND G.partner_id = ? AND D.isRead = ? The parameters are not replaced. Thank you for any help !! -- View this message in context: http://www.nabble.com/fetchOne-issue-tp17598514p17598514.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Moved: Framework Security ( Was Re: [fw-general] Zend_Validate_Ip )
Matthew et al, There are three key issues. 1. How do security vulnerabilities get disclosed to Zend. Especially serious ones that a vendor should know about before the public. 2. What will Zend do to ensure the bug is verified, fixed and patched. 3. How will Zend distribute those patches. Possible solutions 1. We need a well publicized security contact point. 2. Zend needs to spin up a zf-security team to deal with issues in a timely fashion. 3. This is where it gets tricky: So far, any bugs patched have been done so in the next version (usually a point release) just as any other bug would be. You'd have to be really on the ball to know whether or not you need to upgrade to the latest point release due to a vulnerability. So I propose: That a USN page be setup to disclose security issues which require user intervention. (Like upgrading applications) That a fw-security-announce mailing list be setup to send emails about recently fixed security bugs. Next, Lets talk about Zend_Tool, version specific packaging, patching, updating (backports) and the like. My biggest concern is the availability of (or lack thereof) of security-only patch sets for old released versions. Eg if one wants to get security fixes for an application dependant on 1.0.0 -- they shouldn't have to upgrade their applications to 1.0.X or 1.5.X newer vers, as there are some compatibility problems in just upgrading. It's certainly not something a sysadmin could just do. There should ideally be something in Zend_Tool to automate the process of checking for security updates, and applying them to a specific framework version. I'd also like to see a Zend_Security component that could check a webservice to see if the currently running framework has known vulnerabilities such that an application could be programed to shut down instead of running insecurely. This would be a huge feature to prevent the problems that have plagued other mainstream php projects. I'm sure the community has lots more ideas of what they want to see from Zend on the security/change management front. Kevin Matthew Weier O'Phinney wrote: -- Kevin McArthur [EMAIL PROTECTED] wrote (on Tuesday, 10 June 2008, 12:31 PM -0700): No one's blaming anyone for the code, it's what the response is, and will be. Bugs will happen... but will backports? If you search the lists you'll find numerous attempts to get a security policy discussion started, and it never goes anywhere. So lets get somewhere already. How is the project going to respond to a validator that is letting tainted information into applications. Maybe Matthew, as architect, can respond on what Zend is doing to address this and other security disclosures with the framework? Kevin P.S. Far from complaining without action, I've tried to get this subject addressed, proactively, numerous times. I've been critical of the SVN externals distribution, critical of attempts to get a Zend Framework 'package' released for Linux distributions, and I've always brought up security issues with the development team as I've found them. We need some leadership and responsibility from Zend on the security policy. Kevin, I've been on fw-general since day one, and I do not recall any serious or repeated attempts to discuss the subject. Admittedly, until the past six months, ZF was not my full-time job, and it may have slipped under the radar, but I'm sure I would recollect something this serious. As to our policy: get the issue fixed ASAP, and issue a point release. Patches are available via the repo browser, and we will likely post links and/or instructions on how to grab a patch or patched file. Response time will be based on the severity of the vulnerability, but the above is the policy. Regardless of severity, an issue is always entered in the tracker, to ensure that it is reported in our changelogs. I welcome you to email me directly with your concerns, or to start a new thread with them. I'm particularly curious what your concerns are regarding distro-specific packages. Regarding usage of svn:externals, this is an optional way to grab ZF, and I'm also curious what issues you see with it. Thomas Weidner wrote: I'm not the one to blame as I am not the author of Zend_Validate. But I think it's always better to write a issue regardless of what the type is set new or improvement or bug or problem or whatever, than discussing here how the author meant his implementation. Maybe he made a problem in the api doc, maybe in his implementation. Only the author knows this. Related to your PS, this shows only that the author has not wrote the right unit tests. Because this is true for this particular component does not mean that it's true for the complete framework. But it's always easier to complain about the failures of others. I understand this. :-) Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com
[fw-general] Domain routing
I'm trying to point multiple domains at specific routes in my Zend application. For example: I want to have http://mydomain.com act as if I went to http://localhost/zend_project/public/mydomain and have http://myotherdomain.com act as if I went to http://localhost/zend_project/public/myotherdomain Where my index.php and .htaccess file resides in /zend_project/public Here is my setup thus far running wamp2: windows/system32/drivers/etc/hosts i added 127.0.0.1 mydomain.com wamp\bin\apache\apache2.2.6\conf\httpd.conf uncommented #Include conf/extra/httpd-vhosts.conf wamp\bin\apache\apache2.2.6\conf\extra\httpd-vhosts.conf NameVirtualHost *:80 VirtualHost *:80 DocumentRoot c:/wamp/www ServerName localhost /VirtualHost VirtualHost *:80 DocumentRoot c:/wamp/www/zend_project/public/mydomain ServerName mydomain.com /VirtualHost wamp\www\zend_project\public\.htaccess php_flag magic_quotes_gpc off RewriteEngine on RewriteRule !\.(htm|js|ico|gif|jpg|png|css|xls|pdf|doc|swf|xml)$ index.php When I browse to http://mydomain.com I get 400 Bad Request. If I remove the .htaccess file, it will go to the url (which points to /zend_project/public/mydomain) fine (but zend wont work of course). Does anyone have any advice on how to get this working, or any advice on a better way of accomplishing having different domains pointing at different routes in a Zend application. Thanks -- View this message in context: http://www.nabble.com/Domain-routing-tp17544769p17544769.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] fetchOne issue
-- debussy007 [EMAIL PROTECTED] wrote (on Monday, 02 June 2008, 03:46 AM -0700): In my query string I have '?' characters which I want to replace by parameters: $sql = 'SELECT COUNT(*) FROM contact_detail D, girls G, partners P ' . 'WHERE D.girl_id = G.id_girl ' . 'AND D.member_confirmed = 1 ' . 'AND G.partner_id = ? ' . 'AND D.isRead = ?'; $this-view-notReadContacts = $db-fetchOne($sql, array($auth-getIdentity()-id_partner, 0)); The problem is that when I use the profiler, I get the following query: Executed SELECT COUNT(*) FROM contact_detail D, girls G, partners P WHERE D.girl_id = G.id_girl AND D.member_confirmed = 1 AND G.partner_id = ? AND D.isRead = ? The parameters are not replaced. The profiler will not show the replacements, as the replacements are performed by the database server (the implementation uses prepared statements). You can retrieve the query parameters that were used by calling the getQueryParams() method of the given query profile. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] ZF project has stopped working!
Pieter Kokx wrote: I think that the ZF version on your second PC is newer or older than the version on your other PC. Sadly it's not the answer they are both identical, 1.5.2, the project is all in it's own svn repository so technically both bases should be identical. I'm sure it's a setup problem, I just don't understand why that particular method is causing me problems, take out the plugin that calls that model helper and it all works fine. Which leads me to something stopping the getModuleName method being set. Just to be clear I'm statically calling the action helper (loads models) in a plugin before the site is loaded. $role = Zend_Controller_Action_HelperBroker::getStaticHelper('Model')-getModel('role'); ... getModel then uses the call to getRequest() as per my last post. It still doesn' make any sense to me! Simon - Simon http://www.ajb007.co.uk/ -- View this message in context: http://www.nabble.com/ZF-project-has-stopped-working%21-tp17763406p17764824.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Translate in iso-8859-1
Hi Thomas, First: Zend_Translate can not handle bilge pumps. I think you meant the ISO-8859-1 standard. A slip of the finger, dear Watson ;) Zend_Translate does not change any source... if your source is UTF you will get UTF. If it's Win1503 you will get Win 1503... I'm going to be a pain in the butt (until I realise I'm wrong and slink away embarrassed ;)). I did a quick test since it seemed a bit odd, and I'm getting the same result. The input's strlen is 1, and the output's is 2. Somewhere along the line, and my guess is xml_parser_create() as suggested, a single byte character miraculously transformed into a double byte u+diacritic. Adding the optional ISO-8859-1 encoding output option to xml_parser_create() in the TMX adapter corrects the problem and reverts to outputting the single-byte umlaut. I'm not an expert here, so I could be off the wall. The PHP docs state that input encoding is detected from the input source, but the output is independently encoded as UTF-8 by default since PHP 5.0.2. So Pierre's input, without further changes, is indeed output under UTF-8. Specifically, the ISO-8859-1 umlaut becomes a double-byte UTF-8 u with a diacritic attached. That at least explains the mangled output Pierre is getting - the browser is simple taking the Content-Type seriously and printing the two bytes as separate chars. Like I said, I could be completely wrong, or using a bad test case. But something doesn't add up right now. Best regards, Paddy Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation - Original Message From: Thomas Weidner [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 8:54:13 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 I already answered his question 17:04 CET. Just 2 things: First: Zend_Translate can not handle bilge pumps. I think you meant the ISO-8859-1 standard. Second: I am using the western european standard myself in the testbed and in my applications without any problems. Zend_Translate does not change any source... if your source is UTF you will get UTF. If it's Win1503 you will get Win 1503... Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Pádraic Brady [EMAIL PROTECTED] To: Spring Pierre [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 9:27 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 Maybe Thomas can clarify, since I don't use ISO-8849-1, but in the TMX adapter I noted it's using the XML Parser extension but it doesn't specify an output encoding. As far as I know the default out encoding, independent of the input encoding, is UTF-8. Could this be creating a subtle encoding transfer? In goes ISO-8849-1, out comes slightly corrupted UTF-8 for Pierre's 00F6 umlauts? Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation Member-Subscriber - Original Message From: Spring Pierre [EMAIL PROTECTED] To: Wolfgang Forstmeier [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 4:17:54 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 dear wolfgang, i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. Maybe some more description what is going wrong would be nice. What is really wrong ? the encoding seems to be wrong . i'd need to output ISO-8859-1, yet it outputs UTF-8. the xml file i read the translations from is in ISO-8859-1 ... c.f. screenshot [1] greetings ... pierre == [1] http://wiki.caillou.ch/_media/code:zend_translate_encoding_problem.png -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch
Re: [fw-general] Zend_Translate in iso-8859-1
Hi Thomas, First: Zend_Translate can not handle bilge pumps. I think you meant the ISO-8859-1 standard. A slip of the finger, dear Watson ;) Zend_Translate does not change any source... if your source is UTF you will get UTF. If it's Win1503 you will get Win 1503... I'm going to be a pain in the butt (until I realise I'm wrong and slink away embarrassed ;)). I did a quick test since it seemed a bit odd, and I'm getting the same result. The input's strlen is 1, and the output's is 2. Somewhere along the line, and my guess is xml_parser_create() as suggested, a single byte character miraculously transformed into a double byte u+diacritic. Adding the optional ISO-8859-1 encoding output option to xml_parser_create() in the TMX adapter corrects the problem and reverts to outputting the single-byte umlaut. I'm not an expert here, so I could be off the wall. The PHP docs state that input encoding is detected from the input source, but the output is independently encoded as UTF-8 by default since PHP 5.0.2. So Pierre's input, without further changes, is indeed output under UTF-8. Specifically, the ISO-8859-1 umlaut becomes a double-byte UTF-8 u with a diacritic attached. That at least explains the mangled output Pierre is getting - the browser is simple taking the Content-Type seriously and printing the two bytes as separate chars. Like I said, I could be completely wrong, or using a bad test case. But something doesn't add up right now. Best regards, Paddy Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation - Original Message From: Thomas Weidner [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 8:54:13 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 I already answered his question 17:04 CET. Just 2 things: First: Zend_Translate can not handle bilge pumps. I think you meant the ISO-8859-1 standard. Second: I am using the western european standard myself in the testbed and in my applications without any problems. Zend_Translate does not change any source... if your source is UTF you will get UTF. If it's Win1503 you will get Win 1503... Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Pádraic Brady [EMAIL PROTECTED] To: Spring Pierre [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 9:27 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 Maybe Thomas can clarify, since I don't use ISO-8849-1, but in the TMX adapter I noted it's using the XML Parser extension but it doesn't specify an output encoding. As far as I know the default out encoding, independent of the input encoding, is UTF-8. Could this be creating a subtle encoding transfer? In goes ISO-8849-1, out comes slightly corrupted UTF-8 for Pierre's 00F6 umlauts? Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation Member-Subscriber - Original Message From: Spring Pierre [EMAIL PROTECTED] To: Wolfgang Forstmeier [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Tuesday, June 10, 2008 4:17:54 PM Subject: Re: [fw-general] Zend_Translate in iso-8859-1 dear wolfgang, i build a Zend_Form and need the validation messages to be translated. i wrote an xml file with the error messages [1]. i tried both, an iso-8859-1 and utf-8 version of the xml file. i then attach the translation to the form and render it. cf. [2] i seem to have a problem with encoding though. Maybe some more description what is going wrong would be nice. What is really wrong ? the encoding seems to be wrong . i'd need to output ISO-8859-1, yet it outputs UTF-8. the xml file i read the translations from is in ISO-8859-1 ... c.f. screenshot [1] greetings ... pierre == [1] http://wiki.caillou.ch/_media/code:zend_translate_encoding_problem.png -- Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch
Re: [fw-general] ZF project has stopped working!
Ignore me! It's a problem that's been lurking for a while I just hadn't noticed. It is to do with 1.5.2, the files on the old setup were cached and the new one I didn't copy the cache... Therefore the plugin / helper that creates the cache files is broken in 1.5.2 so thankfully I've found the answer and yes I am kicking myself!! :D Simon - Simon http://www.ajb007.co.uk/ -- View this message in context: http://www.nabble.com/ZF-project-has-stopped-working%21-tp17763406p17765512.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Feed: accessing single tags (no closing tags)
Hi ofniedan, sorry for not answering before, I just noticed your message now due to... your email activity! :D Each Zend_Feed_Element (including the feed instance itself) implements ArrayAccess interface. It means you can access any attribute via $element-enclosure['attribute']; Have a look at the following example. #!/usr/bin/env php ?php require 'helper.php'; require 'Zend/Feed.php'; $feed = Zend_Feed::import('http://www.phparch.com/c/news/atom'); foreach ($feed as $index = $item) { echo $index. {$item-title}\n; echo \tlink: {$item-link['href']}\n; } Here's the output PhpMate r8839 running PHP 5.2.5 (cli) (/usr/bin/env php) feed-array-access.php 0. MTA release new Guide to PHP 5 Migration link: http://c7y.phparch.com/c/entry/1/news,20080610-guide_to_php_5_migration_published 1. MTA publishes php|architect's PHP Job Hunter's Handbook link: http://c7y.phparch.com/c/entry/1/news,20080602-php_job_hunters_handbook_published 2. MTA and ibuildings announce partnership link: http://c7y.phparch.com/c/entry/1/news,20080527-mta_and_ibuildings_partnership 3. php|tek 2008 95% sold out link: http://c7y.phparch.com/c/entry/1/news,20080428-phptek_almost_sold_out 4. Announcing our new Magento book link: http://c7y.phparch.com/c/entry/1/news,20080428-new_magento_book 5. First Magento class sold out; new dates announced for May link: http://c7y.phparch.com/c/entry/1/news,20080414-new_magento_training_dates ... -- Simone On Tue, Jun 10, 2008 at 10:44 PM, James Dempster [EMAIL PROTECTED] wrote: lol very funny. Thanks for letting us know Wil, was wondering what was going on. /James Dempster On Tue, Jun 10, 2008 at 9:41 PM, Wil Sinclair [EMAIL PROTECTED] wrote: Hey all, you are probably seeing multiple copies of this message. It is not the sender's doing! I'm cleaning out the spam filter for this list, and he's just tried mailing several times from different addresses since he wasn't seeing his messages come through. Sender, if you'd like to get your messages through to lists, I would recommend against using phrases like me love you long time!. ;) ,Wil -Original Message- From: ofniedan [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 3:56 AM To: fw-general@lists.zend.com Subject: [fw-general] Zend_Feed: accessing single tags (no closing tags) Sorry for the strange subject title, I just didnt know how to explain this in normal english ^_^ I use zend_feed to parse rss feeds, and some of them have tags that do not consist of opening/closing pair tags, but just one tag, with inside the info i need, for example: enclosure url=http://www.examble.com/image.jpg/ I googled for an hour now, and still i don't know how to use this tag.. if i iterate through the rss items, and use $item-enclosure, it returns (obviously) a NULL. Anybody who could help me: me love you long time! -- View this message in context: http://www.nabble.com/Zend_Feed%3A- accessing-single-tags-%28no-closing-tags%29-tp17619166p17619166.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Paginator ready for community review
Hi everyone, I'm happy to announce that Zend_Paginator is ready for community review. The code's all written and there's even an online demo. http://framework.zend.com/wiki/pages/viewpage.action?pageId=43560 Please take a look and let us know what you think. If all goes as planned, we're hoping to include this in Zend Framework 1.6. :-) -Matt
Re: [fw-general] Zend_Paginator ready for community review
Hi Matthew Looking good! I noticed with the online demo that the exception for invalid page range can be thrown by unintentional interaction from the user. Say you have navigated to page 30 with 17 items per page. If you then click 20 items per page... 'boom!' . Is there scope for the view helper to determine a valid page number based on the existing parameters? Hi everyone, I'm happy to announce that Zend_Paginator is ready for community review. The code's all written and there's even an online demo. http://framework.zend.com/wiki/pages/viewpage.action?pageId=43560 Please take a look and let us know what you think. If all goes as planned, we're hoping to include this in Zend Framework 1.6. :-) -Matt -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com
Re: [fw-general] Zend_Paginator ready for community review
Hi Simon, Thanks for the feedback. I've changed the behavior to be more sane--if you go beyond the last page it now just sends you to the last page. In the same vein, entering a number less than 1 (if your routing rules allow it) will now send you to the first page instead. -Matt On Tue, Jun 10, 2008 at 5:31 PM, Simon Mundy [EMAIL PROTECTED] wrote: Hi Matthew Looking good! I noticed with the online demo that the exception for invalid page range can be thrown by unintentional interaction from the user. Say you have navigated to page 30 with 17 items per page. If you then click 20 items per page... 'boom!' . Is there scope for the view helper to determine a valid page number based on the existing parameters? Hi everyone, I'm happy to announce that Zend_Paginator is ready for community review. The code's all written and there's even an online demo. http://framework.zend.com/wiki/pages/viewpage.action?pageId=43560 Please take a look and let us know what you think. If all goes as planned, we're hoping to include this in Zend Framework 1.6. :-) -Matt -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com
Re: [fw-general] Zend_Paginator ready for community review
Cheers Matthew! Hi Simon, Thanks for the feedback. I've changed the behavior to be more sane-- if you go beyond the last page it now just sends you to the last page. In the same vein, entering a number less than 1 (if your routing rules allow it) will now send you to the first page instead. -Matt On Tue, Jun 10, 2008 at 5:31 PM, Simon Mundy [EMAIL PROTECTED] wrote: Hi Matthew Looking good! I noticed with the online demo that the exception for invalid page range can be thrown by unintentional interaction from the user. Say you have navigated to page 30 with 17 items per page. If you then click 20 items per page... 'boom!' . Is there scope for the view helper to determine a valid page number based on the existing parameters? Hi everyone, I'm happy to announce that Zend_Paginator is ready for community review. The code's all written and there's even an online demo. http://framework.zend.com/wiki/pages/viewpage.action?pageId=43560 Please take a look and let us know what you think. If all goes as planned, we're hoping to include this in Zend Framework 1.6. :-) -Matt -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com
[fw-general] Any thoughts about Zend View Filters for Zend layout?
Hola! Since we are routing output through the response object, it makes zend view filters feasible. The idea is to attach a filter(s) to a named segment of the response object and then, when the response object renders to the view, it first runs the contents of the named segments through a filter. or possibly a filter chain on its way to the view object. $view-myFilter('response_segment'); or maybe filters could be set by a viewHelper: $view--setFilter('response_segment', 'filter_name'); It may be possible to do this without changing the response object by using a view helper to set the filters and plugins to render the named segments. Or, perhaps a more integrated method may be used. We already have /views/filters directory. Anybody have thoughts on this issue? Adios. *quetzequatl*