Bug 76974 - Turning on safe_mode breaks php with apache 2
Turning on safe_mode breaks php with apache 2
Status: CLOSED DUPLICATE of bug 74396
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-30 09:27 EST by Denice
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-30 09:27:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Denice 2002-10-30 09:27:27 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
This is a known bug for apache 2.0 and PHP:
  http://bugs.php.net/bug.php?id=17858
It would be nice to have this bug fixed in the next patch cycle for PHP. As I
note a bit further down, there are also some problems with php directives which
do not work from within the apache configration files at php-4.2.2-8.0.5.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.change safe_mode to 'On' in /etc/php.ini
2.restart apache
3.open any php URL served by your website which comes from a properly moded php
file.
	

Actual Results:  Warning: SAFE MODE Restriction in effect. The script whose uid
is -1 is not allowed to access .....

Expected Results:  a correct php-generated web page

Additional info:

I grabbed a snapshot from http://snaps.php.net/ today: 
php4-STABLE-latest.tar.bz2 (which is named php4-STABLE-200210300000 in the
tarball) and rebuilt the rpm, taking note of the build bug reported at:
 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74819

This rebuilt version of php seems to function properly with apache 2, but I need
to do more testing. It also seems to fix some wierdness with php directives in a
virtual host context, as noted at:
 http://bugs.php.net/bug.php?id=17927

For example, the following kind of configuration works with this latest build I
did today, and does _not_ work with the php-4.2.2-8.0.5    rpm in RH 8.0:

    <IfModule sapi_apache2.c>
       php_admin_flag safe_mode  Off
       php_flag register_globals  On
       php_admin_value include_path "/var/www/myinc:."
       php_admin_flag allow_url_fopen  Off
       php_admin_flag file_uploads  On
       php_flag display_errors  On
    </IfModule>
Comment 1 Joe Orton 2002-11-01 09:26:30 EST

*** This bug has been marked as a duplicate of 74396 ***

Note You need to log in before you can comment on or make changes to this bug.