Re: [fw-general] Fw: $request->getParams() returns escaped data
Hi DaliborKarlovic, Well my aim is to save as much as possible, and in my opinion caching is not an option either. My idea is put everything in INI file but the first request generates the php file with array configuration and there after all other requests are served from php file. I can modifiy the INI file and then delete the php and it will get regenerated the next request. But again as suggested by Matt himself doing so would not have massive effect, but from my findings using Xdebug I can save up to 400 method call by just doing that. I will need to check the difference on production server and adjust accordingly, once I have completed the project. Thanks Ali -- From: "DaliborKarlovic" Sent: Tuesday, July 14, 2009 8:30 AM To: Subject: Re: [fw-general] Fw: $request->getParams() returns escaped data On Tuesday 14 July 2009 06:03:26 Matthew Weier O'Phinney wrote: -- Muhammad Ali wrote (on Monday, 13 July 2009, 09:16 PM +0100): > An other quick question for the mailing list, does using Zend_Config as > Array rather as INI files improves performance, is it worth doing? Using native arrays will of course be faster to parse than INI or XML. That said, it's likely to have negligible effect on your application performance. Profile your application using XDebug or Zend Debugger to find the real bottlenecks. He can always use INI and cache the resulting config object. Zend_Application should support that out-of-the-box. > -- > From: "Bradley Holt" > Sent: Monday, July 13, 2009 8:53 PM > To: "Muhammad Ali" > Cc: > Subject: Re: [fw-general] Fw: $request->getParams() returns escaped > data > >> This isn't Zend Framework -- it sounds like you have magic quotes >> turned on. These should be disabled[1] when using Zend Framework. >> >> [1] http://us3.php.net/manual/en/security.magicquotes.disabling.php >> >> On Mon, Jul 13, 2009 at 3:44 PM, Muhammad Ali >> wrote: >>> Hi >>> >>> Just wanted to check if escaping for $request->getParams() can be >>> turned off >>> e.g. single quote( ' ) is replaced by ( \' ). I have tried it before >>> calling >>> any other methods but still the same, is there any helper or plugin I >>> need >>> to set options for? >>> >>> If it is a default, why I should create a filter to strip slashes >>> while >>> printing values where as if i can not put them as the first place. >>> >>> Thanks >> >> -- >> Bradley Holt >> bradley.h...@foundline.com -- Dado
Re: [fw-general] Fw: $request->getParams() returns escaped data
On Tuesday 14 July 2009 06:03:26 Matthew Weier O'Phinney wrote: > -- Muhammad Ali wrote > > (on Monday, 13 July 2009, 09:16 PM +0100): > > An other quick question for the mailing list, does using Zend_Config as > > Array rather as INI files improves performance, is it worth doing? > > Using native arrays will of course be faster to parse than INI or XML. > That said, it's likely to have negligible effect on your application > performance. Profile your application using XDebug or Zend Debugger to > find the real bottlenecks. He can always use INI and cache the resulting config object. Zend_Application should support that out-of-the-box. > > > -- > > From: "Bradley Holt" > > Sent: Monday, July 13, 2009 8:53 PM > > To: "Muhammad Ali" > > Cc: > > Subject: Re: [fw-general] Fw: $request->getParams() returns escaped data > > > >> This isn't Zend Framework -- it sounds like you have magic quotes > >> turned on. These should be disabled[1] when using Zend Framework. > >> > >> [1] http://us3.php.net/manual/en/security.magicquotes.disabling.php > >> > >> On Mon, Jul 13, 2009 at 3:44 PM, Muhammad Ali wrote: > >>> Hi > >>> > >>> Just wanted to check if escaping for $request->getParams() can be > >>> turned off > >>> e.g. single quote( ' ) is replaced by ( \' ). I have tried it before > >>> calling > >>> any other methods but still the same, is there any helper or plugin I > >>> need > >>> to set options for? > >>> > >>> If it is a default, why I should create a filter to strip slashes while > >>> printing values where as if i can not put them as the first place. > >>> > >>> Thanks > >> > >> -- > >> Bradley Holt > >> bradley.h...@foundline.com -- Dado
Re: [fw-general] Fw: $request->getParams() returns escaped data
-- Muhammad Ali wrote (on Monday, 13 July 2009, 09:16 PM +0100): > An other quick question for the mailing list, does using Zend_Config as > Array rather as INI files improves performance, is it worth doing? Using native arrays will of course be faster to parse than INI or XML. That said, it's likely to have negligible effect on your application performance. Profile your application using XDebug or Zend Debugger to find the real bottlenecks. > -- > From: "Bradley Holt" > Sent: Monday, July 13, 2009 8:53 PM > To: "Muhammad Ali" > Cc: > Subject: Re: [fw-general] Fw: $request->getParams() returns escaped data > >> This isn't Zend Framework -- it sounds like you have magic quotes >> turned on. These should be disabled[1] when using Zend Framework. >> >> [1] http://us3.php.net/manual/en/security.magicquotes.disabling.php >> >> On Mon, Jul 13, 2009 at 3:44 PM, Muhammad Ali wrote: >>> Hi >>> >>> Just wanted to check if escaping for $request->getParams() can be >>> turned off >>> e.g. single quote( ' ) is replaced by ( \' ). I have tried it before >>> calling >>> any other methods but still the same, is there any helper or plugin I >>> need >>> to set options for? >>> >>> If it is a default, why I should create a filter to strip slashes while >>> printing values where as if i can not put them as the first place. >>> >>> Thanks >> >> >> -- >> Bradley Holt >> bradley.h...@foundline.com >> > -- Matthew Weier O'Phinney Project Lead| matt...@zend.com Zend Framework | http://framework.zend.com/
Re: [fw-general] Fw: $request->getParams() returns escaped data
Hi Till yeah I have removed this line, just wanted to show what i was using before. I have now turned off the magic quotes and all seems good. Thanks again -- From: "till" Sent: Monday, July 13, 2009 9:32 PM To: "Muhammad Ali" Cc: "Bradley Holt" ; Subject: Re: [fw-general] Fw: $request->getParams() returns escaped data On Mon, Jul 13, 2009 at 10:16 PM, Muhammad Ali wrote: Hi Bradley Thank a lot for your answer you have saved me hours and injecting work arounds :) if(isset($postValues['title'])) $postValues['title'] = stripslashes($postValues['title']); That is a bad hack. Say you have a slash in it for real. Just get rid off magic quotes, they shouldn't be used anywhere anyway. Till
Re: [fw-general] Fw: $request->getParams() returns escaped data
On Mon, Jul 13, 2009 at 10:16 PM, Muhammad Ali wrote: > Hi Bradley > > Thank a lot for your answer you have saved me hours and injecting work > arounds :) > > if(isset($postValues['title'])) $postValues['title'] = > stripslashes($postValues['title']); That is a bad hack. Say you have a slash in it for real. Just get rid off magic quotes, they shouldn't be used anywhere anyway. Till
Re: [fw-general] Fw: $request->getParams() returns escaped data
Hi Bradley Thank a lot for your answer you have saved me hours and injecting work arounds :) if(isset($postValues['title'])) $postValues['title'] = stripslashes($postValues['title']); An other quick question for the mailing list, does using Zend_Config as Array rather as INI files improves performance, is it worth doing? Thanks again Ali -- From: "Bradley Holt" Sent: Monday, July 13, 2009 8:53 PM To: "Muhammad Ali" Cc: Subject: Re: [fw-general] Fw: $request->getParams() returns escaped data This isn't Zend Framework -- it sounds like you have magic quotes turned on. These should be disabled[1] when using Zend Framework. [1] http://us3.php.net/manual/en/security.magicquotes.disabling.php On Mon, Jul 13, 2009 at 3:44 PM, Muhammad Ali wrote: Hi Just wanted to check if escaping for $request->getParams() can be turned off e.g. single quote( ' ) is replaced by ( \' ). I have tried it before calling any other methods but still the same, is there any helper or plugin I need to set options for? If it is a default, why I should create a filter to strip slashes while printing values where as if i can not put them as the first place. Thanks -- Bradley Holt bradley.h...@foundline.com
Re: [fw-general] Fw: $request->getParams() returns escaped data
This isn't Zend Framework -- it sounds like you have magic quotes turned on. These should be disabled[1] when using Zend Framework. [1] http://us3.php.net/manual/en/security.magicquotes.disabling.php On Mon, Jul 13, 2009 at 3:44 PM, Muhammad Ali wrote: > Hi > > Just wanted to check if escaping for $request->getParams() can be turned off > e.g. single quote( ' ) is replaced by ( \' ). I have tried it before calling > any other methods but still the same, is there any helper or plugin I need > to set options for? > > If it is a default, why I should create a filter to strip slashes while > printing values where as if i can not put them as the first place. > > Thanks -- Bradley Holt bradley.h...@foundline.com
[fw-general] Fw: $request->getParams() returns escaped data
Hi Just wanted to check if escaping for $request->getParams() can be turned off e.g. single quote( ' ) is replaced by ( \' ). I have tried it before calling any other methods but still the same, is there any helper or plugin I need to set options for? If it is a default, why I should create a filter to strip slashes while printing values where as if i can not put them as the first place. Thanks