[PHP-DEV] Bug #13130 Updated: Safe mode refuses to allow permission

2001-09-23 Thread wim

ID: 13130
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Apache related
Operating System: RedHat Linux 6.2, kernel 2.4.1
PHP Version: 4.0.6
New Comment:

Any news yet related to this problem ???

Previous Comments:


[2001-09-04 08:24:50] [EMAIL PROTECTED]

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
'/home/photo-user/html/pictures/05090027.JPG'
for writing in /home/photo-user/html/functions.inc.php 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 this bug report at http://bugs.php.net/?id=13130edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13130 Updated: Safe mode refuses to allow permission

2001-09-23 Thread jeroen

ID: 13130
Updated by: jeroen
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Apache related
Operating System: RedHat Linux 6.2, kernel 2.4.1
PHP Version: 4.0.6
New Comment:

I think it's general permission problem too. But not like you do.

Keep in mind that the webserver runs under the user as defined in you httpd.conf. 
Safe-mode cannot and does not change that. So _first_ safe-mode must allow it, and 
_second_ apache needs to have write permissions to that file. In you case, safe-mode 
does allow it (otherwise you'd get a safe-mode error), but your general permissions 
aren't set correctly.

Not a bug. (by the way, you should have asked this on a support forum, 
www.php.net/support.php )

Previous Comments:


[2001-09-23 12:25:32] [EMAIL PROTECTED]

Any news yet related to this problem ???



[2001-09-04 08:24:50] [EMAIL PROTECTED]

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
'/home/photo-user/html/pictures/05090027.JPG'
for writing in /home/photo-user/html/functions.inc.php 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 this bug report at http://bugs.php.net/?id=13130edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13130 Updated: Safe mode refuses to allow permission

2001-09-23 Thread wim

ID: 13130
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Apache related
Operating System: RedHat Linux 6.2, kernel 2.4.1
PHP Version: 4.0.6
New Comment:

So, to be able to use safe mode, you should run Apache as root ???

I start Apache as root, but the default user/group is nobody/nobody.

Previous Comments:


[2001-09-23 13:51:35] [EMAIL PROTECTED]

I think it's general permission problem too. But not like you do.

Keep in mind that the webserver runs under the user as defined in you httpd.conf. 
Safe-mode cannot and does not change that. So _first_ safe-mode must allow it, and 
_second_ apache needs to have write permissions to that file. In you case, safe-mode 
does allow it (otherwise you'd get a safe-mode error), but your general permissions 
aren't set correctly.

Not a bug. (by the way, you should have asked this on a support forum, 
www.php.net/support.php )



[2001-09-23 12:25:32] [EMAIL PROTECTED]

Any news yet related to this problem ???



[2001-09-04 08:24:50] [EMAIL PROTECTED]

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
'/home/photo-user/html/pictures/05090027.JPG'
for writing in /home/photo-user/html/functions.inc.php 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 this bug report at http://bugs.php.net/?id=13130edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13130 Updated: Safe mode refuses to allow permission

2001-09-23 Thread jeroen

ID: 13130
Updated by: jeroen
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Apache related
Operating System: RedHat Linux 6.2, kernel 2.4.1
PHP Version: 4.0.6
New Comment:

The answer is no, of course :-)

Ask your question via php-general / php-install (more details: 
http://www.php.net/support.php ) for more info.

BTW, safe mode is STRICTER than normal mode, your problems have NOTHING to do with 
safe-mode.

Previous Comments:


[2001-09-23 14:04:39] [EMAIL PROTECTED]

So, to be able to use safe mode, you should run Apache as root ???

I start Apache as root, but the default user/group is nobody/nobody.



[2001-09-23 13:51:35] [EMAIL PROTECTED]

I think it's general permission problem too. But not like you do.

Keep in mind that the webserver runs under the user as defined in you httpd.conf. 
Safe-mode cannot and does not change that. So _first_ safe-mode must allow it, and 
_second_ apache needs to have write permissions to that file. In you case, safe-mode 
does allow it (otherwise you'd get a safe-mode error), but your general permissions 
aren't set correctly.

Not a bug. (by the way, you should have asked this on a support forum, 
www.php.net/support.php )



[2001-09-23 12:25:32] [EMAIL PROTECTED]

Any news yet related to this problem ???



[2001-09-04 08:24:50] [EMAIL PROTECTED]

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
'/home/photo-user/html/pictures/05090027.JPG'
for writing in /home/photo-user/html/functions.inc.php 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 this bug report at http://bugs.php.net/?id=13130edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]