php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10591 magic_quotes_runtime being randomly set?
Submitted: 2001-05-01 18:24 UTC Modified: 2001-05-15 08:58 UTC
From: phpbug at samrowe dot com Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 4.0 Latest CVS (01/05/2001) OS: Progeny GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbug at samrowe dot com
New email:
PHP Version: OS:

 

 [2001-05-01 18:24 UTC] phpbug at samrowe dot com
http://airbag.tss.peachnet.edu/~sam/file.php

Click on "Try Again" and you'll see the quotes become
escaped and then not escaped seemingly at random.

The code is here:
http://airbag.tss.peachnet.edu/~sam/file.txt

http://airbag.tss.peachnet.edu/info.php
is the phpinfo information.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-01 19:08 UTC] phpbug at samrowe dot com
Sorry, file.txt should work now. I saw you hit the 404.
 [2001-05-01 19:14 UTC] phpbug at samrowe dot com
Sorry, file.txt should work now. I saw you hit the 404.
 [2001-05-01 19:56 UTC] zak@php.net
That does seem odd...

Try get_magic_quotes_runtime() instead of get_magic_quotes_gpc() - gpc quoting only happens to get/post/cookie data.
 [2001-05-01 20:03 UTC] phpbug at samrowe dot com
Changed. Looks like the runtime var is getting turned on and
off... what's up wit dat?! :)
 [2001-05-01 20:15 UTC] zak@php.net
Could you post the relevant section of your php.ini file?
 [2001-05-01 20:17 UTC] phpbug at samrowe dot com
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off    

 [2001-05-01 20:25 UTC] zak@php.net
If this:

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.magic_quotes_runtime = Off    

is literal, it should be:

; Magic quotes for runtime-generated data, e.g. data from
SQL, from exec(), etc.
magic_quotes_runtime = Off    


 [2001-05-01 20:36 UTC] phpbug at samrowe dot com
yea, lost a line break in there... it's as it should be in
the php.ini. Sorry about that.
 [2001-05-01 20:54 UTC] zak@php.net
The php.ini parser may behave strangely when presented with broken lines, semi-randomly turning features on and off.  

IMHO not a giant issue - if I get a chance, I will take a closer look at it.
 [2001-05-01 21:05 UTC] phpbug at samrowe dot com
Semi-randomly?

There are no odd lines in my php.ini...

I need this to work for my app! :)
 [2001-05-01 21:19 UTC] zak@php.net
Damn... misread last comment. Have asked user to send me relevant code.  I would guess that something simple to fix on here...
 [2001-05-01 23:07 UTC] zak@php.net
Hmmm... maybe we do have a bug here...

There are no calls to magic_quotes_runtime().
There are no includes, requires or auto_(pre|ap)pend_files.
The php.ini files and apache conf files don't set magic_quotes_runtime.
And there are no other scripts on the box that call magic_quotes_runtime() or set_ini ('magic_quotes_runtime', 'On');

So, right now it does seem that magic_quotes_runtime does to randomly turn on and off.

Calls to get_magic_quotes_runtime() accurately report whether magic_quotes_runtime is active, while phpinfo() reports that magic_quotes_runtime is off - both locally and the master value.

Initial reports indicated that the bug may have been related to file(), however, the problem can be reproduced using fopen() as well - see http://airbag.tss.peachnet.edu/~sam/fopen.php and http://airbag.tss.peachnet.edu/~sam/fopen.txt.

Anyone have any ideas here - I am coming up blank.

 [2001-05-09 11:12 UTC] sniper@php.net
Marked as to be fixed before 4.0.6
 [2001-05-10 09:27 UTC] zeev@php.net
Do you have any settings for magic_quotes_runtime in your httpd.conf or .htaccess files?
 [2001-05-10 09:38 UTC] zeev@php.net
Also, has anybody managed to reproduce it?  I can't.
 [2001-05-15 08:55 UTC] phpbug at samrowe dot com
updating to today's (4-15-01) CVS fixed it...


 [2001-05-15 08:58 UTC] kalowsky@php.net
user notes fixed in cvs
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 06 03:01:28 2020 UTC