Bug #69436 [NEW]: .user.ini in DOCUMENT_ROOT will not be found

From: Date: Mon, 13 Apr 2015 13:19:13 +0000
Subject: Bug #69436 [NEW]: .user.ini in DOCUMENT_ROOT will not be found
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192015@lists.php.net to get a copy of this message
From: jan dot starke at t-systems dot com Operating system: any PHP version: master-Git-2015-04-13 (Git) Package: Directory function related Bug Type: Bug Bug description:.user.ini in DOCUMENT_ROOT will not be found Description: ------------ considering the current implementation of php_cgi_ini_activate_user_config in cgi_main.c, .user.ini will never be read if the current working equals DOCUMENT_ROOT: <code> ptr = s2 + start; /* start is the point where doc_root ends! */ /* the following condition will never be true, because ptr points to the last character of the directory name (see above), which is, by implementation, no DEFAULT_SLASH. */ while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) { /*...*/ } </code> Expected result: ---------------- .user.ini will be read, if it is stored in DOCUMENT_ROOT, or in the runtime folder of the application server (i.e. php-cgi), no matter if both folders are identical. Actual result: -------------- If .user.ini is stored in DOCUMENT_ROOT, and your application server has DOCUMENT_ROOT as runtime folder, then .user.ini will not be read. If you change DOCUMENT_ROOT to something invalid, and make the application server run in the folder where .user.ini is stored, then .user.ini will be read. -- Edit bug report at https://bugs.php.net/bug.php?id=69436&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69436&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69436&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69436&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69436&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69436&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69436&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69436&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69436&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69436&r=support Expected behavior: https://bugs.php.net/fix.php?id=69436&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69436&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69436&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69436&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69436&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69436&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69436&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69436&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69436&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69436&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69436&r=mysqlcfg

« previous php.bugs (#192015) next »