php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #19217 safe_mode defaulting to "on", docs say "off"
Submitted: 2002-09-03 15:33 UTC Modified: 2002-09-04 08:38 UTC
From: roland at astrofoto dot org Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.2.2 OS: RedHat 7.2/Linux 2.4.9
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: roland at astrofoto dot org
New email:
PHP Version: OS:

 

 [2002-09-03 15:33 UTC] roland at astrofoto dot org
safe_mode is documented to default to "off".  However, after an upgrade from PHP 4.1.2 to 4.2.2, a call to 

    fopen ("/tmp/mkimg.log", "a");

began to fail.  In order to correct the problem, I had to add a line

    php_admin_value safe_mode off

to my Apache configuration.  Note that this is Apache 1.3.22.  The webserver is an Apache virtual host distinguished by IP address.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-03 15:36 UTC] rasmus@php.net
Check your php.ini file or the compile flags on your particular compiled version.  The default is definitely still off in the code.
 [2002-09-03 20:23 UTC] roland at astrofoto dot org
I don't have a php.ini and PHP was compiled with the following configure:

 ./configure  --prefix=/usr --with-config-file-path=/etc --disable-debug --enable-inline-optimization --with-apxs=/usr/sbin/apxs --with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd --with-jpeg-dir=/usr --with-png --with-zlib --with-db2 --with-db3 --with-gdbm --enable-debugger --enable-magic-quotes --enable-safe-mode --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-yp --enable-ftp --without-mysql --with-xml --with-pgsql --enable-bcmath --enable-exif --enable-ctype

The only place anything appears that would set safe_mode is my newly added php_admin_value setting.

Is there some other place I need to look?
 [2002-09-04 05:09 UTC] sniper@php.net
Your configure line. You're enabling it there.

--enable-safe-mode

Remove that, and it will be off.

 [2002-09-04 08:38 UTC] roland at astrofoto dot org
Doh!  I'm an idiot.  I'll plead sleep deprivation.

I did copy the config from 4.1.2 and didn't look close enough since 4.1.2 didn't enforce safe_mode for fopen().

Sorry to waste everyone's time....
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 14:01:31 2025 UTC