[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=13130&edit=1


-- 
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]




[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=13130&edit=1


-- 
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]




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

2001-09-04 Thread wim

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
'/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 bug report at: http://bugs.php.net/?id=13130&edit=1


-- 
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]




[PHP-DEV] Bug #12118: Apache crashes without error after some time of running

2001-07-12 Thread wim

From: [EMAIL PROTECTED]
Operating system: RedHat 6.2 - Kernel 2.4.1
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  Apache crashes without error after some time of running

Apache starts fine, error_log giving no errors at all. After a while, it
suddenly isn't running anymore, with still nothing in error_log.

When compiling php with --enable-debug and then starting with gdb, I get
:


/usr/local/apache/bin>gdb httpd
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
Cannot access memory at address 0x19
(gdb) bt
#0  _dl_debug_state () at dl-debug.c:56
#1  0x4000ac7b in _dl_catch_error (errstring=0xbfffd760, operate=0x40182970
, args=0xbfffd764) at dl-error.c:141
#2  0x40182d1d in _dl_open (file=0x8213358
"/usr/local/apache/libexec/libphp4.so", mode=258, caller=0xbfffd760) at
dl-open.c:232
#3  0x400a03d3 in dlopen_doit (a=0xbfffd874) at dlopen.c:41
#4  0x4000ac7b in _dl_catch_error (errstring=0x400a2080, operate=0x400a03a8
, args=0xbfffd874) at dl-error.c:141
#5  0x400a08b9 in _dlerror_run (operate=0x400a03a8 ,
args=0xbfffd874) at dlerror.c:125
#6  0x400a0393 in __dlopen_check (file=0x8213358
"/usr/local/apache/libexec/libphp4.so", mode=258) at dlopen.c:53
#7  0x80be811 in ap_os_dso_load () at lstat.c:45
#8  0x8086d38 in load_module () at lstat.c:45
#9  0x80a2e4e in invoke_cmd () at lstat.c:45
#10 0x80a3793 in ap_handle_command () at lstat.c:45
#11 0x80a3829 in ap_srm_command_loop () at lstat.c:45
#12 0x80a3e80 in ap_process_resource_config () at lstat.c:45
#13 0x80a4762 in ap_read_config () at lstat.c:45
#14 0x80ae3a1 in standalone_main () at lstat.c:45
#15 0x80aec23 in main () at lstat.c:45
#16 0x400bc9cb in __libc_start_main (main=0x80ae8cc , argc=2,
argv=0xbadc, init=0x8065e20 <_init>, 
fini=0x815491c <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbad4) at ../sysdeps/generic/libc-start.c:92
(gdb) 


Could this be the cause ???
-- 
Edit bug report at: http://bugs.php.net/?id=12118&edit=1


-- 
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]




[PHP-DEV] Bug #12070: "Error: invalid number of arguments (at least 1 expected)" during compilation

2001-07-11 Thread wim

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 6.2 - kernel 2.4.1
PHP version:  4.0.6
PHP Bug Type: Compile Warning
Bug description:  "Error: invalid number of arguments (at least 1 expected)" during 
compilation

When compiling PHP, when I do a make install, I get :
installing shared modules into
/usr/local/lib/php/extensions/no-debug-non-zts-20001222
make[1]: Leaving directory `/second/install/php-4.0.6'
Making install in pear
make[1]: Entering directory `/second/install/php-4.0.6/pear'
make[2]: Entering directory `/second/install/php-4.0.6/pear'
shtool:mkdir:Error: invalid number of arguments (at least 1 expected)
shtool:mkdir:Hint:  run `/second/install/php-4.0.6/build/shtool mkdir -h'
or `man shtool' for details
+--+
| The installation process is incomplete. The following resources were |
| not installed:   |
|  |
|   Self-contained Extension Support   |
|   PEAR: PHP Extension and Add-on Repository  |
|  |
| To install these components, become the superuser and execute:   |
|  |
|   # make install-su  |
+--+
make[2]: *** [install-data-local] Error 5
make[2]: Leaving directory `/second/install/php-4.0.6/pear'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/second/install/php-4.0.6/pear'
make: *** [install-recursive] Error 1


I'm running it as superuser, so that's not the problem.
My configure statement is :
./configure  --with-apxs=/usr/local/apache/bin/apxs --with-imap
--enable-versioning --enable-ftp --with-mysql=/usr/local/mysql
--with-gd=/usr/local/gd --with-snmp=/usr/local/snmp
--with-openssl=/usr/local/ssl --enable-dbase --with-pear --with-mcrypt
--with-dom --with-pcre --with-zlib-dir=/usr

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


-- 
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]




[PHP-DEV] Bug #12069: Another "MySQL: Unable to save result set in" problem... not solved...

