ID:               38566
 User updated by:  noc at smartterra dot de
 Reported By:      noc at smartterra dot de
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: FreeBSD 5.3
 PHP Version:      4.4.4
 New Comment:

Hm,

sometimes this bug is still present with my new setup:

PHP Warning:  Unknown(): SAFE MODE Restriction in effect.  The script
whose uid/gid is 0/0 is not al
lowed to access /usr/home/phpissue owned by uid/gid 1025/1025 in
Unknown on line 0

"Don't halloo till you're out of the wood!" :-(


Previous Comments:
------------------------------------------------------------------------

[2006-09-05 20:17:19] noc at smartterra dot de

I set up a completly new system with FreeBSd 6.1, Apache 2.0.59 and
PHP4.4.4 - it works for me without any problems.

------------------------------------------------------------------------

[2006-09-05 10:21:04] info at nrg-systems dot de

We have the same PHP warning messages in our log files since we've
upgraded from 4.3.11 to 4.4.2 (also with 4.4.3 and 4.4.4). It looks
like as every file access (including static HTML pages and even images)
from the Apache server results in this PHP message. But the files are
delivered to the clients browser.

Especially the part "in Unknown on line 0" is an evidence that the PHP
check is called even for non-PHP scripts.

------------------------------------------------------------------------

[2006-08-24 09:24:17] noc at smartterra dot de

I saved a copy here: http://smartterra.de/phpissue.html

------------------------------------------------------------------------

[2006-08-24 09:16:09] [EMAIL PROTECTED]

>When it helps I can provide the complete output of phpinfo().
Put it somewhere in the net and paste the link here.

------------------------------------------------------------------------

[2006-08-24 09:07:46] noc at smartterra dot de

I hope the following information provides enough details:

I updated a FreeBSD 5.3 system to the newest apache and php-version
(2.0.59 and 4.4.4), running mod_php4 configured in the httpd.conf:

LoadModule php4_module        libexec/apache2/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

To reproduce this bug I configured a single virtual host within the
apache configuration with the following php related options:

  php_admin_flag engine on
  php_admin_value open_basedir /usr/home/phpissue/
  php_admin_value upload_tmp_dir /usr/home/phpissue/temp
  php_admin_value doc_root /usr/home/phpissue/
  php_admin_value user_dir /usr/home/phpissue/
  php_admin_value session.save_path /usr/home/phpissue/temp
  php_admin_flag safe_mode On
  php_admin_value safe_mode_exec_dir /usr/home/phpissue/


I would like to mention that the configuration works with an older
version of apache und php (sorry, I don't know which version as I
didn't wrote them down) without any modifcation.

In the DocumentRoot of the vhost I created a simple index.html file
which only contains one word. So I expected to view this word
(PHPISSUE) in my browser when I point the browser to this site.

But instead I get this message:

Warning: Unknown(): SAFE MODE Restriction in effect. The script whose
uid/gid is 80/80 is not allowed to access /usr/home/phpissue owned by
uid/gid 0/0 in Unknown on line 0
PHPISSUE 

When I restart apache everything works fine and I only get:

PHPISSUE

But after a few minutes the same error message appears again. For
testing purposes I deactivated the safe-mode for this vhost in the
apache configuration:

  php_admin_flag safe_mode Off
  
I still get the error message mentioned above.

The apache error.log for this vhost says:

[Thu Aug 24 10:59:01 2006] [error] [client 10.0.0.32] PHP Warning: 
Unknown(): SAFE MODE Restriction in effect.  The script whose uid/gid
is 80/80 is not 
allowed to access /usr/home/phpissue owned by uid/gid 0/0 in Unknown on
line 0

When I deactivate php for this vhost completly (php_admin_flag engine
off) I will get the expected printout without any error message.

With PHP I'm running the following extensions:

extension=pdf.so
extension=tokenizer.so
extension=xml.so
extension=gd.so
extension=mcrypt.so
extension=bcmath.so
extension=imap.so
extension=sysvshm.so
extension=session.so
extension=mysql.so
extension=zlib.so
extension=domxml.so
extension=ftp.so
extension=posix.so
extension=sysvmsg.so
extension=mbstring.so
extension=pcre.so
extension=calendar.so
extension=overload.so
extension=snmp.so
extension=sockets.so
extension=sysvsem.so
extension=bz2.so
extension=ctype.so

I already removed eAccelerator and ZendOptimizer because I assumed one
of these as the causer of this bug. But I was wrong.

When it helps I can provide the complete output of phpinfo().

Thank you,

Falk

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38566

-- 
Edit this bug report at http://bugs.php.net/?id=38566&edit=1

Reply via email to