php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11001 ini_set() of 'magic_quotes_sybase' has no effect
Submitted: 2001-05-21 16:23 UTC Modified: 2001-05-21 16:35 UTC
From: mike at newfangled dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.5 OS: Win2K Professional SP1
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: mike at newfangled dot com
New email:
PHP Version: OS:

 

 [2001-05-21 16:23 UTC] mike at newfangled dot com
Trying to set magic_quotes_sybase with

ini_set('magic_quotes_sybase', 1 )

even though a ini_get() says the value is set it has no effect on the handling of quotes. I have to set the value to 'on' in the PHP.ini file in order for this to work. 

I have tried the following without any success.

ini_set('magic_quotes_sybase', 1 )
ini_set('magic_quotes_sybase', '1' )
ini_set('magic_quotes_sybase', -1 )
ini_set('magic_quotes_sybase', '-1' )
ini_set('magic_quotes_sybase', true )
ini_set('magic_quotes_sybase', 'on' )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-21 16:26 UTC] rasmus@php.net
Not a bug.  magic quotes are done before your script is executed, so you can't change these settings in your script.
 [2001-05-21 16:32 UTC] mike at newfangled dot com
Is it a documention issue?

The Online Manual
=============================
magic_quotes_sybase "0" PHP_INI_ALL 


PHP_INI_ALL 7 Entry can be set anywhere 
 [2001-05-21 16:35 UTC] mike at newfangled dot com
Is it a documention issue?

The Online Manual
=============================
magic_quotes_sybase "0" PHP_INI_ALL 


PHP_INI_ALL 7 Entry can be set anywhere 
 [2001-05-21 16:35 UTC] rasmus@php.net
I suppose to some extent it is.  The chart on php.net/ini_set just specifies where values can be changed.  It doesn't specify whether changing that value will actually have the desired effect.  Like you saw, you could change the value in your script, the problem is just that the action that the value affects happens before your script is run, so the change doesn't do anything useful.  The ini_set page should be updated to reflect this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 07:01:28 2024 UTC