Bug 76974 - Turning on safe_mode breaks php with apache 2
Summary: Turning on safe_mode breaks php with apache 2
Status: CLOSED DUPLICATE of bug 74396
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-30 14:27 UTC by Denice
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-10-30 14:27:35 UTC

Attachments (Terms of Use)

Description Denice 2002-10-30 14:27:27 UTC
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:
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:

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

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:

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:

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

Comment 1 Joe Orton 2002-11-01 14:26:30 UTC

*** 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.