php.net |  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
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jacques@php.net 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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jacques@php.net
New email:
PHP Version: OS:

 

 [2003-05-17 10:02 UTC] jacques@php.net
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/ip-to-country.inc 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 
NameVirtualHost 192.168.0.64

<VirtualHost 192.168.0.64>
    ServerName 192.168.0.64
    ServerAlias phpweb.labs.ataris.co.za
    ServerAdmin yourname@yourdomain.com

     # 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/htphp.sh
     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"
    </IfModule>
</VirtualHost>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 20:50 UTC] jani@php.net
-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] jani@php.net
Quite likely fixed in 5.x.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC