|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-02-10 12:43 UTC] ondrej@php.net
Description: ------------ Description available here: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/930115 Basically the attached patch does replace the second location of PG(magic_quotes_gpc) with the zend_alter_ini_entry_ex: - PG(magic_quotes_gpc) = magic_quotes_gpc; + + if (magic_quotes_gpc) { + zend_alter_ini_entry_ex("magic_quotes_gpc", sizeof("magic_quotes_gpc"), "1", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE, 1 TSRMLS_CC); + } I could be wrong, since my knowledge of PHP internals is lim(knowledge) = 0, but this seems to follow the logic of first change. Patchesmagic_quotes_gpc-regression (last revision 2012-02-10 12:44 UTC by ondrej@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
I can confirm that the attached patch fixes the reported problem: root@howl:/tmp# /tmp/buildd/php5-5.3.3/cgi-build/sapi/cli/php -c /tmp/php.ini - r 'var_dump(ini_get("magic_quotes_gpc"));' string(1) "1" root@howl:/tmp# grep ^magic_quotes_gpc /tmp/php.ini magic_quotes_gpc = On root@howl:/tmp# /tmp/buildd/php5-5.3.3/cgi-build/sapi/cli/php -c /tmp/php.ini - r 'var_dump(ini_get("magic_quotes_gpc"));' string(1) "1" root@howl:/tmp# emacs php.ini root@howl:/tmp# grep ^magic_quotes_gpc /tmp/php.ini magic_quotes_gpc = Off root@howl:/tmp# /tmp/buildd/php5-5.3.3/cgi-build/sapi/cli/php -c /tmp/php.ini - r 'var_dump(ini_get("magic_quotes_gpc"));' string(0) ""