|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2009-03-09 05:09 UTC] r at pro-9 dot com
 Description: ------------ php_value open_basedir return error: php-cgi: PHP Warning: Adding option (Name: open_basedir Value: /www:/tmp (12, 10) failed! in Unknown on line 0 but other parameters, e.g php_value session.save_path is fine. Reproduce code: --------------- htscanner.ini file: extension="htscanner.so" config_file=".htaccess" default_docroot="/" default_ttl=300 stop_on_error = 0 safe_mode in php.ini is Off open_basedir in php.ini is undefined (phpinfo say: no value) .htaccess file: php_value session.save_path /var/tmp php_value open_basedir /www:/tmp Expected result: ---------------- session.save_path /var/tmp open_basedir /www:/tmp Actual result: -------------- session.save_path /var/tmp open_basedir no value PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 03:00:01 2025 UTC | 
Thank you for taking the time to write to us, but this is not a bug. Well, it is Monday morning :) open_basedir cannot (and should not) be overwritten using a per directory configuration option (from the www root). If not, it will defeat its whole purpose. Imagine someone simply changing it to \ and then do fopen("/etc/passwd"); Future versions of htscanner will allow the admins to set options per directory at the system level, which will be set during PHP's init phases. Something like what we have in 5.3: [PATH=/www/site1] open_basedir=/www/site1 Sorry to do not have replied that in the first place.