php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17669 magic_quotes_runtime enables at random
Submitted: 2002-06-09 19:24 UTC Modified: 2002-06-12 13:26 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: phpbugs_p at ter dot dk Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.1.2 OS: Linux + FreeBSD
Private report: No CVE-ID: None
 [2002-06-09 19:24 UTC] phpbugs_p at ter dot dk
This bug may be related to #10197 and #10290.

I have a PHP-solution hosted at my ISP. At random - about once per 50 requests - magic_quotes_runtime is enabled and affects e.g. strings returned from socket functions.

I have created a simple webpage at:

http://trc.dk/magic.php
http://trc.dk/magic.phps (source)

Reload it a bunch of times and notice that magic_quotes_runtime truely has been enabled. This webpage don't show it, but it in fact does affect strings; it's not just an erroneous output of the magic_quotes_runtime-setting.

A helpful shellcommand would be:
watch -n 1 "curl http://trc.dk/magic.php 2>/dev/null"
... and break the script when Magic quotes (runtime) indeed shows "1".


Please notice that my ISP is using a cluster-based solution; the internal webserver-names is reflected on above webpage.

It actually gives us more test-material, since the problem isn't just one wrong configured webserver out of a dozen, but the setting appears and disappears on several of the webservers (maybe all). Some of these webservers run Linux; others run FreeBSD. Both seem to be affected.

I have been in contact with the technical department at my ISP, and they are just as puzzled as I am. There shouldn't be any change in the configuration for the different webservers.

In all cases PHP is enabled as mod_php for Apache. A phpinfo() is available at:
http://trc.dk/info.php
(although a couple of reloads might be required to get information from the right webserver)

- Peter Brodersen

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-12 11:03 UTC] sniper@php.net
I tested this by running a script with 'set_magic_quotes_runtime(1);' once. Then I changed that to 'echo get_magic_quotes_runtime();' and it shows that as
long as that apache child which were used to run the
set script was alive, the setting also stayed 'On'..

So the question is: Is there some vhost which has this setting set in it's definition (httpd.conf) or is there
some .htaccess file with it? Or is there any script which
is run sometimes that has 'set_magic_quotes_runtime()' ?

--Jani

 [2002-06-12 13:26 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC