#38747 [NEW]: Segfault under load

2006-09-07 Thread michaelw at webcentral dot com dot au
From: michaelw at webcentral dot com dot au
Operating system: Solaris 10
PHP version:  4.4.4
PHP Bug Type: iPlanet related
Bug description:  Segfault under load

Description:

Crash occurs randomly when accessing PHP scripts using Sun Java Enterprise
Webserver 6.1 SP5.

In this case, I was using jmeter to generate some load and accessing a
page containing 

?
phpinfo()
?

PHP was configured with: ./configure  --prefix=/opt/php
--with-nsapi=/opt/SUNWwbsvr --enable-libgcc --enable-debug


Reproduce code:
---
?
phpinfo()
?

Expected result:

Standard phpinfo() response.

Actual result:
--
After a couple of hundred successful attempts, the webserver coredumps. 

GNU gdb 6.2.1
Copyright 2004 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 sparc-sun-solaris2.10...(no debugging symbols
found)...
Core was generated by `webservd -r /opt/SUNWwbsvr -d
/opt/SUNWwbsvr/https-hosting/config -n https-host'.
Program terminated with signal 11, Segmentation fault.

#0  0xfd818508 in zend_hash_move_forward_ex (ht=0xfd893538, pos=0x0) at
/opt/admin/build/php-4.4.4/Zend/zend_hash.c:1039
1039*current = (*current)-pListNext;
(gdb) bt
#0  0xfd818508 in zend_hash_move_forward_ex (ht=0xfd893538, pos=0x0) at
/opt/admin/build/php-4.4.4/Zend/zend_hash.c:1039
#1  0xfd6f487c in php_print_info (flag=-1, tsrm_ls=0x1084dd68) at
/opt/admin/build/php-4.4.4/ext/standard/info.c:504
#2  0xfd6f6a5c in zif_phpinfo (ht=0, return_value=0x108e3e70,
this_ptr=0x0, return_value_used=0, tsrm_ls=0x1084dd68)
at /opt/admin/build/php-4.4.4/ext/standard/info.c:885
#3  0xfd82e380 in execute (op_array=0xee37f68, tsrm_ls=0x1084dd68) at
/opt/admin/build/php-4.4.4/Zend/zend_execute.c:1675
#4  0xfd80d4ec in zend_execute_scripts (type=8, tsrm_ls=0x1084dd68,
retval=0x0, file_count=3)
at /opt/admin/build/php-4.4.4/Zend/zend.c:934
#5  0xfd79c870 in php_execute_script (primary_file=0xfab7faa8,
tsrm_ls=0x1084dd68) at /opt/admin/build/php-4.4.4/main/main.c:1752
#6  0xfd839ae4 in php4_execute (pb=0x59e9910, sn=0xe6e4270, rq=0xe6e42e8)
at /opt/admin/build/php-4.4.4/sapi/nsapi/nsapi.c:948
#7  0xff1cf9ec in
__1cNfunc_exec_str6FpnKFuncStruct_pnGpblock_pnHSession_pnHRequest__i_ ()
   from /opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#8  0xff1d0e0c in INTobject_execute () from
/opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#9  0xff1d5e3c in INTservact_service () from
/opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#10 0xff1d654c in INTservact_handle_processed () from
/opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#11 0xff218bf0 in __1cLHttpRequestUUnacceleratedRespond6Mpc_v_ () from
/opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#12 0xff2182e0 in __1cLHttpRequestNHandleRequest6MpnGnetbuf__i_ () from
/opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#13 0xff2166d8 in __1cNDaemonSessionDrun6M_v_ () from
/opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
#14 0xff106df4 in ThreadMain () from
/opt/SUNWwbsvr/bin/https/lib/libnsprwrap.so
#15 0xfedd0030 in _pt_root () from /usr/lib/mps/secv1/libnspr4.so
#16 0xfe03fda4 in _lwp_start () from /lib/libc.so.1
#17 0xfe03fda4 in _lwp_start () from /lib/libc.so.1



-- 
Edit bug report at http://bugs.php.net/?id=38747edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38747r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38747r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38747r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38747r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38747r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38747r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38747r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38747r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38747r=support
Expected behavior:http://bugs.php.net/fix.php?id=38747r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38747r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38747r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38747r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38747r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38747r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38747r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38747r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38747r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38747r=nozend

#36928 [NEW]: error_log with invalid arguments crashes PHP

2006-03-30 Thread michaelw at webcentral dot com dot au
From: michaelw at webcentral dot com dot au
Operating system: Solaris 9 / 
PHP version:  4.4.2
PHP Bug Type: Reproducible crash
Bug description:  error_log with invalid arguments crashes PHP

Description:

This was noticed by a developer making a typo ( , instead of . ) when
attempting to concat strings within the parameters of error_log. It is
reported as a bug because it causes a segfault in PHP which causes the
webserver to crash.

Reproduce code:
---
html
body
?php
error_log(commas can crash ,($_SERVER['HTTPS'] != 'off'));
?
p
Test../p
/body
/html


Expected result:

Presumably an error indicating that the 2nd parameter passed to error_log
is invalid.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.


(gdb) bt
#0  0xfedb451c in strlen () from /usr/lib/libc.so.1
#1  0xfee06f88 in _doprnt () from /usr/lib/libc.so.1
#2  0xfee089e4 in fprintf () from /usr/lib/libc.so.1
#3  0x000d0970 in php_mail (to=0x0, subject=0x193868 To: %s\n,
message=0x0, headers=0x0, extra_cmd=0x0,
tsrm_ls=0x0) at /opt/admin/build/php-4.4.2/ext/standard/mail.c:228


Presumably the variable should be sanity checked both in php_mail and the
error_log function..

-- 
Edit bug report at http://bugs.php.net/?id=36928edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36928r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36928r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36928r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36928r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36928r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36928r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36928r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36928r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36928r=support
Expected behavior:http://bugs.php.net/fix.php?id=36928r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36928r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36928r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36928r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36928r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36928r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36928r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36928r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36928r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36928r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36928r=mysqlcfg


#36928 [Fbk-Opn]: error_log with invalid arguments crashes PHP

2006-03-30 Thread michaelw at webcentral dot com dot au
 ID:   36928
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Solaris 9 /
 PHP Version:  4.4.2
 New Comment:

Hey,

This is a better 'Reproduce Code' (it doesn't attempt to send an email
if the 2nd variable is a 0, and hence doesn't crash, so depending on
what $_SERVER['HTTPS'] evaluated to for you, it might not have
errored..):

html
body
?php
error_log(commas can crash ,1);
?
p
Test../p
/body
/html

I'm currently compiling the suggested CVS snapshot and will let you
know when I have a result.


Previous Comments:


[2006-03-31 03:32:05] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Can't reproduce



[2006-03-31 03:08:23] michaelw at webcentral dot com dot au

Description:

This was noticed by a developer making a typo ( , instead of . ) when
attempting to concat strings within the parameters of error_log. It is
reported as a bug because it causes a segfault in PHP which causes the
webserver to crash.

Reproduce code:
---
html
body
?php
error_log(commas can crash ,($_SERVER['HTTPS'] != 'off'));
?
p
Test../p
/body
/html


Expected result:

Presumably an error indicating that the 2nd parameter passed to
error_log is invalid.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.


(gdb) bt
#0  0xfedb451c in strlen () from /usr/lib/libc.so.1
#1  0xfee06f88 in _doprnt () from /usr/lib/libc.so.1
#2  0xfee089e4 in fprintf () from /usr/lib/libc.so.1
#3  0x000d0970 in php_mail (to=0x0, subject=0x193868 To: %s\n,
message=0x0, headers=0x0, extra_cmd=0x0,
tsrm_ls=0x0) at /opt/admin/build/php-4.4.2/ext/standard/mail.c:228


Presumably the variable should be sanity checked both in php_mail and
the error_log function..





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


#36928 [Opn]: error_log with invalid arguments crashes PHP

2006-03-30 Thread michaelw at webcentral dot com dot au
 ID:   36928
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Solaris 9 /
 PHP Version:  4.4.2
 New Comment:

I've verified I can reproduce it with the latest CVS snapshot with a
compile string of: 

./configure  --prefix=/opt/php --with-nsapi=/opt/sunapps/web
--enable-debug

Its probably also worth noting I can replicate it using the CLI..

# gdb sapi/cli/php
GNU gdb 6.0
Copyright 2003 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 sparc-sun-solaris2.9...set
(gdb) set args
/webdocs/school-hosting/centraloffice/mis-webcentral/www/crash2.php
(gdb) run
Starting program:
/opt/admin/build/php4-STABLE-200603310035/sapi/cli/php
/webdocs/school-hosting/centraloffice/mis-webcentral/www/crash2.php

Program received signal SIGSEGV, Segmentation fault.
0xff13451c in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0  0xff13451c in strlen () from /usr/lib/libc.so.1
#1  0xff186f88 in _doprnt () from /usr/lib/libc.so.1
#2  0xff1889e4 in fprintf () from /usr/lib/libc.so.1
#3  0x0009c374 in php_mail (to=0x0, subject=0x15c8e0 To: %s\n,
message=0x0, headers=0xff1bc000 ,
extra_cmd=0x2134a8 s\022øÜ, tsrm_ls=0x1a6278)
at
/opt/admin/build/php4-STABLE-200603310035/ext/standard/mail.c:228


Previous Comments:


[2006-03-31 03:50:28] michaelw at webcentral dot com dot au

Hey,

This is a better 'Reproduce Code' (it doesn't attempt to send an email
if the 2nd variable is a 0, and hence doesn't crash, so depending on
what $_SERVER['HTTPS'] evaluated to for you, it might not have
errored..):

html
body
?php
error_log(commas can crash ,1);
?
p
Test../p
/body
/html

I'm currently compiling the suggested CVS snapshot and will let you
know when I have a result.



[2006-03-31 03:32:05] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Can't reproduce



[2006-03-31 03:08:23] michaelw at webcentral dot com dot au

Description:

This was noticed by a developer making a typo ( , instead of . ) when
attempting to concat strings within the parameters of error_log. It is
reported as a bug because it causes a segfault in PHP which causes the
webserver to crash.

Reproduce code:
---
html
body
?php
error_log(commas can crash ,($_SERVER['HTTPS'] != 'off'));
?
p
Test../p
/body
/html


Expected result:

Presumably an error indicating that the 2nd parameter passed to
error_log is invalid.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.


(gdb) bt
#0  0xfedb451c in strlen () from /usr/lib/libc.so.1
#1  0xfee06f88 in _doprnt () from /usr/lib/libc.so.1
#2  0xfee089e4 in fprintf () from /usr/lib/libc.so.1
#3  0x000d0970 in php_mail (to=0x0, subject=0x193868 To: %s\n,
message=0x0, headers=0x0, extra_cmd=0x0,
tsrm_ls=0x0) at /opt/admin/build/php-4.4.2/ext/standard/mail.c:228


Presumably the variable should be sanity checked both in php_mail and
the error_log function..





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


#36928 [Ana]: error_log with invalid arguments crashes PHP

2006-03-30 Thread michaelw at webcentral dot com dot au
 ID:   36928
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Analyzed
 Bug Type: Reproducible crash
 Operating System: Solaris 9 /
 PHP Version:  4.4.2
 New Comment:

Thank you, this corrects the issue. 

Just one more thing for completeness..  in the mail.c patch you test
the value of to before passing it to fprintf. Should the same thing be
done for the value of subject ?


Previous Comments:


[2006-03-31 06:40:31] [EMAIL PROTECTED]

And a patch for error_log() to require 'destination' when set to send
email: http://php.is/bugs/36928/error_log.patch.txt



[2006-03-31 06:33:54] arnar at 8 dot is

This crash is cosed by solaris's libc not checking the fprintf
arguments, and php fault for passing in a NULL argumnet.

Link to patch: http://php.is/patch/mail.patch

Index: ext/standard/mail.c
===
RCS file: /repository/php-src/ext/standard/mail.c,v
retrieving revision 1.66.2.12.4.2
diff -u -r1.66.2.12.4.2 mail.c
--- ext/standard/mail.c 1 Jan 2006 13:46:57 -   1.66.2.12.4.2
+++ ext/standard/mail.c 31 Mar 2006 04:29:29 -
@@ -196,6 +196,10 @@
return 0;
 #endif
}
+   if (to == NULL  headers == NULL) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
arguments);
+   return 0;
+   }
if (extra_cmd != NULL) {
sendmail_cmd = emalloc (strlen (sendmail_path) + strlen 
(extra_cmd)
+ 2);
strcpy (sendmail_cmd, sendmail_path);
@@ -225,7 +229,9 @@
return 0;
}
 #endif
-   fprintf(sendmail, To: %s\n, to);
+   if (to != NULL) {
+   fprintf(sendmail, To: %s\n, to);
+   }
fprintf(sendmail, Subject: %s\n, subject);
if (headers != NULL) {
fprintf(sendmail, %s\n, headers);



[2006-03-31 03:56:10] michaelw at webcentral dot com dot au

I've verified I can reproduce it with the latest CVS snapshot with a
compile string of: 

./configure  --prefix=/opt/php --with-nsapi=/opt/sunapps/web
--enable-debug

Its probably also worth noting I can replicate it using the CLI..

# gdb sapi/cli/php
GNU gdb 6.0
Copyright 2003 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 sparc-sun-solaris2.9...set
(gdb) set args
/webdocs/school-hosting/centraloffice/mis-webcentral/www/crash2.php
(gdb) run
Starting program:
/opt/admin/build/php4-STABLE-200603310035/sapi/cli/php
/webdocs/school-hosting/centraloffice/mis-webcentral/www/crash2.php

Program received signal SIGSEGV, Segmentation fault.
0xff13451c in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0  0xff13451c in strlen () from /usr/lib/libc.so.1
#1  0xff186f88 in _doprnt () from /usr/lib/libc.so.1
#2  0xff1889e4 in fprintf () from /usr/lib/libc.so.1
#3  0x0009c374 in php_mail (to=0x0, subject=0x15c8e0 To: %s\n,
message=0x0, headers=0xff1bc000 ,
extra_cmd=0x2134a8 s\022øÜ, tsrm_ls=0x1a6278)
at
/opt/admin/build/php4-STABLE-200603310035/ext/standard/mail.c:228



[2006-03-31 03:50:28] michaelw at webcentral dot com dot au

Hey,

This is a better 'Reproduce Code' (it doesn't attempt to send an email
if the 2nd variable is a 0, and hence doesn't crash, so depending on
what $_SERVER['HTTPS'] evaluated to for you, it might not have
errored..):

html
body
?php
error_log(commas can crash ,1);
?
p
Test../p
/body
/html

I'm currently compiling the suggested CVS snapshot and will let you
know when I have a result.



[2006-03-31 03:32:05] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Can't reproduce



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/36928

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


#26478 [Com]: Segfault under load with scripts that call MySQL

2005-04-12 Thread michaelw at webcentral dot com dot au
 ID:   26478
 Comment by:   michaelw at webcentral dot com dot au
 Reported By:  fillmore at nrcan dot gc dot ca
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Solaris 8 (SPARC)
 PHP Version:  4.3.4
 New Comment:

I can duplicate this using PHP 4.3.10 with MySQL 3.23.58 under SunONE
6.1 under Solaris 9. 

(incidently, the fix for the 'unable to connect' issue mentioned is to
set CFLAGS to include -D_REENTRANT )

I can give you any additional information you require, if you can tell
me how :)


Previous Comments:


[2004-01-01 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2003-12-16 14:57:27] [EMAIL PROTECTED]

Please check your mysql settings.. (my.cnf for starters)




[2003-12-16 14:47:20] fillmore at nrcan dot gc dot ca

I installed MySQL client libraries 4.0.15 and rebuilt PHP
with --with-mysql=/usr/local/mysql, and now the PHP script
is failing with:
Warning: mysql_connect(): Can't connect to MySQL server on
'aaa.bbb.xx.yy' (2) in
/home1/fast1/WWW-data/cfs-scf/national/what-quoi/Solutions/index_e.php
on line 7
(IP address is obscured as aaa.bbb.xx.yy)
It works OK with the builtin MySQL support (with light load).



[2003-12-09 06:14:16] [EMAIL PROTECTED]

Please try compiling PHP with the external mysql client library, using
--with-mysql=/mysql/install/prefix




[2003-12-07 16:08:23] fillmore at nrcan dot gc dot ca

I finally captured a core file, and with the gdb command
info threads got this output for thread 25:
  49 Thread 25 (LWP 17)  _db_return_ (_line_=949, _sfunc_=0xfd3ee01c,
_sfile_=0xfd3ee018, _slevel_=0xfd3ee014)
at /home8/src/php/php-4.3.4/ext/mysql/libmysql/dbug.c:826

I can't get a full backtrace using bt, maybe because
the SunONE modules don't have debug symbols?
I'm not very familiar with gdb - how do you run bt
for a specified thread?  I tried thread 25 followed by
bt, but it traced libthread.so:
(gdb) thread 25
[Switching to thread 25 (Thread 1)]
#0  0xfeb2826c in cond_wait () from /usr/lib/libthread.so.1
(gdb) bt
#0  0xfeb2826c in cond_wait () from /usr/lib/libthread.so.1
#1  0xfeb28118 in pthread_cond_wait () from /usr/lib/libthread.so.1
#2  0xfed61a94 in PR_WaitCondVar ()
   from /export/home/local/sunone/bin/https/lib/libnspr4.so
#3  0xff298084 in __0fJWebServerDRunvT ()
   from /export/home/local/sunone/bin/https/lib/libns-httpd40.so
#4  0x10c44 in main ()



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/26478

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


#29805 [NoF-Opn]: HTTP Authentication Issues

2004-10-03 Thread michaelw at webcentral dot com dot au
 ID:   29805
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
-Status:   No Feedback
+Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 Assigned To:  thetaphi
 New Comment:

Hey,

As a workaround, I disabled the if-check, so it sets the variables
regardless of whether its in safe-mode or not. Any information on
whether this will remain as-is in CVS, or .. ?


Previous Comments:


[2004-10-04 01:00:06] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-09-26 22:42:33] [EMAIL PROTECTED]

Two things you can do at this time, the remove of the safe_mode
security check for NSAPI is under discussion:

a) Remove the if clause from nsapi.c:
php_handle_auth_data(pblock_findval(authorization, rq-headers)
TSRMLS_CC);

b) Disable Safe-Mode only for this application. With NSAPI you can do
this in vserver.obj.conf:
* Create a new Style in Server Manager and assign this style to the
PHPMyAdmin directory
* Change the obj.conf in that style (Object name=bla) and add the
php4_execute-service as in the default object; but add a safe_mode=0
to the end of the line (this is an additional php.ini value)



[2004-09-22 11:23:30] michaelw at webcentral dot com dot au

Ok, the new CVS release works correctly if safe_mode is disabled.
However, if safe_mode is enabled, there does not appear to be any way
to get authentication information. 

This presents a problem for me, at least, as in my environment I need
to run PHPMyAdmin (using HTTP authentication) with safe_mode turned on.


Is there some method for obtaining authentication information whilst
running under safe mode ?



[2004-09-22 00:02:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Snapshots with this patch are available now.



[2004-09-15 23:55:58] [EMAIL PROTECTED]

Sorry, you cannot take the PHP4 latest stable snapshot now, because it
is frozen (release of 4.3.9) and this bug is not critical. After
release of 4.3.9 this is fixed in CVS.



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/29805

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


#29805 [Fbk-Opn]: HTTP Authentication Issues

2004-09-22 Thread michaelw at webcentral dot com dot au
 ID:   29805
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
-Status:   Feedback
+Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 New Comment:

Ok, the new CVS release works correctly if safe_mode is disabled.
However, if safe_mode is enabled, there does not appear to be any way
to get authentication information. 

This presents a problem for me, at least, as in my environment I need
to run PHPMyAdmin (using HTTP authentication) with safe_mode turned on.


Is there some method for obtaining authentication information whilst
running under safe mode ?


Previous Comments:


[2004-09-22 00:02:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Snapshots with this patch are available now.



[2004-09-15 23:55:58] [EMAIL PROTECTED]

Sorry, you cannot take the PHP4 latest stable snapshot now, because it
is frozen (release of 4.3.9) and this bug is not critical. After
release of 4.3.9 this is fixed in CVS.



[2004-09-15 23:33:11] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

For newer servers (SunONE 6.0) leave out the php4_auth_trans directive
in *.obj.conf, it works without!



[2004-09-14 03:59:41] michaelw at webcentral dot com dot au

Hi,

Just wondering if you've found time to look at this ?

Regards,
Michael Ward.



[2004-08-30 01:19:31] michaelw at webcentral dot com dot au

Any progress with this ?



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/29805

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


#29805 [Opn]: HTTP Authentication Issues

2004-09-13 Thread michaelw at webcentral dot com dot au
 ID:   29805
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 New Comment:

Hi,

Just wondering if you've found time to look at this ?

Regards,
Michael Ward.


Previous Comments:


[2004-08-30 01:19:31] michaelw at webcentral dot com dot au

Any progress with this ?



[2004-08-25 11:10:22] michaelw at webcentral dot com dot au

Currently, it is the ONLY AuthTrans directive.



[2004-08-25 11:05:24] [EMAIL PROTECTED]

The PHP AuthTrans must be the first AuthTrans directive. I can take a
look at this the next days.



[2004-08-25 00:45:31] michaelw at webcentral dot com dot au

From obj.conf

Object name=default
AuthTrans fn=php4_auth_trans

snipped



[2004-08-24 23:51:33] [EMAIL PROTECTED]

Have you installed the fake authenticator php4_ as written in the
docs?

To use PHP Authentication on a single directory, add the following:
Object ppath=d:\path\to\authenticated\dir\*
AuthTrans fn=php4_auth_trans
/Object

The problem is: iPlanet SunONE does not send the password to PHP so it
is not a problem of PHP. With the code from the docs you tell SunONE to
pass the authentication data to the fake function php4_auth_trans
that only says auth done and no other AuthTrans directives from
obj.conf get executed. This switches of all other authentication in the
server (Java, .htaccess,...) but lets PHP get the data. By limiting this
to a directory you can leave the SunONE authentication for other
directories intact.
 




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/29805

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


#29805 [Opn]: HTTP Authentication Issues

2004-08-29 Thread michaelw at webcentral dot com dot au
 ID:   29805
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 New Comment:

Any progress with this ?


Previous Comments:


[2004-08-25 11:10:22] michaelw at webcentral dot com dot au

Currently, it is the ONLY AuthTrans directive.



[2004-08-25 11:05:24] [EMAIL PROTECTED]

The PHP AuthTrans must be the first AuthTrans directive. I can take a
look at this the next days.



[2004-08-25 00:45:31] michaelw at webcentral dot com dot au

From obj.conf

Object name=default
AuthTrans fn=php4_auth_trans

snipped



[2004-08-24 23:51:33] [EMAIL PROTECTED]

Have you installed the fake authenticator php4_ as written in the
docs?

To use PHP Authentication on a single directory, add the following:
Object ppath=d:\path\to\authenticated\dir\*
AuthTrans fn=php4_auth_trans
/Object

The problem is: iPlanet SunONE does not send the password to PHP so it
is not a problem of PHP. With the code from the docs you tell SunONE to
pass the authentication data to the fake function php4_auth_trans
that only says auth done and no other AuthTrans directives from
obj.conf get executed. This switches of all other authentication in the
server (Java, .htaccess,...) but lets PHP get the data. By limiting this
to a directory you can leave the SunONE authentication for other
directories intact.
 




[2004-08-24 03:39:56] michaelw at webcentral dot com dot au

Description:

Hi,

PHP HTTP Authentication under Sun One Webserver 6.0 (and presumably any
iPlanet variant) doesn't seem to work correctly.

The PHP_AUTH_USER and PHP_AUTH_PW variables don't seem to get set.
(This is with Safe Mode disabled). 

Additionally, with Safe Mode enabled, I cannot determine the username
or password entered by the user.  



Reproduce code:
---
?php
  if (!isset($_SERVER['PHP_AUTH_USER'])) {
   header('WWW-Authenticate: Basic realm=My Realm');
   header('HTTP/1.0 401 Unauthorized');
   echo 'Text to send if user hits Cancel button';
   exit;
  } else {
   echo pHello {$_SERVER['PHP_AUTH_USER']}./p;
   echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your
password./p;
  }
?


Expected result:

Under apache, the output is:

Hello testing.

You entered 123 as your password.

(when username is testing and 123 is password)

Under SunOne, the username/password box just keeps redisplaying. 

Actual result:
--
Under SunOne, the username/password box just keeps redisplaying. 





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


#29805 [Opn]: HTTP Authentication Issues

2004-08-25 Thread michaelw at webcentral dot com dot au
 ID:   29805
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 New Comment:

Currently, it is the ONLY AuthTrans directive.


Previous Comments:


[2004-08-25 11:05:24] [EMAIL PROTECTED]

The PHP AuthTrans must be the first AuthTrans directive. I can take a
look at this the next days.



[2004-08-25 00:45:31] michaelw at webcentral dot com dot au

From obj.conf

Object name=default
AuthTrans fn=php4_auth_trans

snipped



[2004-08-24 23:51:33] [EMAIL PROTECTED]

Have you installed the fake authenticator php4_ as written in the
docs?

To use PHP Authentication on a single directory, add the following:
Object ppath=d:\path\to\authenticated\dir\*
AuthTrans fn=php4_auth_trans
/Object

The problem is: iPlanet SunONE does not send the password to PHP so it
is not a problem of PHP. With the code from the docs you tell SunONE to
pass the authentication data to the fake function php4_auth_trans
that only says auth done and no other AuthTrans directives from
obj.conf get executed. This switches of all other authentication in the
server (Java, .htaccess,...) but lets PHP get the data. By limiting this
to a directory you can leave the SunONE authentication for other
directories intact.
 




[2004-08-24 03:39:56] michaelw at webcentral dot com dot au

Description:

Hi,

PHP HTTP Authentication under Sun One Webserver 6.0 (and presumably any
iPlanet variant) doesn't seem to work correctly.

The PHP_AUTH_USER and PHP_AUTH_PW variables don't seem to get set.
(This is with Safe Mode disabled). 

Additionally, with Safe Mode enabled, I cannot determine the username
or password entered by the user.  



Reproduce code:
---
?php
  if (!isset($_SERVER['PHP_AUTH_USER'])) {
   header('WWW-Authenticate: Basic realm=My Realm');
   header('HTTP/1.0 401 Unauthorized');
   echo 'Text to send if user hits Cancel button';
   exit;
  } else {
   echo pHello {$_SERVER['PHP_AUTH_USER']}./p;
   echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your
password./p;
  }
?


Expected result:

Under apache, the output is:

Hello testing.

You entered 123 as your password.

(when username is testing and 123 is password)

Under SunOne, the username/password box just keeps redisplaying. 

Actual result:
--
Under SunOne, the username/password box just keeps redisplaying. 





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


#29805 [Fbk-Opn]: HTTP Authentication Issues

2004-08-24 Thread michaelw at webcentral dot com dot au
 ID:   29805
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
-Status:   Feedback
+Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.8
 New Comment:

From obj.conf

Object name=default
AuthTrans fn=php4_auth_trans

snipped


Previous Comments:


[2004-08-24 23:51:33] [EMAIL PROTECTED]

Have you installed the fake authenticator php4_ as written in the
docs?

To use PHP Authentication on a single directory, add the following:
Object ppath=d:\path\to\authenticated\dir\*
AuthTrans fn=php4_auth_trans
/Object

The problem is: iPlanet SunONE does not send the password to PHP so it
is not a problem of PHP. With the code from the docs you tell SunONE to
pass the authentication data to the fake function php4_auth_trans
that only says auth done and no other AuthTrans directives from
obj.conf get executed. This switches of all other authentication in the
server (Java, .htaccess,...) but lets PHP get the data. By limiting this
to a directory you can leave the SunONE authentication for other
directories intact.
 




[2004-08-24 03:39:56] michaelw at webcentral dot com dot au

Description:

Hi,

PHP HTTP Authentication under Sun One Webserver 6.0 (and presumably any
iPlanet variant) doesn't seem to work correctly.

The PHP_AUTH_USER and PHP_AUTH_PW variables don't seem to get set.
(This is with Safe Mode disabled). 

Additionally, with Safe Mode enabled, I cannot determine the username
or password entered by the user.  



Reproduce code:
---
?php
  if (!isset($_SERVER['PHP_AUTH_USER'])) {
   header('WWW-Authenticate: Basic realm=My Realm');
   header('HTTP/1.0 401 Unauthorized');
   echo 'Text to send if user hits Cancel button';
   exit;
  } else {
   echo pHello {$_SERVER['PHP_AUTH_USER']}./p;
   echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your
password./p;
  }
?


Expected result:

Under apache, the output is:

Hello testing.

You entered 123 as your password.

(when username is testing and 123 is password)

Under SunOne, the username/password box just keeps redisplaying. 

Actual result:
--
Under SunOne, the username/password box just keeps redisplaying. 





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


#28878 [Csd]: Setting of inikey's in obj.conf fails

2004-06-24 Thread michaelw at webcentral dot com dot au
 ID:   28878
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Closed
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.7
 New Comment:

The php4-STABLE-latest.tar.gz appears to work correctly, and allows me
to set open_basedir as I would expect. 

Thanks.


Previous Comments:


[2004-06-23 15:09:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

You can set all php.ini settings now.

Also:
* Using of bucket parameter to php4_execute for performance tests
will not write warning message to server-log from now on
* Double CONTENT_TYPE server variables in POST request eleminated



[2004-06-23 12:03:02] [EMAIL PROTECTED]

We are discussing that at the moment. The problem is that SYSTEM values
are for the whole PHP library and are not thread specific (I think so),
so changing this in a php4_execute directive changes that value for all
currently running requests - problem.

After discussing that i will decide to change this. All other
multithreaded SAPIs do it in that way (PHP_INI_USER)

doc_root can in PHP scripts accessed via $_SERVER['DOCUMENT_ROOT']



[2004-06-23 02:19:13] michaelw at webcentral dot com dot au

I've done a quick test, and the latest CVS STABLE release appears to
work correctly with regards to the ok = line, although I haven't got
time to test it as fully as I would like to, so it would be nice if
someone else can confirm this... 

The latest CVS STABLE release still checks the key you are attempting
to set against PHP_INI_USER (and thus won't allow you to set things
such as open_basedir and doc_root), when I believe (as it is being set
in a system level file) that it should allow everything from
PHP_INI_SYSTEM (which will allow you to set open_basedir and doc_root)
?



[2004-06-22 17:38:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

The logic here is incorrect, could be better to change code to yours or
the following -- sorry:
ok=(strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j])!=0);

What should be checked:
there is a list of values that should not be ini-values because they
are normal parameters of the php4_execute function (script,
type,...). This for loop goes through the list of this entries, if
one of the entries is entry-param-name (strcasecmp==0) then this
should turn to FALSE.

Ilia: Your thing works, but will not do what is wanted.



[2004-06-22 16:24:05] [EMAIL PROTECTED]

Does it work if you change  
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]));

to 
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]));




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/28878

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


#28878 [Csd]: Setting of inikey's in obj.conf fails

2004-06-24 Thread michaelw at webcentral dot com dot au
 ID:   28878
 User updated by:  michaelw at webcentral dot com dot au
 Reported By:  michaelw at webcentral dot com dot au
 Status:   Closed
 Bug Type: iPlanet related
 Operating System: Solaris 9
 PHP Version:  4.3.7
 New Comment:

I've done a quick test, and the latest CVS STABLE release appears to
work correctly with regards to the ok = line, although I haven't got
time to test it as fully as I would like to, so it would be nice if
someone else can confirm this... 

The latest CVS STABLE release still checks the key you are attempting
to set against PHP_INI_USER (and thus won't allow you to set things
such as open_basedir and doc_root), when I believe (as it is being set
in a system level file) that it should allow everything from
PHP_INI_SYSTEM (which will allow you to set open_basedir and doc_root)
?


Previous Comments:


[2004-06-22 17:38:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

The logic here is incorrect, could be better to change code to yours or
the following -- sorry:
ok=(strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j])!=0);

What should be checked:
there is a list of values that should not be ini-values because they
are normal parameters of the php4_execute function (script,
type,...). This for loop goes through the list of this entries, if
one of the entries is entry-param-name (strcasecmp==0) then this
should turn to FALSE.

Ilia: Your thing works, but will not do what is wanted.



[2004-06-22 16:24:05] [EMAIL PROTECTED]

Does it work if you change  
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]));

to 
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]));




[2004-06-22 05:34:56] michaelw at webcentral dot com dot au

Description:

Attempting to set ini values within the obj.conf file (or
vserver.obj.conf if thats where your virtual hosts are pointed) fails
silently. 


This appears to be caused by the logic in sapi/nsapi/nsapi.c ( static
void nsapi_php_ini_entries(NSLS_D TSRMLS_DC) ) , in particular the
following snippet:

--- SNIP ---
ok=1;
for (j=0; nsapi_exclude_from_ini_entries[j]; j++) {
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]));

}

if (ok) {
--- SNIP ---

It appears that ok is never returning as TRUE, and thus the code never
enters the if (ok) block. 

I modified it as follows (although I'm sure there are better ways..):

--- SNIP ---
ok=1;
for (j=0; nsapi_exclude_from_ini_entries[j]; j++) {
  if
(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]))
   
{
  ok = 0;
}
  }
if (ok) {
--- SNIP ---

Additionally, the code that actually updates the ini value in the same
method):

--- SNIP ---
if (ok) {
  /* change the ini entry */
  if
(zend_alter_ini_entry(entry-param-name,strlen(entry-param-name)+1,entry-param-value,strlen(entry-param-value),PHP_INI_USER,PHP_INI_STAGE_RUNTIME)==FAILURE)
  
{
  log_error(LOG_WARN, pblock_findval(fn, NSG(pb)),NSG(sn),
NSG(rq), Cannot change php.ini key \%s\ to \%s\,
entry-param-name, entry-param-value);
}
}
--- SNIP ---

checks the method to see if it is PHP_INI_USER allowed, whilst since it
is in a system file (obj.conf or vserver.obj.conf) I would expect it to
test against PHP_INI_SYSTEM ?








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


#28878 [NEW]: Setting of inikey's in obj.conf fails

2004-06-21 Thread michaelw at webcentral dot com dot au
From: michaelw at webcentral dot com dot au
Operating system: Solaris 9
PHP version:  4.3.7
PHP Bug Type: iPlanet related
Bug description:  Setting of inikey's in obj.conf fails

Description:

Attempting to set ini values within the obj.conf file (or vserver.obj.conf
if thats where your virtual hosts are pointed) fails silently. 


This appears to be caused by the logic in sapi/nsapi/nsapi.c ( static void
nsapi_php_ini_entries(NSLS_D TSRMLS_DC) ) , in particular the following
snippet:

--- SNIP ---
ok=1;
for (j=0; nsapi_exclude_from_ini_entries[j]; j++) {
ok=(!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j])); 
}

if (ok) {
--- SNIP ---

It appears that ok is never returning as TRUE, and thus the code never
enters the if (ok) block. 

I modified it as follows (although I'm sure there are better ways..):

--- SNIP ---
ok=1;
for (j=0; nsapi_exclude_from_ini_entries[j]; j++) {
  if (!strcasecmp(entry-param-name,nsapi_exclude_from_ini_entries[j]))  
 
{
  ok = 0;
}
  }
if (ok) {
--- SNIP ---

Additionally, the code that actually updates the ini value in the same
method):

--- SNIP ---
if (ok) {
  /* change the ini entry */
  if
(zend_alter_ini_entry(entry-param-name,strlen(entry-param-name)+1,entry-param-value,strlen(entry-param-value),PHP_INI_USER,PHP_INI_STAGE_RUNTIME)==FAILURE)
  
{
  log_error(LOG_WARN, pblock_findval(fn, NSG(pb)),NSG(sn), NSG(rq),
Cannot change php.ini key \%s\ to \%s\, entry-param-name,
entry-param-value);
}
}
--- SNIP ---

checks the method to see if it is PHP_INI_USER allowed, whilst since it is
in a system file (obj.conf or vserver.obj.conf) I would expect it to test
against PHP_INI_SYSTEM ?




-- 
Edit bug report at http://bugs.php.net/?id=28878edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28878r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28878r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=28878r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=28878r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28878r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=28878r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=28878r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=28878r=support
Expected behavior:  http://bugs.php.net/fix.php?id=28878r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=28878r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=28878r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=28878r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28878r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=28878r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=28878r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=28878r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28878r=float