From:             [EMAIL PROTECTED]
Operating system: RedHat Linux 6.2, kernel 2.4.1
PHP version:      4.0.6
PHP Bug Type:     Apache related
Bug description:  Safe mode refuses to allow permission

Safe mode appears to be malfunctioning. I've enabled safe mode for the
whole server, php scripts appear to work fine, but when a php script
attempts to write a file (in a directory owned by the same user as the php
script), php complains it can't write.
For example, using imagejpeg to export a jpeg file, results in :
    Warning: imagejpeg: unable to open
    for writing in /home/photo-user/html/ on
    line 35

Using fopen to write a file gives the same result, so I believe it to be a
general permission problem.

Also, when I try to use convert (image conversion utility), located in
/usr/local/bin (I have added php_admin_value safe_mode_exec_dir
/usr/local/bin/ to the Apache config), I get a shell return value of 154
(can't find what it means). PHP should be able to execute that file and
have it converting images (writing them back to the directory owned by the
user running the php script).

The full configure :
./configure  --with-apxs=/usr/local/apache/bin/apxs --with-imap
--enable-versioning --enable-ftp --with-mysql=/usr/local/mysql
--with-snmp=/usr/local/snmp --with-openssl=/usr/local/ssl --enable-dbase
--enable-debug --with-pear --with-mcrypt --with-dom --with-pcre
--with-zlib-dir=/usr --with-jpeg-dir --with-gd --enable-exif
Edit bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to