2010年9月16日星期四

Re: [fw-mvc] best way to remove slashes

I have worked with several hosts that use cPanel. All of them allowed me to use php.ini

On Thu, Sep 16, 2010 at 4:49 AM, Miguel Vieira - IT ANALYST <vieira@miguelvieira.com.pt> wrote:

No, this is not true. In Portugal we have accommodation that companies use Cpanel and you can move in php.ini and it affects your hosting account .. It should be this suPHP and not  DSO ..

 

But with suPHP you cannot put  flags PHP on .htaccess

 

De: sina miandashti [mailto:miandashti@gmail.com]
Enviada: quinta-feira, 16 de Setembro de 2010 09:03
Para: Abraham Block
Cc: Hector Virgen; Jeroen Keppens; Zend MVC
Assunto: Re: [fw-mvc] best way to remove slashes

 

in cPanel hostings  no one have access to php.ini

i turn it of by htaccess  ... thanks my friends

 

regards

 

On Thu, Sep 16, 2010 at 2:58 AM, Abraham Block <atblock@gmail.com> wrote:

I can't imagine that your host doesn't give you access to your own php.ini file.

 

On Wed, Sep 15, 2010 at 6:25 PM, Hector Virgen <djvirgen@gmail.com> wrote:

If your host doesn't support .htaccess, there are some interesting solutions here in the comments:

 

http://us2.php.net/manual/en/function.get-magic-quotes-gpc.php



--
Hector Virgen

Sr. Web Developer

Walt Disney Parks and Resorts Online



On Wed, Sep 15, 2010 at 3:22 PM, Jeroen Keppens <jeroen.keppens@gmail.com> wrote:

You can try putting this in your root's .htaccess (if your host allows for .htaccess files):

 

php_flag magic_quotes_gpc Off

 

Wkr

Jeroen
-----

Jeroen Keppens

+32 (0)475/62.42.64


On 15 Sep 2010, at 23:57, sina miandashti <miandashti@gmail.com> wrote:

so i have to tell my host disbale magic quotes  ?

On Thu, Sep 16, 2010 at 1:46 AM, Hector Virgen <djvirgen@gmail.com> wrote:

It sounds like you have magic quotes enabled in your php.ini. It is suggested that magic quotes are disabled for Zend Framework applications (actually, for *all* PHP applications -- using magic quotes is considered insecure).

 

Zend_Controller_Request_* does not add slashes to input, and Zend_Db will use the proper escaping mechanism for your DB when performing queries. Typically, you should never need to use stripslashes() in a ZF application.

--
Hector Virgen

Sr. Web Developer

Walt Disney Parks and Resorts Online



On Wed, Sep 15, 2010 at 12:16 PM, sina miandashti <miandashti@gmail.com> wrote:

hi

 

i see zend_db or zend_request put slashes around form values before inserting them to DB

 

but if i use some basic html tags like <a> or <img>  when selecting text by query from the DB that slashes makes view problem.

 

what is the best solution for this?

 

is stripslashes() works?


--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin

 




--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin

 

 




--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin


没有评论: