php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45994 "\" directive in php.ini, DISABLES ALL non-built-in php extensions
Submitted: 2008-09-04 13:54 UTC Modified: 2009-02-11 23:13 UTC
From: ipseno at yahoo dot com Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 5.3.0alpha2 OS: Windows XP SP3
Private report: No CVE-ID: None
 [2008-09-04 13:54 UTC] ipseno at yahoo dot com
Description:
------------
upload_tmp_dir directive in php.ini, DISABLES ALL non-built-in php extensions

To recreate this:

In php.ini set:
	upload_tmp_dir = "E:\"
	

create .php file
<?php


		phpinfo();


?>

Under windows xp sp3 Apache/2.2.9b, parse it by php-cgi.exe

Now skip to upload_tmp_dir section, of generated page and look at a HUGE part of php.ini copied in that filed!
That is...,  everything from line upload_tmp_dir = "E:\", till the end of php.ini

Commenting it out in php.ini.
	;upload_tmp_dir = "E:\"
	
OR shifting slash!!!
	upload_tmp_dir = "E:/"
	
...fixes it and enables all extensions again!

Actual result:
--------------
This is VERY POSSIBLE SOLUTION to:

Bug #13290  	extension_dir directive is not working

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-04 14:20 UTC] ipseno at yahoo dot com
Actually...
"\" at the END of ANY directive in php.ini breaks configuration under WinXP

Ie:
   error_log = "E:\php-5.3.0alpha2\error.log\"
   variables_order = "GPCS\"
 [2008-09-04 14:46 UTC] ipseno at yahoo dot com
Wait, wait...
Now I know, why did I posted this question...

Now I reverted PHP to version 5.2.6
And there is NO problems with:

   upload_tmp_dir = "E:\"

BUT, when i copy that php.ini file to PHP 5.3 alpha2
THEN

   upload_tmp_dir = "E:\"

causes behavior as explained above.

That is a reason why did I cretaed this "bug" report

In 5.2.6 "\" doesn't escape, but in 5.3 alpha2 it does!
How come?!
 [2008-09-04 16:22 UTC] johannes@php.net
We're talking about ini files here, we always had different rules in ini files than regular code!

Not sure if this is caused by Jani's improvements in the parsing or by some re2c work, but it should certainly work as before else many Windows users will have this issue!
 [2008-09-04 20:46 UTC] jani@php.net
As mentioned on the internals list, this should cause a syntax error.
Much like in PHP code this would not work:

<?php $foo = "bar\"; ?>
 [2008-09-12 13:19 UTC] ipseno at yahoo dot com
Thanks.
I'll "play" with it...
 [2008-09-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-02-11 21:27 UTC] felipe@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-02-11 23:07 UTC] ipseno at yahoo dot com
I've tested this 5.3.0beta2-dev for "\" problem and all seems to work well.

Keep the good work! ;)
 [2009-02-11 23:13 UTC] felipe@php.net
Nice. Thanks for the feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 17:01:30 2024 UTC