|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23672 safe_mode in certain cases not displayed in phpinfo() output
Submitted: 2003-05-17 10:02 UTC Modified: 2011-01-01 20:50 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Assigned: jani (profile)
Status: Closed Package: Safe Mode/open_basedir
PHP Version: 4.3.2RC3 OS: FreeBSD 4.8-STABLE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
39 - 36 = ?
Subscribe to this entry?

 [2003-05-17 10:02 UTC]
For some odd reason when I enable safe mode on a virtual host on apache 1.3.27 (not using the option in my php.ini file) it does not display that directive safe_mode has a local value "on" in the phpinfo() output.  It shows local value of directive safe_mode is off even when it is on.

"Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1000 is not allowed to access /home/jacques/cvsstuff/php/phpweb/backend/ip-to-country.idx owned by uid 0 in /usr/home/jacques/cvsstuff/php/phpweb/include/ on line 90"

Yes I've confirmed that safe_mode is on (busy rsyncing the backend stuff for my local checked out copy of phpweb where I've enabled safe_mode to test my findings from my main production webservers.

In my httpd.conf I have in the following lines added to my 


     # Webroot of PHP mirror site
     DocumentRoot /home/jacques/cvsstuff/php/phpweb

     # These PHP settings are necessary to run a mirror
     php_value include_path .:/home/jacques/cvsstuff/php/phpweb/include
     php_flag register_globals on

     # Log server activity
     ErrorLog /var/log/php-error_log
     TransferLog /var/log/php-access_log

     # Set directory index
     DirectoryIndex index.php

     # Set mirror's preferred language here
     SetEnv MIRROR_LANGUAGE "en"

     # The next lines are only necessary if you would
     # like to provide local search support (see below)
     SetEnv HTSEARCH_PROG /usr/local/etc/htdig/
     SetEnv HTSEARCH_EXCLUDE "/print/ /printwn/ /manual/howto/ /cal.php"

    <IfModule mod_php4.c>
        php_admin_flag engine on
        php_admin_flag magic_quotes_gpc off
        php_admin_value safe_mode on
        php_admin_value open_basedir "/home/jacques/cvsstuff/php/phpweb:/tmp"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 20:50 UTC]
-Status: Open +Status: Closed -Type: Feature/Change Request +Type: Bug -Package: Feature/Change Request +Package: Safe Mode/open_basedir -Assigned To: +Assigned To: jani
 [2011-01-01 20:50 UTC]
Quite likely fixed in 5.x.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 12:03:36 2021 UTC