2001-07-11 Thread wim

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 6.2 - Kernel 2.4.1
PHP version:  4.0.6
PHP Bug Type: MySQL related
Bug description:  Another "MySQL: Unable to save result set in" problem... not 
solved...

Warning: MySQL: Unable to save result set in
/hosting/tarieven.be/www/html/counter.php on line 38
 
This particular line is :
mysql_query("update counter set count=count+1 where (type='total' and
var='hits')");

I've read all other bug reports on this bug and followed the suggestions,
but none of them works.
I've reinstalled MySQL, recompiled PHP (removed every file, removed the
source, untarred it again, etc.). I've looked at the correct socket in
php.ini, but that doesn't change anything either.


The query works fine, but it still gives the error...
-- 
Edit bug report at: http://bugs.php.net/?id=12069&edit=1


-- 
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]




[PHP-DEV] Re: Bug #12059: Apache gives "Document contains no data" and segmentation fault 11

2001-07-11 Thread Wim Godden

Deleteing /usr/local/lib/php and /usr/local/include/php and then doing
make install fixes the problem. You guys should pay more attention to
upgrading problems...


PHP Bug Database wrote:
> 
> From: [EMAIL PROTECTED]
> Operating system: RedHat Linux 6.2 (Kernel 2.4.1)
> PHP version:  4.0.6
> PHP Bug Type: Reproducible crash
> Bug description:  Apache gives "Document contains no data" and segmentation fault 11
> 
> PHP 4.0.3pl1 worked fine, but I wanted to upgrade to 4.0.6 for the bug
> fixes. After upgrading, php pages will give a "Document contains no data"
> in Netscape and the logfile of Apache says :
> 
> [Wed Jul 11 00:05:55 2001] [notice] child pid 14370 exit signal
> Segmentation fault (11), possible coredump in /usr/local/apache
> 
> I followed the instructions for gdb backtrace and this is what I get :
> 
> gdb /usr/local/apache/bin/httpd /tmp/core
> 
> GNU gdb 19991004
> 
> Copyright 1998 Free Software Foundation, Inc.
> 
> GDB is free software, covered by the GNU General Public License, and you
> are
> 
> welcome to change it and/or distribute copies of it under certain
> conditions.
> 
> Type "show copying" to see the conditions.
> 
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> 
> This GDB was configured as "i386-redhat-linux"...
> 
> Core was generated by `/usr/local/apache/bin/httpd -DSSL'.
> 
> Program terminated with signal 11, Segmentation fault.
> 
> Reading symbols from /lib/libm.so.6...done.
> 
> Reading symbols from /lib/libcrypt.so.1...done.
> 
> Reading symbols from /lib/libdb.so.3...done.
> 
> Reading symbols from /lib/libdl.so.2...done.
> 
> Reading symbols from /lib/libc.so.6...done.
> 
> Reading symbols from /lib/ld-linux.so.2...done.
> 
> Reading symbols from /lib/libnss_files.so.2...done.
> 
> Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
> 
> Reading symbols from /usr/local/apache/libexec/libphp3.so...done.
> 
> Reading symbols from /usr/local/lib/libgd.so.3...done.
> 
> Reading symbols from /usr/lib/libpng.so.2...done.
> 
> Reading symbols from /usr/lib/libz.so.1...done.
> 
> Reading symbols from
> /usr/local/mysql/lib/mysql/libmysqlclient.so.6...done.
> 
> Reading symbols from /usr/lib/libgdbm.so.2...done.
> 
> Reading symbols from /lib/libpam.so.0...done.
> 
> Reading symbols from /lib/libresolv.so.2...done.
> 
> Reading symbols from /lib/libnsl.so.1...done.
> 
> Reading symbols from /usr/local/apache/libexec/libphp4.so...done.
> 
> Reading symbols from
> /usr/local/mysql/lib/mysql/libmysqlclient.so.10...done.
> 
> Reading symbols from /usr/lib/libttf.so.2...done.
> 
> Reading symbols from /usr/local/apache/libexec/mod_throttle.so...done.
> 
> #0  _dl_lookup_versioned_symbol (undef_name=0x8058a78 "setgid",
> ref=0xb904, symbol_scope=0x0, reference_name=0x40010c67 "",
> 
> version=0x400a32e0, reloc_type=7) at do-lookup.h:82
> 
> 82  do-lookup.h: No such file or directory.
> 
> (gdb) bt
> 
> #0  _dl_lookup_versioned_symbol (undef_name=0x8058a78 "setgid",
> ref=0xb904, symbol_scope=0x0, reference_name=0x40010c67 "",
> 
> version=0x400a32e0, reloc_type=7) at do-lookup.h:82
> 
> #1  0x4000a83d in fixup (l=0x40013f30, reloc_offset=3367) at
> dl-runtime.c:81
> 
> #2  0x4000a9b0 in _dl_runtime_resolve () at dl-runtime.c:182
> 
> #3  0x80ae679 in child_main () at lstat64.c:44
> 
> #4  0x80aedcc in make_child () at lstat64.c:44
> 
> #5  0x80af146 in perform_idle_server_maintenance () at lstat64.c:44
> 
> #6  0x80af675 in standalone_main () at lstat64.c:44
> 
> #7  0x80afc43 in main () at lstat64.c:44
> 
> #8  0x400bc9cb in __libc_start_main (main=0x80af8ec , argc=2,
> argv=0xbafc, init=0x8065e70 <_init>,
> 
> fini=0x8155c7c <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
> stack_end=0xbaf4) at ../sysdeps/generic/libc-start.c:92
> 
> (gdb)
> --
> Edit bug report at: http://bugs.php.net/?id=12059&edit=1


-- 
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]




[PHP-DEV] Bug #12059: Apache gives "Document contains no data" and segmentation fault 11

2001-07-11 Thread wim

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 6.2 (Kernel 2.4.1)
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  Apache gives "Document contains no data" and segmentation fault 11

PHP 4.0.3pl1 worked fine, but I wanted to upgrade to 4.0.6 for the bug
fixes. After upgrading, php pages will give a "Document contains no data"
in Netscape and the logfile of Apache says : 
[Wed Jul 11 00:05:55 2001] [notice] child pid 14370 exit signal
Segmentation fault (11), possible coredump in /usr/local/apache

I followed the instructions for gdb backtrace and this is what I get :

gdb /usr/local/apache/bin/httpd /tmp/core 
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `/usr/local/apache/bin/httpd -DSSL'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libdb.so.3...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Reading symbols from /usr/local/apache/libexec/libphp3.so...done.
Reading symbols from /usr/local/lib/libgd.so.3...done.
Reading symbols from /usr/lib/libpng.so.2...done.
Reading symbols from /usr/lib/libz.so.1...done.
Reading symbols from
/usr/local/mysql/lib/mysql/libmysqlclient.so.6...done.
Reading symbols from /usr/lib/libgdbm.so.2...done.
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /usr/local/apache/libexec/libphp4.so...done.
Reading symbols from
/usr/local/mysql/lib/mysql/libmysqlclient.so.10...done.
Reading symbols from /usr/lib/libttf.so.2...done.
Reading symbols from /usr/local/apache/libexec/mod_throttle.so...done.
#0  _dl_lookup_versioned_symbol (undef_name=0x8058a78 "setgid",
ref=0xb904, symbol_scope=0x0, reference_name=0x40010c67 "", 
version=0x400a32e0, reloc_type=7) at do-lookup.h:82
82  do-lookup.h: No such file or directory.
(gdb) bt
#0  _dl_lookup_versioned_symbol (undef_name=0x8058a78 "setgid",
ref=0xb904, symbol_scope=0x0, reference_name=0x40010c67 "", 
version=0x400a32e0, reloc_type=7) at do-lookup.h:82
#1  0x4000a83d in fixup (l=0x40013f30, reloc_offset=3367) at
dl-runtime.c:81
#2  0x4000a9b0 in _dl_runtime_resolve () at dl-runtime.c:182
#3  0x80ae679 in child_main () at lstat64.c:44
#4  0x80aedcc in make_child () at lstat64.c:44
#5  0x80af146 in perform_idle_server_maintenance () at lstat64.c:44
#6  0x80af675 in standalone_main () at lstat64.c:44
#7  0x80afc43 in main () at lstat64.c:44
#8  0x400bc9cb in __libc_start_main (main=0x80af8ec , argc=2,
argv=0xbafc, init=0x8065e70 <_init>, 
fini=0x8155c7c <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbaf4) at ../sysdeps/generic/libc-start.c:92
(gdb) 
-- 
Edit bug report at: http://bugs.php.net/?id=12059&edit=1


-- 
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]




RE: [PHP-DEV] PHP 4.0 Bug #4822 Updated: Uploading in safe mode

2001-04-17 Thread Wim Godden

This message was sent from Geocrawler.com by "Wim Godden" <[EMAIL PROTECTED]>

There is an solution for this, change php.ini directive:

upload_tmp_dir = ./tmp/ 

Then users have their own tmp-dir where uploads are located.

--
That still doesn't solve permission problems, as this directory needs to be owned by 
nobody/nobody to get the file in there and that file will then again not be accessible 
in safe 
mode.


Geocrawler.com - The Knowledge Archive

-- 
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]