php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15571 incredible slashing of " and \
Submitted: 2002-02-15 11:08 UTC Modified: 2002-02-15 11:31 UTC
From: mav at alkar dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.1.1 OS: FreeBSD 4.x
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mav at alkar dot net
New email:
PHP Version: OS:

 

 [2002-02-15 11:08 UTC] mav at alkar dot net
When script must take variable that consist " and \
it takes \" and \\.

You can see this bug on http://bugs.php.net/search.php
if you enter \" in any field and press "Search".

I have PHP 4.1.1 configured with such options:
./configure  --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf
--with-mysql=/usr/local/mysql --with-gd=/usr/local --enable-trans-sid --enable-versioning --enable-inline-optimization --enable-ftp --enable-dbase --enable-gd-native-ttf --with-ttf

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-15 11:31 UTC] hholzgra@php.net
this intended behaviour that is configurable
and defaults to 'on'

see http://www.php.net/manual/en/configuration.php
and check your magic_quotes_* settings in php.ini 
(verify using phpinfo() output)



magic_quotes_gpc  boolean

    Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash.


magic_quotes_runtime boolean

    If magic_quotes_runtime is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash.


magic_quotes_sybase boolean

    If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash if magic_quotes_gpc or magic_quotes_runtime is enabled.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 05:01:28 2024 UTC