#40352 [NEW]: FCGI_WEB_SERVER_ADDRS function get lost

2007-02-04 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  5.2.1RC4
PHP Bug Type: CGI related
Bug description:  FCGI_WEB_SERVER_ADDRS function get lost

Description:

$ cd php-src/sapi/cgi/README.FastCGI
$ grep -rF FCGI_WEB_SERVER_ADDRS .
./README.FastCGI:variable FCGI_WEB_SERVER_ADDRS to control who can connect
to the FastCGI.
./README.FastCGI:export
FCGI_WEB_SERVER_ADDRS=199.170.183.28,199.170.183.71

hrm... an env variable that exists in read and nowhere in the source?
before php implement its new fcgi, it was supported by libfcgi.


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


#39718 [NEW]: apache 1.x crash on startup if assert.callback is set in ini

2006-12-02 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: gentoo linux 2.6
PHP version:  5CVS-2006-12-03 (CVS)
PHP Bug Type: Reproducible crash
Bug description:  apache 1.x crash on startup if assert.callback is set in ini

Description:

reproducable with "assert.callback = 0", or "assert.callback = abc"
not reproducable with "assert.callback = "


Reproduce code:
---
php.ini:
assert.callback = abc
or
assert.callback = 0

$ gdb --args /usr/sbin/apache -X -DPHP5

Actual result:
--
#0  0xb7a438c4 in _zval_ptr_dtor (zval_ptr=0xb7b59118) at
/home/xuefer/src/php5/Zend/zend_execute_API.c:412
#1  0xb79eab36 in zm_shutdown_assert (type=1, module_number=1) at
/home/xuefer/src/php5/ext/standard/assert.c:98
#2  0xb799a4d9 in zm_shutdown_basic (type=1, module_number=1) at
/home/xuefer/src/php5/ext/standard/basic_functions.c:4084
#3  0xb7a56644 in module_destructor (module=0x80d1338) at
/home/xuefer/src/php5/Zend/zend_API.c:1893
#4  0xb7a5ab5c in zend_hash_apply_deleter (ht=0xb7b5aa00, p=0x80d1308) at
/home/xuefer/src/php5/Zend/zend_hash.c:606
#5  0xb7a5ac40 in zend_hash_graceful_reverse_destroy (ht=0xb7b5aa00) at
/home/xuefer/src/php5/Zend/zend_hash.c:641
#6  0xb7a5041a in zend_shutdown () at
/home/xuefer/src/php5/Zend/zend.c:715
#7  0xb7a0aa01 in php_module_shutdown () at
/home/xuefer/src/php5/main/main.c:1672
#8  0xb7a0a9cb in php_module_shutdown_wrapper (sapi_globals=0xb7b570c0) at
/home/xuefer/src/php5/main/main.c:1643
#9  0xb7ab9aa4 in apache_php_module_shutdown_wrapper () at
/home/xuefer/src/php5/sapi/apache/mod_php5.c:905
#10 0x08052bf2 in ap_clear_pool ()

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


#36733 [NEW]: support for -d argument in fastcgi

2006-03-13 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: 
PHP version:  5.1.3RC1
PHP Bug Type: Feature/Change Request
Bug description:  support for -d argument in fastcgi

Description:

it's not possible to start fastcgi with -d currently (while -c is ok)
./sapi/cgi/php -b 10240 -c /etc/php.ini -d max_execution_time=10
we can copy php.ini and modify it. but it would be nice use -d for minor
cfg change while using same -c php.ini, to start many process groups of
php fastcgi.


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


#21306 [Csd]: partly RSHUTDOWN and "cannot change the session settings" error

2005-09-23 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Closed
 Bug Type: Session related
 Operating System: linux
 PHP Version:  5CVS, 4CVS, 6CVS (2005-09-16)
 Assigned To:  sas
 New Comment:

i can confirm it's fixed, thanks


Previous Comments:


[2005-09-23 10:17:03] [EMAIL PROTECTED]

Patch committed.



[2005-09-21 10:29:19] [EMAIL PROTECTED]

Does THIS fix it:

  http://www.php.net/~jani/patches/bug21306.patch

???




[2005-09-21 04:25:24] Xuefer at 21cn dot com

yeah, all modules is rshutdown correctly. but sorry.. the session error
messages is still there, let's check the source

PHP_RSHUTDOWN_FUNCTION(session)
{   
zend_try {
php_session_flush(TSRMLS_C); <- bailout, function is partly
executed, do we care? let's step inside
php_rshutdown_session_globals(TSRMLS_C); <- not executed
} zend_end_try();
...
}
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <- bailout, function
is partly executed, but we don't care
PS(session_status)=php_session_none; <- not executed. oops!
this is important for SESSION_CHECK_ACTIVE_STATE
}
}


i realize that, my patch to zend_API.c make sure every modules's
rshutdown handler is called, but can't make sure the rshutdown itself
is completed.



[2005-09-20 23:04:57] [EMAIL PROTECTED]

Fixed in PHP_4_4, PHP_5_1 and HEAD branches with this patch:

diff -u -r1.417 session.c
--- session.c   3 Aug 2005 14:07:44 -   1.417
+++ session.c   20 Sep 2005 20:54:26 -
@@ -1807,8 +1807,11 @@
 
 PHP_RSHUTDOWN_FUNCTION(session)
 {
-   php_session_flush(TSRMLS_C);
-   php_rshutdown_session_globals(TSRMLS_C);
+   zend_try {
+   php_session_flush(TSRMLS_C);
+   php_rshutdown_session_globals(TSRMLS_C);
+   } zend_end_try();
+
return SUCCESS;
 }
 /* }}} */

Let me know if this doesn't fix the issue. (hard for me to confirm
since I can't even reproduce it :)


----------------

[2005-09-20 16:11:44] Xuefer at 21cn dot com

about ps_call_handler:
hrm.. no idea if any other module/session handler have to be "no
bailout" and/or "might bailout". i can only bring the problem up.



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

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


#21306 [Csd->Opn]: partly RSHUTDOWN and "cannot change the session settings" error

2005-09-20 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Closed
+Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4CVS (2005-09-16) (5CVS, 6CVS)
 Assigned To:  sas
 New Comment:

yeah, all modules is rshutdown correctly. but sorry.. the session error
messages is still there, let's check the source

PHP_RSHUTDOWN_FUNCTION(session)
{   
zend_try {
php_session_flush(TSRMLS_C); <- bailout, function is partly
executed, do we care? let's step inside
php_rshutdown_session_globals(TSRMLS_C); <- not executed
} zend_end_try();
...
}
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <- bailout, function
is partly executed, but we don't care
PS(session_status)=php_session_none; <- not executed. oops!
this is important for SESSION_CHECK_ACTIVE_STATE
}
}


i realize that, my patch to zend_API.c make sure every modules's
rshutdown handler is called, but can't make sure the rshutdown itself
is completed.


Previous Comments:


[2005-09-20 23:04:57] [EMAIL PROTECTED]

Fixed in PHP_4_4, PHP_5_1 and HEAD branches with this patch:

diff -u -r1.417 session.c
--- session.c   3 Aug 2005 14:07:44 -   1.417
+++ session.c   20 Sep 2005 20:54:26 -
@@ -1807,8 +1807,11 @@
 
 PHP_RSHUTDOWN_FUNCTION(session)
 {
-   php_session_flush(TSRMLS_C);
-   php_rshutdown_session_globals(TSRMLS_C);
+   zend_try {
+   php_session_flush(TSRMLS_C);
+   php_rshutdown_session_globals(TSRMLS_C);
+   } zend_end_try();
+
return SUCCESS;
 }
 /* }}} */

Let me know if this doesn't fix the issue. (hard for me to confirm
since I can't even reproduce it :)


----------------

[2005-09-20 16:11:44] Xuefer at 21cn dot com

about ps_call_handler:
hrm.. no idea if any other module/session handler have to be "no
bailout" and/or "might bailout". i can only bring the problem up.

----------------

[2005-09-20 16:04:54] Xuefer at 21cn dot com

the patch i proposed long ago ([8 Nov 2004 5:24pm CET], the 2nd note in
this bug) patches mod_user.c only

do u mean here?
zend_try {
zend_hash_apply(&module_registry, (apply_func_t)
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
this try/catch here will only make sure zend_deactivate_modules is
return correctly, any single bailout will break the loop of
zend_hash_apply(), which is foreach item in module_registry, all
remaining modules is not RSHUTDOWNed correctly

either one of the patches will do. u don't need apply both of them.
let module itself, or php engine to make sure not to bailout in the
middle. it's up to u guys to decide :)



[2005-09-20 13:06:37] [EMAIL PROTECTED]

And wouldn't it be better to add that stuff in the ps_call_handler()
function, not just in one place it is used?



[2005-09-20 13:04:51] [EMAIL PROTECTED]

Why do you patch zend_API.c?? The part you added the zend_try..catch
thing is already covered with such elsewhere.




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

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


#21306 [Opn]: partly RSHUTDOWN and "cannot change the session settings" error

2005-09-20 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4CVS (2005-09-16) (5CVS, 6CVS)
 Assigned To:  sas
 New Comment:

about ps_call_handler:
hrm.. no idea if any other module/session handler have to be "no
bailout" and/or "might bailout". i can only bring the problem up.


Previous Comments:


[2005-09-20 16:04:54] Xuefer at 21cn dot com

the patch i proposed long ago ([8 Nov 2004 5:24pm CET], the 2nd note in
this bug) patches mod_user.c only

do u mean here?
zend_try {
zend_hash_apply(&module_registry, (apply_func_t)
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
this try/catch here will only make sure zend_deactivate_modules is
return correctly, any single bailout will break the loop of
zend_hash_apply(), which is foreach item in module_registry, all
remaining modules is not RSHUTDOWNed correctly

either one of the patches will do. u don't need apply both of them.
let module itself, or php engine to make sure not to bailout in the
middle. it's up to u guys to decide :)



[2005-09-20 13:06:37] [EMAIL PROTECTED]

And wouldn't it be better to add that stuff in the ps_call_handler()
function, not just in one place it is used?



[2005-09-20 13:04:51] [EMAIL PROTECTED]

Why do you patch zend_API.c?? The part you added the zend_try..catch
thing is already covered with such elsewhere.


--------

[2005-09-19 17:50:16] Xuefer at 21cn dot com

fine

Index: zend_API.c
===
RCS file: /repository/ZendEngine2/zend_API.c,v
retrieving revision 1.315
diff -u -r1.315 zend_API.c
--- zend_API.c  1 Sep 2005 10:04:55 -   1.315
+++ zend_API.c  19 Sep 2005 15:46:39 -
@@ -2335,7 +2335,9 @@
 #if 0
zend_printf("%s:  Request shutdown\n", module->name);
 #endif
+   zend_try {
module->request_shutdown_func(module->type,
module->module_number TSRMLS_CC);
+   } zend_end_try();
}
return 0;
 }

Index: mod_user.c
===
RCS file: /repository/php-src/ext/session/mod_user.c,v
retrieving revision 1.29
diff -u -r1.29 mod_user.c
--- mod_user.c  3 Aug 2005 14:07:43 -   1.29
+++ mod_user.c  19 Sep 2005 15:48:49 -
@@ -145,7 +145,9 @@
SESS_ZVAL_STRING(key, args[0]);
SESS_ZVAL_STRINGN(val, vallen, args[1]);
 
+   zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
+   } zend_end_try();
 
FINISH;
 }

indent/space change is not included for readablity.
any one patch will do

--------------------

[2004-11-08 17:24:27] Xuefer at 21cn dot com

i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)

when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();

session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}

suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
==
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
==
to
==
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
==



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

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


#21306 [Fbk->Opn]: partly RSHUTDOWN and "cannot change the session settings" error

2005-09-20 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4CVS (2005-09-16) (5CVS, 6CVS)
 Assigned To:  sas
 New Comment:

the patch i proposed long ago ([8 Nov 2004 5:24pm CET], the 2nd note in
this bug) patches mod_user.c only

do u mean here?
zend_try {
zend_hash_apply(&module_registry, (apply_func_t)
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
this try/catch here will only make sure zend_deactivate_modules is
return correctly, any single bailout will break the loop of
zend_hash_apply(), which is foreach item in module_registry, all
remaining modules is not RSHUTDOWNed correctly

either one of the patches will do. u don't need apply both of them.
let module itself, or php engine to make sure not to bailout in the
middle. it's up to u guys to decide :)


Previous Comments:


[2005-09-20 13:06:37] [EMAIL PROTECTED]

And wouldn't it be better to add that stuff in the ps_call_handler()
function, not just in one place it is used?



[2005-09-20 13:04:51] [EMAIL PROTECTED]

Why do you patch zend_API.c?? The part you added the zend_try..catch
thing is already covered with such elsewhere.




[2005-09-19 17:50:16] Xuefer at 21cn dot com

fine

Index: zend_API.c
===
RCS file: /repository/ZendEngine2/zend_API.c,v
retrieving revision 1.315
diff -u -r1.315 zend_API.c
--- zend_API.c  1 Sep 2005 10:04:55 -   1.315
+++ zend_API.c  19 Sep 2005 15:46:39 -
@@ -2335,7 +2335,9 @@
 #if 0
zend_printf("%s:  Request shutdown\n", module->name);
 #endif
+   zend_try {
module->request_shutdown_func(module->type,
module->module_number TSRMLS_CC);
+   } zend_end_try();
}
return 0;
 }

Index: mod_user.c
===
RCS file: /repository/php-src/ext/session/mod_user.c,v
retrieving revision 1.29
diff -u -r1.29 mod_user.c
--- mod_user.c  3 Aug 2005 14:07:43 -   1.29
+++ mod_user.c  19 Sep 2005 15:48:49 -
@@ -145,7 +145,9 @@
SESS_ZVAL_STRING(key, args[0]);
SESS_ZVAL_STRINGN(val, vallen, args[1]);
 
+   zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
+   } zend_end_try();
 
FINISH;
 }

indent/space change is not included for readablity.
any one patch will do

------------

[2004-11-08 17:24:27] Xuefer at 21cn dot com

i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)

when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();

session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}

suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
==
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
==
to
==
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
==

----------------

[2002-12-31 02:00:45] Xuefer at 21cn dot com

i've got this problem after i upgrade from php4.2.2 to 4.3.0:

[31-Dec-2002 15:30:03] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0

seems a internal error, php script
hope this to be fix soon




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


#21306 [Fbk->Opn]: partly RSHUTDOWN and "cannot change the session settings" error

2005-09-19 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4CVS (2005-09-16) (5CVS, 6CVS)
 Assigned To:  sas
 New Comment:

fine

Index: zend_API.c
===
RCS file: /repository/ZendEngine2/zend_API.c,v
retrieving revision 1.315
diff -u -r1.315 zend_API.c
--- zend_API.c  1 Sep 2005 10:04:55 -   1.315
+++ zend_API.c  19 Sep 2005 15:46:39 -
@@ -2335,7 +2335,9 @@
 #if 0
zend_printf("%s:  Request shutdown\n", module->name);
 #endif
+   zend_try {
module->request_shutdown_func(module->type,
module->module_number TSRMLS_CC);
+   } zend_end_try();
}
return 0;
 }

Index: mod_user.c
===
RCS file: /repository/php-src/ext/session/mod_user.c,v
retrieving revision 1.29
diff -u -r1.29 mod_user.c
--- mod_user.c  3 Aug 2005 14:07:43 -   1.29
+++ mod_user.c  19 Sep 2005 15:48:49 -
@@ -145,7 +145,9 @@
SESS_ZVAL_STRING(key, args[0]);
SESS_ZVAL_STRINGN(val, vallen, args[1]);
 
+   zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
+   } zend_end_try();
 
FINISH;
 }

indent/space change is not included for readablity.
any one patch will do


Previous Comments:


[2005-09-19 17:19:56] [EMAIL PROTECTED]

Please provide patches (diff -u), I don't get those "put .. around ..."
descriptions.

------------

[2005-09-19 17:16:49] Xuefer at 21cn dot com

the fix is quite simple, just put a zend_try to protect it
in session module around retval = ps_call_handler(..), or
in Zend/zend_API.c module_registry_cleanup() around
module->request_shutdown_func(..)

> How common is it to run a PHP script like that?
> In a normal usage, I still can not reproduce this.
do u mean u can't reproduce for my test script or can't in normal
usage?
strange, "Reproduced: 36 of 37 (97.3%)" so far

the error message (not key point) is just what can be seen, which mean
the RSHUTDOWN is not completed (key point)

if u emphasize "normal usage", yes, no one want to "exit" in session
write handler, but anything else that lead to "zend_bailout" will get
me same effect. such as: $this->not_existing_method() ;;; mysql_*() or
exit() (something like lost connection close by server, not sql
statement error) ;;; a execution timeout ;; maybe exception? if it use
bailout, etc...
i agree, they're just bugs. but, ppl use session write handler mostly
for database storage, using a db class api -> more code -> more chance
to hit a script bug -> php bailout

* some module (mostly a opcode cacher) might rely on the RSHUTDOWN to
unlock()/refcount-- something
a simple bug in the script from the 3rd party might make php locked

do u thnk the reason above is enough?
any more i can help?



[2005-09-19 13:23:37] [EMAIL PROTECTED]

How common is it to run a PHP script like that?
In a normal usage, I still can not reproduce this.
Please explain how this is reproducable?


--------

[2005-09-19 12:56:01] Xuefer at 21cn dot com

verified with php6
Zend/zend_API.c

#if 1 <- enable it
zend_printf("%s:  Request shutdown\n", module->name);
#endif

 ./sapi/cgi/php ./test.php

Content-type: text/html
Set-Cookie: SID=15db16deadc51c47e8878eaec63d5b71; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache

libxml:  Request shutdown
xcache:  Request shutdown
tokenizer:  Request shutdown
standard:  Request shutdown
SPL:  Request shutdown
PDO:  Request shutdown
session:  Request shutdown

Warning: Unknown: A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0
Unknown(0) : Warning - Unknown: A session is active. You cannot change
the session module's ini settings at this time.

 echo 'http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

And provide a script that actually is usable. For that script it's
perfectly fine to give an error.. 
Also: The version string in the 'Version' field in the bug reports MUST
start with a number 4,5 or 6.



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

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


#21306 [Fbk->Opn]: partly RSHUTDOWN and "cannot change the session settings" error

2005-09-19 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
-Summary:  [PATCH] warning about "cannot change the session
   settings"
 Reported By:      Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4CVS (2005-09-16) (5CVS, 6CVS)
 Assigned To:  sas
 New Comment:

the fix is quite simple, just put a zend_try to protect it
in session module around retval = ps_call_handler(..), or
in Zend/zend_API.c module_registry_cleanup() around
module->request_shutdown_func(..)

> How common is it to run a PHP script like that?
> In a normal usage, I still can not reproduce this.
do u mean u can't reproduce for my test script or can't in normal
usage?
strange, "Reproduced: 36 of 37 (97.3%)" so far

the error message (not key point) is just what can be seen, which mean
the RSHUTDOWN is not completed (key point)

if u emphasize "normal usage", yes, no one want to "exit" in session
write handler, but anything else that lead to "zend_bailout" will get
me same effect. such as: $this->not_existing_method() ;;; mysql_*() or
exit() (something like lost connection close by server, not sql
statement error) ;;; a execution timeout ;; maybe exception? if it use
bailout, etc...
i agree, they're just bugs. but, ppl use session write handler mostly
for database storage, using a db class api -> more code -> more chance
to hit a script bug -> php bailout

* some module (mostly a opcode cacher) might rely on the RSHUTDOWN to
unlock()/refcount-- something
a simple bug in the script from the 3rd party might make php locked

do u thnk the reason above is enough?
any more i can help?


Previous Comments:


[2005-09-19 13:23:37] [EMAIL PROTECTED]

How common is it to run a PHP script like that?
In a normal usage, I still can not reproduce this.
Please explain how this is reproducable?


----------------

[2005-09-19 12:56:01] Xuefer at 21cn dot com

verified with php6
Zend/zend_API.c

#if 1 <- enable it
zend_printf("%s:  Request shutdown\n", module->name);
#endif

 ./sapi/cgi/php ./test.php

Content-type: text/html
Set-Cookie: SID=15db16deadc51c47e8878eaec63d5b71; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache

libxml:  Request shutdown
xcache:  Request shutdown
tokenizer:  Request shutdown
standard:  Request shutdown
SPL:  Request shutdown
PDO:  Request shutdown
session:  Request shutdown

Warning: Unknown: A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0
Unknown(0) : Warning - Unknown: A session is active. You cannot change
the session module's ini settings at this time.

 echo 'http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

And provide a script that actually is usable. For that script it's
perfectly fine to give an error.. 
Also: The version string in the 'Version' field in the bug reports MUST
start with a number 4,5 or 6.



[2005-09-14 08:32:02] Xuefer at 21cn dot com

i have verified it in lastest cvs in 4.4 branch.


./sapi/cgi/php -c /home/xuefer/etc/php.ini test.php 
Content-type: text/html
X-Powered-By: PHP/4.4.1-dev
Set-Cookie: PHPSESSID=b50128d8959939728d21dd36eaf15b7c; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache


Warning:  Unknown(): A session is active. You cannot change the
session module's ini settings at this time. in Unknown on line
0

php.ini:
include_path=".:/usr/local/lib/php"
display_errors=On
error_reporting=E_ALL
log_errors = On
error_log = /tmp/phperr
memory_limit = 50M
(no other options)

reproduce script:




[2005-09-02 08:44:21] [EMAIL PROTECTED]

Can not reproduce, there's been couple of reports and none them with
proper way to get this reproduced. Most likely user error.



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

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


#21306 [Fbk->Opn]: [PATCH] warning about "cannot change the session settings"

2005-09-19 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux
-PHP Version:  4CVS (2005-09-14)
+PHP Version:  4CVS (2005-09-14), 6CVS(2005-09-19)
 Assigned To:  sas
 New Comment:

verified with php6
Zend/zend_API.c

#if 1 <- enable it
zend_printf("%s:  Request shutdown\n", module->name);
#endif

 ./sapi/cgi/php ./test.php

Content-type: text/html
Set-Cookie: SID=15db16deadc51c47e8878eaec63d5b71; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache

libxml:  Request shutdown
xcache:  Request shutdown
tokenizer:  Request shutdown
standard:  Request shutdown
SPL:  Request shutdown
PDO:  Request shutdown
session:  Request shutdown

Warning: Unknown: A session is active. You cannot change the session
module's ini settings at this time. in Unknown on line 0
Unknown(0) : Warning - Unknown: A session is active. You cannot change
the session module's ini settings at this time.

 echo 'http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

And provide a script that actually is usable. For that script it's
perfectly fine to give an error.. 
Also: The version string in the 'Version' field in the bug reports MUST
start with a number 4,5 or 6.

----------------

[2005-09-14 08:32:02] Xuefer at 21cn dot com

i have verified it in lastest cvs in 4.4 branch.


./sapi/cgi/php -c /home/xuefer/etc/php.ini test.php 
Content-type: text/html
X-Powered-By: PHP/4.4.1-dev
Set-Cookie: PHPSESSID=b50128d8959939728d21dd36eaf15b7c; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache


Warning:  Unknown(): A session is active. You cannot change the
session module's ini settings at this time. in Unknown on line
0

php.ini:
include_path=".:/usr/local/lib/php"
display_errors=On
error_reporting=E_ALL
log_errors = On
error_log = /tmp/phperr
memory_limit = 50M
(no other options)

reproduce script:




[2005-09-02 08:44:21] [EMAIL PROTECTED]

Can not reproduce, there's been couple of reports and none them with
proper way to get this reproduced. Most likely user error.

----------------

[2005-02-12 09:23:34] Xuefer at 21cn dot com

confirmed with CVS
again, exit() in sess_write() cause this issue
other modules after session module is not shutdown properly

i don't see any fix in the php4-src/ext/session/ source



[2005-01-25 15:28:30] [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 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/21306

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


#21306 [Bgs->Opn]: [PATCH] warning about "cannot change the session settings"

2005-09-13 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Session related
 Operating System: linux
-PHP Version:  4.3.12-dev
+PHP Version:  PHP 4.4.1 cvs (cgi-fcgi) (cvs up/built: Sep 14 2005
   14:13:54)
 Assigned To:  sas
 New Comment:

i have verified it in lastest cvs in 4.4 branch.


./sapi/cgi/php -c /home/xuefer/etc/php.ini test.php 
Content-type: text/html
X-Powered-By: PHP/4.4.1-dev
Set-Cookie: PHPSESSID=b50128d8959939728d21dd36eaf15b7c; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache


Warning:  Unknown(): A session is active. You cannot change the
session module's ini settings at this time. in Unknown on line
0

php.ini:
include_path=".:/usr/local/lib/php"
display_errors=On
error_reporting=E_ALL
log_errors = On
error_log = /tmp/phperr
memory_limit = 50M
(no other options)

reproduce script:



Previous Comments:


[2005-09-02 08:44:21] [EMAIL PROTECTED]

Can not reproduce, there's been couple of reports and none them with
proper way to get this reproduced. Most likely user error.



[2005-02-12 09:23:34] Xuefer at 21cn dot com

confirmed with CVS
again, exit() in sess_write() cause this issue
other modules after session module is not shutdown properly

i don't see any fix in the php4-src/ext/session/ source



[2005-01-25 15:28:30] [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



----

[2004-11-08 17:24:27] Xuefer at 21cn dot com

i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)

when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();

session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}

suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
==
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
==
to
==
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
==



[2003-05-20 10:03:32] [EMAIL PROTECTED]

Code being executed twice really sounds like a problem in the scripting
engine to me. It could be caused or triggered by defects in the tool
chain (buggy compiler optimizer, broken bison/flex).

Please retest with current Stable snapshot from snaps.php.net.



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

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


#34240 [Asn]: zlib.output_compression=on responsing corrupted data

2005-08-31 Thread xuefer at 21cn dot com
 ID:   34240
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Assigned
 Bug Type: Zlib Related
 Operating System: *
 PHP Version:  5CVS, 6CVS, 4CVS (2005-08-25)
 Assigned To:  iliaa
 New Comment:

i'd guess the "start_offset" is to avoid an extra erealloc. 
this bug should only happen when both do_start do_end is true
(do_end=true && start_offset!=0)

 /* {{{ php_do_deflate
@@ -717,7 +718,7 @@
 
if (do_end) {
err = deflate(&ZLIBG(stream), Z_FINISH);
-   buffer[outlen - ZLIBG(stream).avail_out] = '\0';
+   buffer[outlen + start_offset - ZLIBG(stream).avail_out] =
'\0';
}


Previous Comments:


[2005-09-01 03:00:57] [EMAIL PROTECTED]

I've tried to replicate the bug using given methodology and removing
the \0 line has absolutely no affect (md5 is the same) on the generated
output.

----------------

[2005-08-31 14:39:15] xuefer at 21cn dot com

confirmed with ./configure --disable-all --disable-cli --with-zlib
both with cgi and fastcgi

good:
HTTP_ACCEPT_ENCODING=gzip php-cgi test.php |md5sum
826a819e34f7d57597d890de4176c265  -
bad:
HTTP_ACCEPT_ENCODING=gzip php-cgi test.php |md5sum
2e7dc64cd654b82f712b47b790dcbc12  -


(gdb) br 720
Breakpoint 2 at 0x805d6e5: file /home/xuefer/src/php4/ext/zlib/zlib.c,
line 720.
(gdb) r
#0  php_do_deflate (str_length=2, p_buffer=0xb028,
p_buffer_len=0xb02c, do_start=1 '\001', do_end=1 '\001')
at /home/xuefer/src/php4/ext/zlib/zlib.c:720
(gdb) p outlen-zlib_globals.stream.avail_out
$8 = 10
(gdb) p buffer[outlen-zlib_globals.stream.avail_out]
$9 = 50 '2'
(gdb) step
724 *p_buffer = buffer;
(gdb) p buffer[outlen-zlib_globals.stream.avail_out]
$10 = 0 '\0'

the 2 is exactly what i see in httpwatch that get "lost" with the patch
applied

test result by php->lighttpd->httpwatch is at:
ftp://211.92.88.40/pub/phpbug/test.php.response.txt
ftp://211.92.88.40/pub/phpbug/test.php.response-corrupted.txt



[2005-08-30 13:23:51] [EMAIL PROTECTED]

It doesn't make any difference with/without the patch for bug#34191
(so I don't think it really broke anything)

Try with the shortest possible configure line:
# ./configure --disable-all --disable-cli --with-zlib




[2005-08-24 21:14:51] [EMAIL PROTECTED]

Can you replicate in any other SAPI, I don't have fastcgi sapi 
installed anywhere.



[2005-08-24 21:05:07] xuefer at 21cn dot com

Description:

fix to [EMAIL PROTECTED] broken 2 echos
sapi: fastcgi
zlib.output_compression = On
turn off=no problem
revert the fix=no problem too

can llia please look into it?

Reproduce code:
---



Expected result:

12

Actual result:
--
empty page in browser (corrupted gzip data)





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


#34240 [Fbk->Opn]: zlib.output_compression=on responsing corrupted data

2005-08-31 Thread xuefer at 21cn dot com
 ID:   34240
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: *
 PHP Version:  5CVS, 6CVS, 4CVS (2005-08-25)
 Assigned To:  iliaa
 New Comment:

confirmed with ./configure --disable-all --disable-cli --with-zlib
both with cgi and fastcgi

good:
HTTP_ACCEPT_ENCODING=gzip php-cgi test.php |md5sum
826a819e34f7d57597d890de4176c265  -
bad:
HTTP_ACCEPT_ENCODING=gzip php-cgi test.php |md5sum
2e7dc64cd654b82f712b47b790dcbc12  -


(gdb) br 720
Breakpoint 2 at 0x805d6e5: file /home/xuefer/src/php4/ext/zlib/zlib.c,
line 720.
(gdb) r
#0  php_do_deflate (str_length=2, p_buffer=0xb028,
p_buffer_len=0xb02c, do_start=1 '\001', do_end=1 '\001')
at /home/xuefer/src/php4/ext/zlib/zlib.c:720
(gdb) p outlen-zlib_globals.stream.avail_out
$8 = 10
(gdb) p buffer[outlen-zlib_globals.stream.avail_out]
$9 = 50 '2'
(gdb) step
724 *p_buffer = buffer;
(gdb) p buffer[outlen-zlib_globals.stream.avail_out]
$10 = 0 '\0'

the 2 is exactly what i see in httpwatch that get "lost" with the patch
applied

test result by php->lighttpd->httpwatch is at:
ftp://211.92.88.40/pub/phpbug/test.php.response.txt
ftp://211.92.88.40/pub/phpbug/test.php.response-corrupted.txt


Previous Comments:


[2005-08-30 13:23:51] [EMAIL PROTECTED]

It doesn't make any difference with/without the patch for bug#34191
(so I don't think it really broke anything)

Try with the shortest possible configure line:
# ./configure --disable-all --disable-cli --with-zlib




[2005-08-24 21:14:51] [EMAIL PROTECTED]

Can you replicate in any other SAPI, I don't have fastcgi sapi 
installed anywhere.

----------------

[2005-08-24 21:05:07] xuefer at 21cn dot com

Description:

fix to [EMAIL PROTECTED] broken 2 echos
sapi: fastcgi
zlib.output_compression = On
turn off=no problem
revert the fix=no problem too

can llia please look into it?

Reproduce code:
---



Expected result:

12

Actual result:
--
empty page in browser (corrupted gzip data)





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


#34240 [Fbk->Opn]: zlib.output_compression=on responsing corrupted data

2005-08-30 Thread xuefer at 21cn dot com
 ID:   34240
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: *
 PHP Version:  5CVS, 6CVS, 4CVS (2005-08-25)
 Assigned To:  iliaa
 New Comment:

i meant the fix to the bug #34191, not the patch in it. can you please
check the folling diff?

Modified files:
   /php-src/ext/zlib   zlib.c
 Log:
 Fixed bug #34191 (ob_gzhandler does not enforce trailing \0).


http://cvs.php.net/diff.php/php-src/ext/zlib/zlib.c?r1=1.183&r2=1.184&ty=u

i'll make some time for the "shortest configure option" after you
checked the above url. as i still can reproduce it by patch/unpatch it

==
off topic issue:
1. i didn't see when the version is changed to "PHP Version: 5CVS,
6CVS, 4CVS (2005-08-25)" (no +-) what's up with php bug reporting
system?
2. where did the following change/comment go? i see it in my mailbox
but not on http://bugs.php.net.


-Status:   Feedback
+Status:   Assigned
 Bug Type: Zlib Related
 Operating System: gentoo
 PHP Version:  6CVS-2005-08-24 (CVS)
-Assigned To:  
+Assigned To:  iliaa
 New Comment:

Yeah, with either on command line with php CGI or with Apache2.
Enough?
:)


Previous Comments:


[2005-08-30 13:23:51] [EMAIL PROTECTED]

It doesn't make any difference with/without the patch for bug#34191
(so I don't think it really broke anything)

Try with the shortest possible configure line:
# ./configure --disable-all --disable-cli --with-zlib




[2005-08-24 21:14:51] [EMAIL PROTECTED]

Can you replicate in any other SAPI, I don't have fastcgi sapi 
installed anywhere.

----------------

[2005-08-24 21:05:07] xuefer at 21cn dot com

Description:

fix to [EMAIL PROTECTED] broken 2 echos
sapi: fastcgi
zlib.output_compression = On
turn off=no problem
revert the fix=no problem too

can llia please look into it?

Reproduce code:
---



Expected result:

12

Actual result:
--
empty page in browser (corrupted gzip data)





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


#34240 [NEW]: zlib.output_compression=on responsing corrupted data

2005-08-24 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: gentoo
PHP version:  6CVS-2005-08-24 (CVS)
PHP Bug Type: Zlib Related
Bug description:  zlib.output_compression=on responsing corrupted data

Description:

fix to [EMAIL PROTECTED] broken 2 echos
sapi: fastcgi
zlib.output_compression = On
turn off=no problem
revert the fix=no problem too

can llia please look into it?

Reproduce code:
---



Expected result:

12

Actual result:
--
empty page in browser (corrupted gzip data)

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


#34166 [Asn->Csd]: extract failed to operate len>1 varname on unicode enabled

2005-08-20 Thread xuefer at 21cn dot com
 ID:   34166
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Arrays related
 Operating System: gentoo linux
 PHP Version:  6CVS-2005-08-17 (CVS)
 Assigned To:  andrei
 New Comment:

looks like it's fixed in cvs.


Previous Comments:


[2005-08-17 19:29:33] [EMAIL PROTECTED]

For Andrei, from Finland with love. :)



[2005-08-17 10:13:45] xuefer at 21cn dot com

Description:

broken after unicode patch merged

Reproduce code:
---
 1, 'ab' => 1));
var_dump(get_defined_vars());
}
test();
?>

Expected result:

./sapi/cgi/php -dunicode_semantics=on a.php 
Content-type: text/html; charset=UTF-8
X-Powered-By: PHP/6.0.0-dev

array(2) {
  [u"a"]=>
  int(1)
  [u"ab"]=>
  int(1)
}

Actual result:
--
./sapi/cgi/php -dunicode_semantics=on a.php 
Content-type: text/html; charset=UTF-8
X-Powered-By: PHP/6.0.0-dev

array(2) {
  [u"a"]=>
  int(1)
  [u"a"]=>
  int(1)
}





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


#34166 [NEW]: extract failed to operate len>1 varname on unicode enabled

2005-08-17 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: gentoo linux
PHP version:  6CVS-2005-08-17 (CVS)
PHP Bug Type: Arrays related
Bug description:  extract failed to operate len>1 varname on unicode enabled

Description:

broken after unicode patch merged

Reproduce code:
---
 1, 'ab' => 1));
var_dump(get_defined_vars());
}
test();
?>

Expected result:

./sapi/cgi/php -dunicode_semantics=on a.php 
Content-type: text/html; charset=UTF-8
X-Powered-By: PHP/6.0.0-dev

array(2) {
  [u"a"]=>
  int(1)
  [u"ab"]=>
  int(1)
}

Actual result:
--
./sapi/cgi/php -dunicode_semantics=on a.php 
Content-type: text/html; charset=UTF-8
X-Powered-By: PHP/6.0.0-dev

array(2) {
  [u"a"]=>
  int(1)
  [u"a"]=>
  int(1)
}

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


#34118 [Opn]: yet another fseek/SEEK_SET bug in CVS

2005-08-13 Thread xuefer at 21cn dot com
 ID:   34118
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: cygwin
 PHP Version:  6CVS-2005-08-13
 New Comment:

yeah, i do. but there wasn't such version in the dropdown select.


Previous Comments:


[2005-08-13 20:12:24] [EMAIL PROTECTED]

Please report the bugs with correct version..




[2005-08-13 13:02:24] xuefer at 21cn dot com

btw. unicode_semantics=Off

phpmyadmin code:
$config_fd = fopen($cfgfile_to_load, 'r');
fread($config_fd, filesize($cfgfile_to_load));
fail to read whole file if it's big enough (40k in my case)



[2005-08-13 11:49:59] xuefer at 21cn dot com

Description:

fseek SEEK_SET bug under cygwin
tested with lastest CVS checkout

Reproduce code:
---


Expected result:

<<

Actual result:
--
http://bugs.php.net/?id=34118&edit=1


#34118 [Opn]: yet another fseek/SEEK_SET bug in CVS

2005-08-13 Thread xuefer at 21cn dot com
 ID:   34118
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: cygwin
 PHP Version:  5CVS-2005-08-13 (dev)
 New Comment:

btw. unicode_semantics=Off

phpmyadmin code:
$config_fd = fopen($cfgfile_to_load, 'r');
fread($config_fd, filesize($cfgfile_to_load));
fail to read whole file if it's big enough (40k in my case)


Previous Comments:


[2005-08-13 11:49:59] xuefer at 21cn dot com

Description:

fseek SEEK_SET bug under cygwin
tested with lastest CVS checkout

Reproduce code:
---


Expected result:

<<

Actual result:
--
http://bugs.php.net/?id=34118&edit=1


#34118 [NEW]: yet another fseek/SEEK_SET bug in CVS

2005-08-13 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: cygwin
PHP version:  5CVS-2005-08-13 (dev)
PHP Bug Type: Filesystem function related
Bug description:  yet another fseek/SEEK_SET bug in CVS

Description:

fseek SEEK_SET bug under cygwin
tested with lastest CVS checkout

Reproduce code:
---


Expected result:

<<

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


#34097 [NEW]: configure failed to initize RE2C="exit 0;" when re2c is not found

2005-08-12 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: irrelevent
PHP version:  5CVS-2005-08-12 (dev)
PHP Bug Type: *Compile Issues
Bug description:  configure failed to initize RE2C="exit 0;" when re2c is not 
found

Description:

[snip]
php_cv_re2c_version=none ### if re2c is not found
  fi
  case $php_cv_re2c_version in
""|invalid[)]### no "none" here
  AC_MSG_WARN([You will need re2c 0.98 or later if you want to
regenerate PHP parsers.])
  RE2C="exit 0;"
[/snip]
make
b /usr/src/php6/ext/standard/url_scanner_ex.re >
/usr/src/php6/ext/standard/url_scanner_ex.c
/bin/sh: line 1: b: command not found

url_scanner_ex.c is truncate to 0 byte

-
FYI, flex checking code is:
[snip]
flex_version=none
  fi
  
  case $php_cv_flex_version in
""|invalid[)]
[/snip]



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


#33942 [Asn]: the patch to #33156 crash cygwin except cli

2005-08-01 Thread xuefer at 21cn dot com
 ID:   33942
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: cygwin only
 PHP Version:  5CVS-2005-08-01 (dev)
 Assigned To:  dmitry
 New Comment:

fastcgi, and maybe other sapi except cli/CGI!, as both cli/cgi exit
immediately after request shutdown

the patch nlopess posted should work (i did it after my report too)

but btw, the indention is not consistent with previous patch


Previous Comments:


[2005-08-01 23:25:06] [EMAIL PROTECTED]

I've tested the CLI and CGI sapis and eveything works fine. I couldn't
test further, because you didn't specify the sapi you were using.
Anyway, you are right and I missed the zend_unset_timeout() in my
patch.

Here is a patch that should fix your problem:
http://mega.ist.utl.pt/~ncpl/patch_cygwin_php.txt
Please test it.


Thanks,
Nuno



[2005-08-01 12:07:40] [EMAIL PROTECTED]

Dmitry, check your patch please. :)




[2005-08-01 06:47:30] xuefer at 21cn dot com

Description:

in reply to: http://bugs.php.net/bug.php?id=33156 (can't open the bug)

for CYGWIN
in zend_set_timeout()
ITIMER_REAL is set
in zend_unset_timeout()
ITIMER_REAL is NOT unset, but unset ITIMER_PROF instead

it has no problem with "make test" as the test won't last long. but
with any SAPI other than cli. ITIMER_REAL is triggered after php
request is shutdown, result a crash

Reproduce code:
---
set timeout to 5
./sapi/php -b 1026
request it with an empty php script
wait for 5 second countdown
crash






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


#33942 [NEW]: the patch to #33156 crash cygwin except cli

2005-07-31 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: cygwin only
PHP version:  5CVS-2005-08-01 (dev)
PHP Bug Type: Scripting Engine problem
Bug description:  the patch to #33156 crash cygwin except cli

Description:

in reply to: http://bugs.php.net/bug.php?id=33156 (can't open the bug)

for CYGWIN
in zend_set_timeout()
ITIMER_REAL is set
in zend_unset_timeout()
ITIMER_REAL is NOT unset, but unset ITIMER_PROF instead

it has no problem with "make test" as the test won't last long. but with
any SAPI other than cli. ITIMER_REAL is triggered after php request is
shutdown, result a crash

Reproduce code:
---
set timeout to 5
./sapi/php -b 1026
request it with an empty php script
wait for 5 second countdown
crash


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


#30453 [Com]: php parser does not work properly (2)

2005-07-28 Thread xuefer at 21cn dot com
 ID:   30453
 Comment by:   xuefer at 21cn dot com
 Reported By:  guth at fiifo dot u-psud dot fr
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS-2005-06-19
 Assigned To:  dmitry
 New Comment:

"extends" a parent class is exactly same when you want to "new" a
class

module.php:
// compile time binding (but "include" is "runtime")


Does not work:


But this works:


And this works:



compile time -> runtime
this might be hard for php user to figure it out. improve document
should be enough, i guess


Previous Comments:


[2005-06-19 14:44:43] [EMAIL PROTECTED]

module.php:


Does not work:


But this works:


And this works:






[2005-05-09 11:31:13] [EMAIL PROTECTED]

Andi, (or Dmitry maybe?) can you look into this?




[2004-10-16 02:06:37] guth at fiifo dot u-psud dot fr

Description:

Look at the following code...

Note that there is no difference between the first case and the third
case. I just add an include in the first case.

Reproduce code:
---
test3.php :








test4.php



Expected result:

Case 1 :
- Should work

Case 2 :
- Should work

Case 3 :
- Should work

Actual result:
--
Case 1 :
Fatal error: Class 'GroupModule' not found in /www/test3.php on line 4

Case 2 :
- Works fine

Case 3 :
- Works fine





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


#33562 [NEW]: date("") crash php

2005-07-03 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: cygwin
PHP version:  5CVS-2005-07-04 (dev)
PHP Bug Type: Date/time related
Bug description:  date("") crash php

Description:

Breakpoint 1, php_format_date (format=0x1015d770 "", format_len=0, 
t=0x1015ce28, localtime=1) at
/home/Xuefer/src/php5/ext/date/php_date.c:317
317 return string.c;
(gdb) p string.c
$2 = 0x0
(gdb) l
310 
311 smart_str_0(&string);
312 
313 if (localtime) {
314 timelib_time_offset_dtor(offset);
315 }
316 
317 return string.c;
318 }
(gdb) c
#0  0x610e9731 in strlen () from /usr/bin/cygwin1.dll
#1  0x004256f5 in php_date (ht=1, return_value=0x1015be68, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1)
at /home/Xuefer/src/php5/ext/date/php_date.c:344
crash at:
(gdb) fr 1
#1  0x004256f5 in php_date (ht=1, return_value=0x1015be68, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1)
at /home/Xuefer/src/php5/ext/date/php_date.c:344
344 RETVAL_STRING(string, 0);

Reproduce code:
---
php -r 'date("");'
or



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


#33545 [Fbk->Opn]: Cannot find any timezone setting

2005-07-02 Thread xuefer at 21cn dot com
 ID:   33545
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Date/time related
-Operating System: cygwin
+Operating System: cygwin fastcgi
 PHP Version:  5CVS-2005-07-02 (dev)
 Assigned To:  derick
 New Comment:

$ export TZ=GMT
$ echo $TZ
GMT
$ gdb --args ./sapi/cgi/php.exe -b 1026
(gdb) br main
Breakpoint 1 at 0x71a0ab: file
/home/Xuefer/src/php5/sapi/cgi/cgi_main.c, line 946.
(gdb) r
Starting program: /usr/src/php5-debug/sapi/cgi/php.exe -b 1026

Breakpoint 1, main (argc=3, argv=0x10031e60) at
/home/Xuefer/src/php5/sapi/cgi/cgi_main.c:946
946 {
(gdb) p getenv("PATH")
$3 = 268634357
(gdb) p getenv("_")
$4 = 268637882
(gdb) p getenv("WINDIR")
$5 = 268632983
(gdb) p getenv("OS")
$6 = 268633155
no problem with other env, except TZ
(gdb) p getenv("TZ")
$1 = 0
(gdb) l php_module_startup
(gdb) br 1401
Breakpoint 2 at 0x653624: file /home/Xuefer/src/php5/main/main.c, line
1401.
(gdb) c
Continuing.

Breakpoint 2, php_module_startup (sf=0x7a81e0, additional_modules=0x0,
num_additional_modules=0) at /home/Xuefer/src/php5/main/main.c:1401
1401tzset();
(gdb) p getenv("TZ")
$3 = 0
(gdb) n
1412le_index_ptr = zend_register_list_destructors_ex(NULL,
NULL, "index pointer", 0);
(gdb) p (char*)getenv("TZ")
$5 = 0x100301a3 "   -8"
(gdb)

i'm not sure it's problem of cygwin or php of corse, as cygwin is not
supported by php.
same problem in php4, but there's no warning with date() strtodate().
putenv("TZ=GMT"); helps, but not putenv("TZ"); in php script before
date()

";
echo "\nwith putenv TZ:";
putenv("TZ");
echo date("H");
echo "\nwith putenv TZ=GMT:";
putenv("TZ=GMT");
echo date("H");
echo "\nwith putenv TZ=GMT-8:";
putenv("TZ=GMT-8");
echo date("H");
echo "\nwith putenv TZ=   -8:"; // 3 spaces before +
putenv("TZ=   -8");
echo date("H");
?>

with putenv TZ:
Warning: date(): Cannot find any timezone setting in
/cygdrive/d/www/test/test.php on line 5

with putenv TZ=GMT:10
with putenv TZ=GMT-8:
Warning: date(): Cannot find any timezone setting in
/cygdrive/d/www/test/test.php on line 11

with putenv TZ=   -8:
Warning: date(): Cannot find any timezone setting in
/cygdrive/d/www/test/test.php on line 14




i have no problem with simple test program but no idea on how to go on
to trace php
int main() {}

$ gdb ./a.exe
(gdb) br main
Breakpoint 1 at 0x401056
(gdb) r
Starting program: /home/Xuefer/a.exe 

Breakpoint 1, 0x00401056 in main ()
(gdb) p (char*)getenv("TZ")
$2 = 0x4b08cb "GMT"

gcc -v
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
bash --version
GNU bash, version 2.05b.0(1)-release (i686-pc-cygwin)
autoconf --version
autoconf (GNU Autoconf) 2.59

http://sourceforge.net/tracker/?func=detail&atid=305470&aid=459385&group_id=5470


Previous Comments:


[2005-07-02 12:21:00] [EMAIL PROTECTED]

Apparently the TV environment variable *is* set... you need to try to
figure out where this happens. If it's not set by yourself, you should
try to figure out why cygwin does this - that's obviously not PHP's
problem.



[2005-07-02 06:45:15] xuefer at 21cn dot com

Description:

PHP 5.1.0-dev (cgi-fcgi) (built: Jun 28 2005 11:49:30) (DEBUG)

unset TZ && php.exe a.php
Content-type: text/html


Warning: date(): Cannot find any timezone setting in
/usr/src/php5-debug/a.php on line 2
/usr/src/php5-debug/a.php(2) : Warning - date(): Cannot find any
timezone setting

putenv("TZ"); before date() is ok however.
--

96  env = getenv("TZ");
97  if (env) {
98  return env;
99  }
(gdb) br 98
Breakpoint 1 at 0x42453b: file /usr/src/php5-src/ext/date/php_date.c,
line 98.
(gdb) r
Breakpoint 1, guess_timezone ()
98  return env;
(gdb) p env
$1 = 0x100301a3 "   -8"

but i can't figure where env TZ is set, not my shell nor my script

Reproduce code:
---







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


#33545 [NEW]: Cannot find any timezone setting

2005-07-01 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: cygwin
PHP version:  5CVS-2005-07-02 (dev)
PHP Bug Type: Date/time related
Bug description:  Cannot find any timezone setting

Description:

PHP 5.1.0-dev (cgi-fcgi) (built: Jun 28 2005 11:49:30) (DEBUG)

unset TZ && php.exe a.php
Content-type: text/html


Warning: date(): Cannot find any timezone setting in
/usr/src/php5-debug/a.php on line 2
/usr/src/php5-debug/a.php(2) : Warning - date(): Cannot find any timezone
setting

putenv("TZ"); before date() is ok however.
--

96  env = getenv("TZ");
97  if (env) {
98  return env;
99  }
(gdb) br 98
Breakpoint 1 at 0x42453b: file /usr/src/php5-src/ext/date/php_date.c, line
98.
(gdb) r
Breakpoint 1, guess_timezone ()
98  return env;
(gdb) p env
$1 = 0x100301a3 "   -8"

but i can't figure where env TZ is set, not my shell nor my script

Reproduce code:
---



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


#33017 [Opn]: make distclean give error outside of php-src

2005-05-12 Thread xuefer at 21cn dot com
 ID:   33017
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: Compile Warning
 Operating System: linux
 PHP Version:  4.3.11
 New Comment:

the problem of php_have_iconv.h is bogus.
i should have been buildconf after cvs up.
the egrep problem is still there

sorry to submit too fast. i'll check more before submit next time.


Previous Comments:


[2005-05-12 17:55:05] xuefer at 21cn dot com

even worse after configure && make:
/usr/src/php4/ext/iconv/php_iconv.h:36:38: ext/iconv/php_have_iconv.h:
No such file or directory



[2005-05-12 16:20:41] xuefer at 21cn dot com

Description:

when configure/compile outside of php source directory, make distclean
failed to figure out where configure is.

Reproduce code:
---
$ ../php4/configure 
...
$ make distclean
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
grep: configure: No such file or directory







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


#33017 [Opn]: make distclean give error outside of php-src

2005-05-12 Thread xuefer at 21cn dot com
 ID:   33017
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: Compile Warning
 Operating System: linux
 PHP Version:  4.3.11
 New Comment:

even worse after configure && make:
/usr/src/php4/ext/iconv/php_iconv.h:36:38: ext/iconv/php_have_iconv.h:
No such file or directory


Previous Comments:


[2005-05-12 16:20:41] xuefer at 21cn dot com

Description:

when configure/compile outside of php source directory, make distclean
failed to figure out where configure is.

Reproduce code:
---
$ ../php4/configure 
...
$ make distclean
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
grep: configure: No such file or directory







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


#33017 [NEW]: make distclean give error outside of php-src

2005-05-12 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  4.3.11
PHP Bug Type: Compile Warning
Bug description:  make distclean give error outside of php-src

Description:

when configure/compile outside of php source directory, make distclean
failed to figure out where configure is.

Reproduce code:
---
$ ../php4/configure 
...
$ make distclean
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
grep: configure: No such file or directory



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


#21306 [Opn]: [PATCH] warning about "cannot change the session settings"

2005-04-08 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: Session related
 Operating System: linux
-PHP Version:  PHP 4.3.11-dev
+PHP Version:  PHP 4.3.12-dev
 Assigned To:  sas
 New Comment:

anyone please take a look on it


Previous Comments:


[2005-02-12 09:23:34] Xuefer at 21cn dot com

confirmed with CVS
again, exit() in sess_write() cause this issue
other modules after session module is not shutdown properly

i don't see any fix in the php4-src/ext/session/ source



[2005-02-02 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".



[2005-01-25 15:28:30] [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





[2004-11-08 17:24:27] Xuefer at 21cn dot com

i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)

when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();

session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}

suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
==
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
==
to
==
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
==



[2003-05-20 10:03:32] [EMAIL PROTECTED]

Code being executed twice really sounds like a problem in the scripting
engine to me. It could be caused or triggered by defects in the tool
chain (buggy compiler optimizer, broken bison/flex).

Please retest with current Stable snapshot from snaps.php.net.



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

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


#21306 [NoF->Opn]: [PATCH] warning about "cannot change the session settings"

2005-02-12 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux
-PHP Version:  4.3.7
+PHP Version:  PHP 4.3.11-dev
 Assigned To:  sas
 New Comment:

confirmed with CVS
again, exit() in sess_write() cause this issue
other modules after session module is not shutdown properly

i don't see any fix in the php4-src/ext/session/ source


Previous Comments:


[2005-02-02 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".



[2005-01-25 15:28:30] [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





[2004-11-08 17:24:27] Xuefer at 21cn dot com

i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)

when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();

session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}

suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
==
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
==
to
==
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
==



[2003-05-20 10:03:32] [EMAIL PROTECTED]

Code being executed twice really sounds like a problem in the scripting
engine to me. It could be caused or triggered by defects in the tool
chain (buggy compiler optimizer, broken bison/flex).

Please retest with current Stable snapshot from snaps.php.net.



[2003-03-06 11:35:25] soletan at toxa dot de

Damn, I got rid of that message Xuefer initially posted. All I had done
was calling exit() before session could write back its data. 

Then I included session_write_close() before some exit. It's not that
exit inside some session_set_save_handler-calling function. It's any
exit at any place, I expect. 

Isn't it possible, to include this needed call to session_write_close()
automatically in sources of exit() to avoid all that trouble I have been
handling with for the last 24 hours??? It would be more convenient,
doesn't it?

BTW: I have PHP 4.3.1 as DSO to Apache 2.0.43 under SuSE Linux 7.1. The
first two are both self-compiled from source.


Best Regards,
Thomas Urban



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

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


#30849 [Fbk->Opn]: example conf of README.FastCGI is not secure

2004-12-13 Thread xuefer at 21cn dot com
 ID:   30849
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: win
 PHP Version:  4.3.9
 New Comment:

the bug is, "force_redirect" is not implemented by fastcgi sapi, maybe
this is a feature request?
this lead to same issue as CGI, because both of them use ScriptAlias
afaik, ScriptAlias is good for normal cgi program, but bad for
scripting-language without "force_redirect"

using ScriptAlias
http://your-server/fcgi/php-fcgi/abc.php
have same issue as:
http://your-server/cgi-bin/php-cgi/abc.php


the only thing i can do is to use "auto_prepend_file" add a script that
check $_SERVER, for REDIRECT_STATUS. this should be better done in api
imho.

i don't know how to explain, but it's same as cgi. just
"force_redirect" don't work and i need it


Previous Comments:


[2004-12-13 07:51:30] [EMAIL PROTECTED]

So where's the bug? Any patches perhaps..?


----------------

[2004-11-20 14:22:23] xuefer at 21cn dot com

Description:

sapi/cgi/README.FastCGI (with apache mod_fastcgi)
both ScriptAlias(dynserver) or Alias(static server) method issue a
security problem.
force_redirect is not done for fastcgi, only for cgi
this have same problem as cgi with no force_redirect
i guess redirect checking can be done after $_SERVER is ready, while
cgi use getenv.

separate php is not affected by this problem.







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


#30849 [NEW]: example conf of README.FastCGI is not secure

2004-11-20 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: win
PHP version:  4.3.9
PHP Bug Type: CGI related
Bug description:  example conf of README.FastCGI is not secure

Description:

sapi/cgi/README.FastCGI (with apache mod_fastcgi)
both ScriptAlias(dynserver) or Alias(static server) method issue a
security problem.
force_redirect is not done for fastcgi, only for cgi
this have same problem as cgi with no force_redirect
i guess redirect checking can be done after $_SERVER is ready, while cgi
use getenv.

separate php is not affected by this problem.



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


#21306 [Bgs->Opn]: warnning about "cannot change the session settings"

2004-11-08 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4.3.7
 New Comment:

i guess i've found the bug
it's a "exception safe" problem as c++
well, not php5 exception, i meant zend_bailout(longjmp)

when write handler issue a Fatal error, will trigger zend_bailout() and
skip ALL other modules rshutdown, including the one right after
session_flush_data();

session.c:
static void php_session_flush(TSRMLS_D)
{
if(PS(session_status)==php_session_active) {
php_session_save_current_state(TSRMLS_C); <-- NOT exception
safe using for mod_user.c
}
PS(session_status)=php_session_none; <- WON'T executed when
zend_bailout
}

suggested fix:
mod_user.c :: function PS_WRITE_FUNC(user)
chnage
==
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
==
to
==
zend_try {
retval = ps_call_handler(PSF(write), 2, args TSRMLS_CC);
} zend_end_try();
==


Previous Comments:


[2004-08-28 14:25:25] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.



----

[2004-08-28 07:22:43] Xuefer at 21cn dot com

i can confirm it in new php
however, this bug maybe relatived to:
http://bugs.php.net/?id=28708

NOSPAMdr_lucas:
do u do custom session save handler? or register_shutdown_function?



[2004-08-28 07:09:39] NOSPAMdr_lucas at hotmail dot com

Hello,

I am using oscommerce version 2.2 MS2 on:
HTTP Server:Apache/1.3.31 (Unix) mod_auth_passthrough/1.8
mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2634a
mod_ssl/2.8.19 OpenSSL/0.9.7a
PHP Version:4.3.8 (Zend: 1.3.0)

I am having the same exact problem. Watching my error.log shows many
occurances of this error message:
[27-Aug-2004 08:17:23] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:24] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:24] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:25] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:26] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:45] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:46] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:46] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:47] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:47] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:15] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:15] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:16] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:17] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:17] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:27] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:28] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini setting

#26223 [Opn]: Error message makes PHP crash (in some special cases)

2004-10-20 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: *General Issues
 Operating System: win32+rh7
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

sorry! ignore my previous note
when i press submit, i suddenly notice this piece of code is added by
myself for debugging purpose, not in php :(


Previous Comments:


[2004-10-20 17:40:05] Xuefer at 21cn dot com

by trying ZEND_DEBUG, i found it access hash in php_error_cb which is
destroyed
Debug output:
[1804] e:\work\php4\zend\zend_hash.c(886) : ht=0x00df9614 is already
destroyed

win32 stack backtrace show frame 3 at:
if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"),
(void **) &server_vars) == SUCCESS &&
Z_TYPE_PP(server_vars) == IS_ARRAY &&
zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_HOST",
sizeof("HTTP_HOST"), (void **) &host)==SUCCESS && Z_TYPE_PP(host) ==
IS_STRING &&
zend_hash_find(Z_ARRVAL_PP(server_vars), "REQUEST_URI",
sizeof("REQUEST_URI"), (void **) &uri)==SUCCESS && Z_TYPE_PP(uri) ==
IS_STRING &&
zend_hash_find(Z_ARRVAL_PP(server_vars), "REQUEST_METHOD",
sizeof("REQUEST_METHOD"), (void **) &method)==SUCCESS &&
Z_TYPE_PP(method) == IS_STRING &&
1
   ) {


note: log_errors is turned ON



[2004-10-18 14:36:30] mikael dot suvi at trigger dot ee

For the last sample crash script I did the following that fixed the
crash for php-5.0.2. Problem was that session_write handler is called
after the user defined shutdown functions. And
php_call_shutdown_functions has already freed global
user_shutdown_function_names the by the time session_write handler
tries to register shutdown function again.

=
diff ext/standard/basic_functions.c.old ext/standard/basic_functions.c
2195a2196
>   BG(user_shutdown_function_names) = NULL;
=



[2004-09-15 18:23:11] Xuefer at 21cn dot com

ok, i won't send corefile
os updated, this coredump is generated under linux
script updated:


the "open" handler should be callable or else:
Fatal error: session_start(): Failed to initialize storage module: user
(path: /tmp/) in /home/oursky/a.php on line 13

but when i change
session_set_save_handler('aa', 'b', 'b', 'aa', 'b', 'b');
to
session_set_save_handler('b',  'b', 'b', 'aa', 'b', 'b');
no coredump

very strange

----------------

[2004-09-15 18:13:08] [EMAIL PROTECTED]

thanks, but sending a core file is pointless without sending all
libraries and binaries over too. Btw, is the OS really "win32 only"?



[2004-09-15 17:51:48] Xuefer at 21cn dot com

core file will sent to sniper at **.net ok?

Starting program: /home/oursky/src/php4-www-debug/sapi/cli/php -c .
a.php

Program received signal SIGSEGV, Segmentation fault.
0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
390 p = ht->arBuckets[nIndex];
(gdb) bt
#0  0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
#1  0x08070bd0 in zif_register_shutdown_function (ht=1,
return_value=0xbfffeea0, this_ptr=0x0, return_value_used=0)
at /home/oursky/src/php4/ext/standard/basic_functions.c:2187
#2  0x080eee0f in execute (op_array=0x81549e0) at
/home/oursky/src/php4/Zend/zend_execute.c:1635
#3  0x080db4c2 in call_user_function_ex (function_table=0x8128f30,
object_pp=0x0, function_name=0x0, retval_ptr_ptr=0xb178,
param_count=2, 
params=0x8154dc4, no_separation=1, symbol_table=0x0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:567
#4  0x080dafd3 in call_user_function (function_table=0x39306535,
object_pp=0x39306535, function_name=0x39306535, retval_ptr=0x8154c44, 
param_count=135613340, params=0xb1c0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:409
#5  0x0805fdd8 in ps_write_user (mod_data=0x39306535, key=0x815487c
"77d6e387747ca3b89ae8236afa355e09", 
val=0x39306535 , vallen=0) at
/home/oursky/src/php4/ext/session/mod_user.c:60
#6  0x0805df86 in php_session_save_current_state () at
/home/oursky/src/php4/ext/session/session.c:694
#7  0x0805d9da

#26223 [Opn]: Error message makes PHP crash (in some special cases)

2004-10-20 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: *General Issues
 Operating System: win32+rh7
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

by trying ZEND_DEBUG, i found it access hash in php_error_cb which is
destroyed
Debug output:
[1804] e:\work\php4\zend\zend_hash.c(886) : ht=0x00df9614 is already
destroyed

win32 stack backtrace show frame 3 at:
if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"),
(void **) &server_vars) == SUCCESS &&
Z_TYPE_PP(server_vars) == IS_ARRAY &&
zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_HOST",
sizeof("HTTP_HOST"), (void **) &host)==SUCCESS && Z_TYPE_PP(host) ==
IS_STRING &&
zend_hash_find(Z_ARRVAL_PP(server_vars), "REQUEST_URI",
sizeof("REQUEST_URI"), (void **) &uri)==SUCCESS && Z_TYPE_PP(uri) ==
IS_STRING &&
zend_hash_find(Z_ARRVAL_PP(server_vars), "REQUEST_METHOD",
sizeof("REQUEST_METHOD"), (void **) &method)==SUCCESS &&
Z_TYPE_PP(method) == IS_STRING &&
1
   ) {


note: log_errors is turned ON


Previous Comments:


[2004-10-18 14:36:30] mikael dot suvi at trigger dot ee

For the last sample crash script I did the following that fixed the
crash for php-5.0.2. Problem was that session_write handler is called
after the user defined shutdown functions. And
php_call_shutdown_functions has already freed global
user_shutdown_function_names the by the time session_write handler
tries to register shutdown function again.

=
diff ext/standard/basic_functions.c.old ext/standard/basic_functions.c
2195a2196
>   BG(user_shutdown_function_names) = NULL;
=



[2004-09-15 18:23:11] Xuefer at 21cn dot com

ok, i won't send corefile
os updated, this coredump is generated under linux
script updated:


the "open" handler should be callable or else:
Fatal error: session_start(): Failed to initialize storage module: user
(path: /tmp/) in /home/oursky/a.php on line 13

but when i change
session_set_save_handler('aa', 'b', 'b', 'aa', 'b', 'b');
to
session_set_save_handler('b',  'b', 'b', 'aa', 'b', 'b');
no coredump

very strange

----------------

[2004-09-15 18:13:08] [EMAIL PROTECTED]

thanks, but sending a core file is pointless without sending all
libraries and binaries over too. Btw, is the OS really "win32 only"?



[2004-09-15 17:51:48] Xuefer at 21cn dot com

core file will sent to sniper at **.net ok?

Starting program: /home/oursky/src/php4-www-debug/sapi/cli/php -c .
a.php

Program received signal SIGSEGV, Segmentation fault.
0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
390 p = ht->arBuckets[nIndex];
(gdb) bt
#0  0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
#1  0x08070bd0 in zif_register_shutdown_function (ht=1,
return_value=0xbfffeea0, this_ptr=0x0, return_value_used=0)
at /home/oursky/src/php4/ext/standard/basic_functions.c:2187
#2  0x080eee0f in execute (op_array=0x81549e0) at
/home/oursky/src/php4/Zend/zend_execute.c:1635
#3  0x080db4c2 in call_user_function_ex (function_table=0x8128f30,
object_pp=0x0, function_name=0x0, retval_ptr_ptr=0xb178,
param_count=2, 
params=0x8154dc4, no_separation=1, symbol_table=0x0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:567
#4  0x080dafd3 in call_user_function (function_table=0x39306535,
object_pp=0x39306535, function_name=0x39306535, retval_ptr=0x8154c44, 
param_count=135613340, params=0xb1c0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:409
#5  0x0805fdd8 in ps_write_user (mod_data=0x39306535, key=0x815487c
"77d6e387747ca3b89ae8236afa355e09", 
val=0x39306535 , vallen=0) at
/home/oursky/src/php4/ext/session/mod_user.c:60
#6  0x0805df86 in php_session_save_current_state () at
/home/oursky/src/php4/ext/session/session.c:694
#7  0x0805d9da in zm_deactivate_session (type=1, module_number=2) at
/home/oursky/src/php4/ext/session/session.c:1598
#8  0x080e4c79 in module_registry_cleanup (module=0x39306535) at
/home/oursky/src/php4/Zend/zend_API.c:1167
#9  0x080e6f18 in zend_hash_apply (ht=0xb1c0, app

#26223 [Fbk->Opn]: Error message makes PHP crash (in some special cases)

2004-09-15 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
-Operating System: win32 only
+Operating System: win32+rh7
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

ok, i won't send corefile
os updated, this coredump is generated under linux
script updated:


the "open" handler should be callable or else:
Fatal error: session_start(): Failed to initialize storage module: user
(path: /tmp/) in /home/oursky/a.php on line 13

but when i change
session_set_save_handler('aa', 'b', 'b', 'aa', 'b', 'b');
to
session_set_save_handler('b',  'b', 'b', 'aa', 'b', 'b');
no coredump

very strange


Previous Comments:


[2004-09-15 18:13:08] [EMAIL PROTECTED]

thanks, but sending a core file is pointless without sending all
libraries and binaries over too. Btw, is the OS really "win32 only"?



[2004-09-15 17:51:48] Xuefer at 21cn dot com

core file will sent to sniper at **.net ok?

Starting program: /home/oursky/src/php4-www-debug/sapi/cli/php -c .
a.php

Program received signal SIGSEGV, Segmentation fault.
0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
390 p = ht->arBuckets[nIndex];
(gdb) bt
#0  0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
#1  0x08070bd0 in zif_register_shutdown_function (ht=1,
return_value=0xbfffeea0, this_ptr=0x0, return_value_used=0)
at /home/oursky/src/php4/ext/standard/basic_functions.c:2187
#2  0x080eee0f in execute (op_array=0x81549e0) at
/home/oursky/src/php4/Zend/zend_execute.c:1635
#3  0x080db4c2 in call_user_function_ex (function_table=0x8128f30,
object_pp=0x0, function_name=0x0, retval_ptr_ptr=0xb178,
param_count=2, 
params=0x8154dc4, no_separation=1, symbol_table=0x0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:567
#4  0x080dafd3 in call_user_function (function_table=0x39306535,
object_pp=0x39306535, function_name=0x39306535, retval_ptr=0x8154c44, 
param_count=135613340, params=0xb1c0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:409
#5  0x0805fdd8 in ps_write_user (mod_data=0x39306535, key=0x815487c
"77d6e387747ca3b89ae8236afa355e09", 
val=0x39306535 , vallen=0) at
/home/oursky/src/php4/ext/session/mod_user.c:60
#6  0x0805df86 in php_session_save_current_state () at
/home/oursky/src/php4/ext/session/session.c:694
#7  0x0805d9da in zm_deactivate_session (type=1, module_number=2) at
/home/oursky/src/php4/ext/session/session.c:1598
#8  0x080e4c79 in module_registry_cleanup (module=0x39306535) at
/home/oursky/src/php4/Zend/zend_API.c:1167
#9  0x080e6f18 in zend_hash_apply (ht=0xb1c0, apply_func=0x815560c)
at /home/oursky/src/php4/Zend/zend_hash.c:701
#10 0x080e1d64 in zend_deactivate_modules () at
/home/oursky/src/php4/Zend/zend.c:652
#11 0x080b93a5 in php_request_shutdown (dummy=0x0) at
/home/oursky/src/php4/main/main.c:991
#12 0x080f35f8 in main (argc=4, argv=0xba44) at
/home/oursky/src/php4/sapi/cli/php_cli.c:873
#13 0x400a0657 in __libc_start_main (main=0x80f3190 , argc=4,
ubp_av=0xba44, init=0x8059c1c <_init>, fini=0x80f4700 <_fini>, 
rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xba3c) at
../sysdeps/generic/libc-start.c:129
(gdb)



[2004-09-15 15:37:17] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.





[2004-07-03 08:55:23] Xuefer at 21cn dot com

the following script in php4CVS crash



while doing the following is fine:




[2004-04-21 06:32:51] Xuefer at 21cn dot com

seems fixed

but when i do "glob/unlink/rmdir" in session write handler, and it
crash randomly. still can't make a reproduciable script yet :(

marking this bug as closed



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

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


#26223 [Fbk->Opn]: Error message makes PHP crash (in some special cases)

2004-09-15 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: win32 only
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

core file will sent to sniper at **.net ok?

Starting program: /home/oursky/src/php4-www-debug/sapi/cli/php -c .
a.php

Program received signal SIGSEGV, Segmentation fault.
0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
390 p = ht->arBuckets[nIndex];
(gdb) bt
#0  0x080e67ab in zend_hash_index_update_or_next_insert (ht=0x8154ddc,
h=945959777, pData=0xbfffeea0, nDataSize=8, pDest=0x0, flag=4)
at /home/oursky/src/php4/Zend/zend_hash.c:390
#1  0x08070bd0 in zif_register_shutdown_function (ht=1,
return_value=0xbfffeea0, this_ptr=0x0, return_value_used=0)
at /home/oursky/src/php4/ext/standard/basic_functions.c:2187
#2  0x080eee0f in execute (op_array=0x81549e0) at
/home/oursky/src/php4/Zend/zend_execute.c:1635
#3  0x080db4c2 in call_user_function_ex (function_table=0x8128f30,
object_pp=0x0, function_name=0x0, retval_ptr_ptr=0xb178,
param_count=2, 
params=0x8154dc4, no_separation=1, symbol_table=0x0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:567
#4  0x080dafd3 in call_user_function (function_table=0x39306535,
object_pp=0x39306535, function_name=0x39306535, retval_ptr=0x8154c44, 
param_count=135613340, params=0xb1c0) at
/home/oursky/src/php4/Zend/zend_execute_API.c:409
#5  0x0805fdd8 in ps_write_user (mod_data=0x39306535, key=0x815487c
"77d6e387747ca3b89ae8236afa355e09", 
val=0x39306535 , vallen=0) at
/home/oursky/src/php4/ext/session/mod_user.c:60
#6  0x0805df86 in php_session_save_current_state () at
/home/oursky/src/php4/ext/session/session.c:694
#7  0x0805d9da in zm_deactivate_session (type=1, module_number=2) at
/home/oursky/src/php4/ext/session/session.c:1598
#8  0x080e4c79 in module_registry_cleanup (module=0x39306535) at
/home/oursky/src/php4/Zend/zend_API.c:1167
#9  0x080e6f18 in zend_hash_apply (ht=0xb1c0, apply_func=0x815560c)
at /home/oursky/src/php4/Zend/zend_hash.c:701
#10 0x080e1d64 in zend_deactivate_modules () at
/home/oursky/src/php4/Zend/zend.c:652
#11 0x080b93a5 in php_request_shutdown (dummy=0x0) at
/home/oursky/src/php4/main/main.c:991
#12 0x080f35f8 in main (argc=4, argv=0xba44) at
/home/oursky/src/php4/sapi/cli/php_cli.c:873
#13 0x400a0657 in __libc_start_main (main=0x80f3190 , argc=4,
ubp_av=0xba44, init=0x8059c1c <_init>, fini=0x80f4700 <_fini>, 
rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xba3c) at
../sysdeps/generic/libc-start.c:129
(gdb)


Previous Comments:


[2004-09-15 15:37:17] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.



------------

[2004-07-03 08:55:23] Xuefer at 21cn dot com

the following script in php4CVS crash



while doing the following is fine:


------------

[2004-04-21 06:32:51] Xuefer at 21cn dot com

seems fixed

but when i do "glob/unlink/rmdir" in session write handler, and it
crash randomly. still can't make a reproduciable script yet :(

marking this bug as closed



[2004-04-21 00:14:06] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2004-04-13 12:55:35] [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 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/26223

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


#21306 [NoF->Opn]: warnning about "cannot change the session settings"

2004-08-27 Thread Xuefer at 21cn dot com
 ID:   21306
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux
-PHP Version:  4.3.0
+PHP Version:  4.3.7
 New Comment:

i can confirm it in new php
however, this bug maybe relatived to:
http://bugs.php.net/?id=28708

NOSPAMdr_lucas:
do u do custom session save handler? or register_shutdown_function?


Previous Comments:


[2004-08-28 07:09:39] NOSPAMdr_lucas at hotmail dot com

Hello,

I am using oscommerce version 2.2 MS2 on:
HTTP Server:Apache/1.3.31 (Unix) mod_auth_passthrough/1.8
mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2634a
mod_ssl/2.8.19 OpenSSL/0.9.7a
PHP Version:4.3.8 (Zend: 1.3.0)

I am having the same exact problem. Watching my error.log shows many
occurances of this error message:
[27-Aug-2004 08:17:23] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:24] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:24] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:25] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 08:17:26] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:45] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:46] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:46] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:47] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 11:37:47] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:15] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:15] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:16] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:17] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 14:01:17] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:27] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:28] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:29] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:29] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0
[27-Aug-2004 16:19:30] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0

Any news about how I can fix that?



[2004-06-09 22:58:52] [EMAIL PROTECTED]

Try upgrading to the latest stable release (4.3.7 ATM) and avoid using
Apache2 in production environments, the docs already warned you about
it and you must have known, that Apache2 with PHP is unstable ATM.



[2004-06-09 22:41:29] carlos dot mafla at calipso dot com dot co

I got that warning too with some php scripts ...( Warning: Unknown(): A
session is active. You cannot change the session module's ini settings
at this time. in Unknown on line 0 ).

The scripts are the same and are placed in two different servers, one
with php 4.3.1 and apache 1.3 and the other one with ph

#29658 [Bgs->Opn]: #!php with paramters is broken

2004-08-13 Thread xuefer at 21cn dot com
 ID:   29658
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
-Bug Type: CGI related
+Bug Type: Feature/Change Request
-Operating System: xp/linux
+Operating System: xp+cygwin &linux
 PHP Version:  4.3.8
 New Comment:

changed to feature request
updated os

how about:
#!/usr/bin/php -p ""
p means parameters (or -o options)
and the string after it is parsed as command line options as shell do


Previous Comments:


[2004-08-13 19:21:04] [EMAIL PROTECTED]

#! is a unixy thing that is not supported on windows.
Additionally, most OS's don't support more than a single parameter
there.
Not a PHP bug.



[2004-08-13 19:04:41] xuefer at 21cn dot com

Description:

touch php.ini

./test | grep php.ini

-i paramter works
but -c not

seems those spaces is not convert to '\0'

sapi/cli/php_cli.c

while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg,
&php_optind, 0))!=-1) {
switch (c) {
case 'c':
cli_sapi_module.php_ini_path_override =
strdup(php_optarg);
/*debug*/
printf("%d %d '%s'\n", (int) php_optarg[0], strlen(php_opt_arg),
php_optarg);
break;
case 'n':
cli_sapi_module.php_ini_ignore = 1;
break;
}
}


got "32 2 ' .'"


seems a problem of the shell

if -c is ok to be left broken.
-i shouldn't be working too

but allowing options in #! is very useful


Reproduce code:
---
#!/usr/bin/php -i -c .
// empty file


Expected result:

Configuration File (php.ini) Path => /etc/php.ini


Actual result:
--
Configuration File (php.ini) Path => ./php.ini






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


#29658 [NEW]: #!php with paramters is broken

2004-08-13 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: xp/linux
PHP version:  4.3.8
PHP Bug Type: CGI related
Bug description:  #!php with paramters is broken

Description:

touch php.ini

./test | grep php.ini

-i paramter works
but -c not

seems those spaces is not convert to '\0'

sapi/cli/php_cli.c

while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind,
0))!=-1) {
switch (c) {
case 'c':
cli_sapi_module.php_ini_path_override = strdup(php_optarg);
/*debug*/
printf("%d %d '%s'\n", (int) php_optarg[0], strlen(php_opt_arg),
php_optarg);
break;
case 'n':
cli_sapi_module.php_ini_ignore = 1;
break;
}
}


got "32 2 ' .'"


seems a problem of the shell

if -c is ok to be left broken.
-i shouldn't be working too

but allowing options in #! is very useful


Reproduce code:
---
#!/usr/bin/php -i -c .
// empty file


Expected result:

Configuration File (php.ini) Path => /etc/php.ini


Actual result:
--
Configuration File (php.ini) Path => ./php.ini


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


#29357 [NEW]: "constant already defined error" is messed up

2004-07-23 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux&xp
PHP version:  4.3.7
PHP Bug Type: Unknown/Other Function
Bug description:  "constant already defined error" is messed up

Description:

php -r 'define("a", 1); define("a", 1);'

Notice: Constant [EMAIL PROTECTED]@ already defined in Command line code on line



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


#29262 [NEW]: [session feature] make session_id() possible to called after session_start()

2004-07-19 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: xp
PHP version:  4.3.8
PHP Bug Type: Feature/Change Request
Bug description:  [session feature] make session_id() possible to called after 
session_start()

Description:

current limitation:
session_id() needs to be called before session_start() for that
purpose(change sid)

but session_regenerate_id() can be called AFTER session_start();

so why not make session_id($sid) the same way?
session_id($sid) use old scheme before session_start(); (BC)
and do update SID/send cookie after session_start() (new feature)

the reason to do this is: i'd have same userid use same session, the new
one will search for old sessionid (which is better done in session read
callback), and session_id($oldsid)


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


#29060 [NEW]: more settings to current main/rfc1867.c implement logic

2004-07-07 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: all
PHP version:  4.3.7
PHP Bug Type: Feature/Change Request
Bug description:  more settings to current main/rfc1867.c implement logic

Description:

the current "resource control" logic main/rfc1867.c implemented is not
pretty enough.
it didn't take enough care of server resources when user upload "too
large" file
issue 1. memory
i'd like to set post_max_size=2M or 3M etc.
but i can't, cos upload file size often exceeds this limit.
then i let it be 8M, but how if someone just post a 8m text(not file)? 8M
data is get into php's memory, just 10 users can make php use 80MB memory,
well there is memory_limit, but it seems only good for "php script
execution memory usage", the $_POST size should be calc "alone"

issue 2. network traffic
i'd like to tune upload_max_size=8M (each file).
some user can only upload 1M pre file, we can set
MAX_FILE_SIZE="", but then? php read up to 1M, and notice it
exceeded MAX_UPLOAD_SIZE. canceling upload, starting to execute phpscript.
this however waste 1Mbyte traffic, which is 8Mbits(also waste of time,
_bad_ user experience)

issue 3. temp disk usage
when i set upload_max_size=1M, and post_max_upload=8M
with 8 multi uploads, each 1M, can eat up 8M disk usage(temp file).
well this isn't a teribble issue. at least, disk is always larger than
memory

it's nice if we can control:
max $_POST size
ini=?? (for "issue 1", memory usage)
form=not needed
max Request-Content-Length
ini=post_max_size
form=??? (for "issue 2", cancel upload ASAP)
max size per file
ini=upload_max_filesize
form=MAX_FILE_SIZE
max total file size
ini=needed?
form=needed?
ini means: hard set in ini
form means: soft set in form,



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


#26223 [Csd->Opn]: Error message makes PHP crash (in some special cases)

2004-07-02 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Closed
+Status:   Open
 Bug Type: *General Issues
 Operating System: win32 only
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

the following script in php4CVS crash



while doing the following is fine:



Previous Comments:


[2004-04-21 06:32:51] Xuefer at 21cn dot com

seems fixed

but when i do "glob/unlink/rmdir" in session write handler, and it
crash randomly. still can't make a reproduciable script yet :(

marking this bug as closed



[2004-04-21 00:14:06] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2004-04-13 12:55:35] [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





[2004-02-13 10:02:13] [EMAIL PROTECTED]

The crash happens in the error outputting
functions..php_docref..something. Marcus broke it so Marcus fixes it.


----

[2003-11-17 23:08:44] Xuefer at 21cn dot com

i'm not familiar with debugging
i'm stucked

with same script
still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)

but not crash on:
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip
output:

Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14
warning: ---

warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:

warning: Beginning: 
warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)

warning:   End: 
warning: OK

warning: ---

[Tue Nov 18 11:23:53 2003]  Script:  'test.php'

Program exited normally.



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

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


#28242 [Com]: A site's session data is available for all virtual hosts on same server

2004-07-01 Thread xuefer at 21cn dot com
 ID:   28242
 Comment by:   xuefer at 21cn dot com
 Reported By:  php at ter dot dk
 Status:   Bogus
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.3.6
 New Comment:

thinking this bug as bogus is M$ behavior.
just like win2k/xp Pro: make all users use administrator by default(low
secure), and say "hey you're using admin, it's dangerious!". but what's
the result? many and many users use admin, and lead to security
problem.

cross site caching/sessioning is already discussed in turck-mmcache,
and fixed.
and "cross site exception" is in the author's todo list.

adding a SERVER_NAME to the key/sessionid(only when read/write) should
easily solve the problem
session.allow_cross_site = 0 ; by default

session file-handler should be something like:
put_file_content($path . '/'
 . (session.allow_cross_site ? urlencode($_SERVER['SERVER_NAME']) . ':'
: ''
. $sessionid, session_encode())

i don't see any BC problem unless some site is doing:
redirect example.com <-> www.example.com frequently


Previous Comments:


[2004-07-01 11:00:29] [EMAIL PROTECTED]

i agree with Peter, because i had servers with virtual shared users,
but i think the problem resides in the security documentation.

The problems are a lot different when you have a virtual server,
because a lot of users run their different scripts, so its not as easy
as activating safe_mode if you want to secure it.

Should be created a different category in the Security chapter, to look
into all sensitive attributes in php.ini (like session.save_path,
disable_functions, etc.) that could cause problems to a virtual
server.

On the other side, the developers should be thought to add to their
session, variables like: 
-users ip
-domain name



So, my proposal would still be, just as a solution to gain access to
other users' passwords at the same server using the same realm, to add
the UID of the script to the session-filename when in safe mode.


I dont see why only in safe mode.

>From my tests, i noticed that configuring php will not help you secure
your web server, there are things like permissions that i had some
problems. Like in a shared environment i could compromise sensitive
files with file manipulation functions (ex. fopen, read, etc), just
getting out of my /home/user/ dir. But i guess this is some kind of
another story.

Serban Gh. Ghita
PHP.net manual



[2004-05-01 18:24:48] php at ter dot dk

schlueter:

1. PHP would have easy access to the servername, where available.

1.1. Another approach, that might be more alike existing solutions
would be, when in safe mode, to add the UID of the script to the
session id. This solution is already used when using HTTP-based
authentication in Safe Mode (UID added to the Realm).

2. My experience would say that the fewest service providers configures
a unique save_path for each user. Yes, I know how to configure PHP
myself, but that has no effect on rest of the world.

3. The argument is flawed. It's very easy just to play "King of my
castle"-sysadmin, but let's look at the case in a broader perspective:
The superglobals were introduced to prevent some user errors. One might
have used the same argument, "It's the users' fault", which might be
correct, BUT when a problem is as widespread, it is a global problem
and should be handled as such, with centralized solutions, instead of
just blaming everybody else.

3.1. You might change the category to a documentation-issue, but all
the documentation states under sessions is "You need to take additional
measures to actively protect the integrity of the session, depending on
the value associated with it.". The security-chapter doesn't mention
anything about this at all!

Using the same debate technique, one might state: PHP isn't interested
in security (or ther users' security). The documentation doesn't
provide enough explanation about this issue.


So, my proposal would still be, just as a solution to gain access to
other users' passwords at the same server using the same realm, to add
the UID of the script to the session-filename when in safe mode.

That would be pretty much in the spirit of safe mode (user separation),
as file access, HTTP-authentication, etc. are based on information about
UID.

Any cons against this proposal?



[2004-05-01 17:43:25] schlueter at phpbar dot de

PHP does neither know something about different sites nor 
where to write sessions except from /tmp so the provider 
has to tell it. 
Most providers I know set the session.save_path per user 
in the Apach

#28864 [NEW]: function to check if POST data is complete

2004-06-21 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: all
PHP version:  4.3.7
PHP Bug Type: Feature/Change Request
Bug description:  function to check if POST data is complete

Description:

due to network issue, or stopped by user
the content submitted by user maybe incomplete;
there should be a way to check it.
it's serious if the admins submit a incomplete post data. that will do
unrecoverable damage.

i'd like if there's a function:
int content_is_complete()
which
  return strlen(content) == Content-Length;


yes, we can do '', and do
isset($_POST['complete'])
but this is not easy for those html-designers to add it each  by
hand

'', and do isset($_POST['submit']), but not
all "submit" is the last element of form


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


#28833 [NEW]: make array_multisort more easy to use

2004-06-18 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: all
PHP version:  4.3.7
PHP Bug Type: Feature/Change Request
Bug description:  make array_multisort more easy to use

Description:

$ar = array(array("10", 100, 100, "a"), array(1, 3, "2", 1)); 

we now must do:
array_multisort($ar[0], SORT_ASC, SORT_STRING, 
   $ar[1], SORT_NUMERIC, SORT_DESC); 

1.


how about:
array_multisort($ar, "0", SORT_ASC, SORT_STRING, 
   "1", SORT_NUMERIC, SORT_DESC); 

but "int" type of key may mixed with sort flags :(

nicer example:
$ar = array('abc' => array("10", 100, 100, "a"), 'def' => array(1, 3, "2",
1)); 
array_multisort($ar, "abc", SORT_ASC, SORT_STRING, 
   "def", SORT_NUMERIC, SORT_DESC); 

this is VERY useful when you have so many arrays in $ar, but only want to
sort BY some of it

2.

because "SHOW PROCESSLIST" cannot do a "ORDER BY"
we need:
/*
$rows = array();
while ($row = mysqli_fetch_assoc()) {
  $rows[] = $row;
}
*/
$rows = array(
  array('a' => "10", 'b' => 100, 'c' => 100, 'd' => "a"),
  array('a' => 1, 'a' => 3, 'a' => "2", 'd' => 1)
); 
array_multisort_rows($row, "a", SORT_ASC, SORT_STRING, 
   "b", SORT_NUMERIC, SORT_DESC); 



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


#28818 [NEW]: missing ctx->finfo.st_dev

2004-06-17 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  4.3.7
PHP Bug Type: Apache2 related
Bug description:  missing ctx->finfo.st_dev

Description:

affected pecl/apc
patch:

cvs diff: Diffing .
Index: sapi_apache2.c
===
RCS file: /repository/php-src/sapi/apache2handler/sapi_apache2.c,v
retrieving revision 1.1.2.30
diff -u -r1.1.2.30 sapi_apache2.c
--- sapi_apache2.c  16 Mar 2004 22:38:17 -  1.1.2.30
+++ sapi_apache2.c  17 Jun 2004 12:21:41 -
@@ -179,6 +179,7 @@
 
ctx->finfo.st_uid = ctx->r->finfo.user;
ctx->finfo.st_gid = ctx->r->finfo.group;
+   ctx->finfo.st_dev = ctx->r->finfo.device;
ctx->finfo.st_ino = ctx->r->finfo.inode;
 #if defined(NETWARE) && defined(CLIB_STAT_PATCH)
ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/100;



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


#28708 [Fbk->Opn]: move_uploaded_file to no Permission dir make php crash

2004-06-10 Thread xuefer at 21cn dot com
 ID:   28708
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: linux & xp
 PHP Version:  4.3.7
 New Comment:

done with CFLAGS="-g"

coredump:

#0  0x404879ab in zif_move_uploaded_file (ht=2, return_value=0x84a5954,

this_ptr=0x0, return_value_used=1)
at /home/oursky/src/php4/ext/standard/basic_functions.c:2821
2821php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to move 
'%s'
to '%s'", Z_STRVAL_PP(path), Z_STRVAL_PP(new_path));

Backtrace:
---

#0  0x404879ab in zif_move_uploaded_file (ht=2, return_value=0x84a5954,

this_ptr=0x0, return_value_used=1)
at /home/oursky/src/php4/ext/standard/basic_functions.c:2821
#1  0x4052b828 in execute (op_array=0x85ce660)
at /home/oursky/src/php4/Zend/zend_execute.c:1635
#2  0x4052b594 in execute (op_array=0x86023f4)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#3  0x40516042 in call_user_function_ex (function_table=0xbfffa0f0, 
object_pp=0x84a56a8, function_name=0x864641c,
retval_ptr_ptr=0xbfff9cec, 
param_count=4, params=0x84a58cc, no_separation=0,
symbol_table=0x0)
at /home/oursky/src/php4/Zend/zend_execute_API.c:567
#4  0x404855f7 in zif_call_user_func_array (ht=2,
return_value=0x84a572c, 
this_ptr=0x0, return_value_used=1)
at /home/oursky/src/php4/ext/standard/basic_functions.c:1946
#5  0x4052b828 in execute (op_array=0x85294cc)
at /home/oursky/src/php4/Zend/zend_execute.c:1635
#6  0x4052b594 in execute (op_array=0x839aa54)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#7  0x4052b594 in execute (op_array=0x85fbed4)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#8  0x4052b594 in execute (op_array=0x85fc08c)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#9  0x4052b594 in execute (op_array=0x8575414)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#10 0x4052b594 in execute (op_array=0x85ec564)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#11 0x4052b594 in execute (op_array=0x831638c)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#12 0x4052b594 in execute (op_array=0x844848c)
at /home/oursky/src/php4/Zend/zend_execute.c:1679
#13 0x4051dbfc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/oursky/src/php4/Zend/zend.c:891
#14 0x404f1c2c in php_execute_script (primary_file=0xb680)
at /home/oursky/src/php4/main/main.c:1731
#15 0x4053183b in php_handler (r=0x863f840)
at /home/oursky/src/php4/sapi/apache2handler/sapi_apache2.c:561
#16 0x080af7e0 in ap_invoke_handler ()
#17 0x0809164b in ap_process_request ()
#18 0x0808bd2c in ap_process_http_connection ()
#19 0x080bc385 in ap_process_connection ()
#20 0x080af2da in child_main ()
#21 0x080ae144 in make_child ()
#22 0x080ae489 in perform_idle_server_maintenance ()
#23 0x080adaed in ap_mpm_run ()
#24 0x080b56a1 in main ()
#25 0x402b0657 in __libc_start_main (main=0x80b4cd0 , argc=3, 
ubp_av=0xbae4, init=0x806693c <_init>, fini=0x80d5540 <_fini>,

rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xbadc)
at ../sysdeps/generic/libc-start.c:129

Php dump:
---

"common.function_name: "$1 = 0x40572a5c "move_uploaded_file"


Previous Comments:


[2004-06-10 16:01:19] [EMAIL PROTECTED]

Are you using thread-safe PHP? Try compiling php with 
--enable-debug, this should produce a more detailed 
backtrace. 

----------------

[2004-06-10 03:25:13] xuefer at 21cn dot com

backtrace:
#0  0x404878fb in zif_move_uploaded_file () from
/www/modules/libphp4.so
#1  0x4052b6f8 in execute () from /www/modules/libphp4.so
#2  0x4052b464 in execute () from /www/modules/libphp4.so
#3  0x40515f12 in call_user_function_ex () from
/www/modules/libphp4.so
#4  0x40485547 in zif_call_user_func_array () from
/www/modules/libphp4.so
#5  0x4052b6f8 in execute () from /www/modules/libphp4.so
#6  0x4052b464 in execute () from /www/modules/libphp4.so
#7  0x4052b464 in execute () from /www/modules/libphp4.so
#8  0x4052b464 in execute () from /www/modules/libphp4.so
#9  0x4052b464 in execute () from /www/modules/libphp4.so
#10 0x4052b464 in execute () from /www/modules/libphp4.so
#11 0x4052b464 in execute () from /www/modules/libphp4.so
#12 0x4052b464 in execute () from /www/modules/libphp4.so
#13 0x4051dacc in zend_execute_scripts () from /www/modules/libphp4.so
#14 0x404f1b6c in php_execute_script () from /www/modules/libphp4.so
#15 0x4053170b in php_handler () from /www/modules/libphp4.so
#16 0x080af7e0 in ap_invoke_handler ()
#17 0x0809164b in ap_process_request ()
#18 0x0808bd2c in ap_process_http_connection ()
#19 0x080bc385 in ap_process_connection ()
#20 0x080af2da in child_main ()
#21 0x

#28708 [Bgs->Opn]: move_uploaded_file to no Permission dir make php crash

2004-06-09 Thread xuefer at 21cn dot com
 ID:   28708
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Filesystem function related
-Operating System: linux
+Operating System: linux & xp
 PHP Version:  4.3.7
 New Comment:

backtrace:
#0  0x404878fb in zif_move_uploaded_file () from
/www/modules/libphp4.so
#1  0x4052b6f8 in execute () from /www/modules/libphp4.so
#2  0x4052b464 in execute () from /www/modules/libphp4.so
#3  0x40515f12 in call_user_function_ex () from
/www/modules/libphp4.so
#4  0x40485547 in zif_call_user_func_array () from
/www/modules/libphp4.so
#5  0x4052b6f8 in execute () from /www/modules/libphp4.so
#6  0x4052b464 in execute () from /www/modules/libphp4.so
#7  0x4052b464 in execute () from /www/modules/libphp4.so
#8  0x4052b464 in execute () from /www/modules/libphp4.so
#9  0x4052b464 in execute () from /www/modules/libphp4.so
#10 0x4052b464 in execute () from /www/modules/libphp4.so
#11 0x4052b464 in execute () from /www/modules/libphp4.so
#12 0x4052b464 in execute () from /www/modules/libphp4.so
#13 0x4051dacc in zend_execute_scripts () from /www/modules/libphp4.so
#14 0x404f1b6c in php_execute_script () from /www/modules/libphp4.so
#15 0x4053170b in php_handler () from /www/modules/libphp4.so
#16 0x080af7e0 in ap_invoke_handler ()
#17 0x0809164b in ap_process_request ()
#18 0x0808bd2c in ap_process_http_connection ()
#19 0x080bc385 in ap_process_connection ()
#20 0x080af2da in child_main ()
#21 0x080ae144 in make_child ()
#22 0x080ae539 in perform_idle_server_maintenance ()
#23 0x080adaed in ap_mpm_run ()
#24 0x080b56a1 in main ()
#25 0x402b0657 in __libc_start_main (main=0x80b4cd0 , argc=3, 
ubp_av=0xbae4, init=0x806693c <_init>, fini=0x80d5540 <_fini>,

rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xbadc)
at ../sysdeps/generic/libc-start.c:129


Previous Comments:


[2004-06-09 16:14:03] [EMAIL PROTECTED]

Cannot replicate the bug, I get the same error messages, 
however the error correctly displays the filenames 
involved. The error seems to be caused by an unrelated 
memory corruption. 



[2004-06-09 09:21:41] xuefer at 21cn dot com

Description:

move_uploaded_file to NO Permission dir get make crash

in shell: chmod 000 /path/to
in php: move_uploaded_file($_FILES['userfile']['tmp_name'],
'/path/to/file.jpg');

crash or show 2 error:
move_uploaded_file(/path/to/file.jpg): failed to open stream:
Permission denied
move_uploaded_file(): Unable to move '[EMAIL PROTECTED]
' to '@ËZ€V,'







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


#28708 [NEW]: move_uploaded_file to no Permission dir make php crash

2004-06-09 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  4.3.7
PHP Bug Type: Filesystem function related
Bug description:  move_uploaded_file to no Permission dir make php crash

Description:

move_uploaded_file to NO Permission dir get make crash

in shell: chmod 000 /path/to
in php: move_uploaded_file($_FILES['userfile']['tmp_name'],
'/path/to/file.jpg');

crash or show 2 error:
move_uploaded_file(/path/to/file.jpg): failed to open stream: Permission
denied
move_uploaded_file(): Unable to move '[EMAIL PROTECTED]
' to '@ËZ€V,'



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


#28649 [NEW]: glob() nomatch return false

2004-06-06 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  4.3.7
PHP Bug Type: Directory function related
Bug description:  glob() nomatch return false

Description:

i don't know what this modify do, but it broke what the comment say.
relatived to #28289 ?
http://bugs.php.net/bug.php?id=28289

@@ -388,10 +390,14 @@
/* Linux handles no matches as an error condition,
but FreeBSD
 * doesn't. This ensure that if no match is found,
an empty array
 * is always returned so it can be used without
worrying in e.g.
 * foreach() */
+#if __linux__
+   RETURN_FALSE;
+#else
array_init(return_value);
return;
+#endif


Reproduce code:
---
php -r 'var_dump(glob("abcdefg"));'


Expected result:

an empty array()

Actual result:
--
bool(false)


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


#27584 [Bgs->Opn]: flush sometimes don't work

2004-05-11 Thread xuefer at 21cn dot com
 ID:   27584
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  4CVS-2004-03-13
 Assigned To:  iliaa
 New Comment:

i've already tried "RemoveOutputFilter" in httpd.conf of apache2
but with no luck, it's an internal filter

should apache or php solve this bug?


Previous Comments:


[2004-05-11 15:52:08] [EMAIL PROTECTED]

oops ment to bogus it. 



[2004-05-11 15:51:47] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP cannot possibly predict all ap2 filters that may 
conflict with PHP output and it would not be a good idea 
(IMHO) to remove all filters before executing PHP. I'd say 
it is up to the user to determine which filters are 
possibly incompatible and handle the situation 
appropriately. 



[2004-04-29 23:08:48] [EMAIL PROTECTED]

Ilia, check above comment..


----

[2004-04-22 13:10:07] xuefer at 21cn dot com

php apache2handler should remove "BYTERANGE" outputfilter

example code is in:
./modules/experimental/cache_util.c
line 82

CACHE_DECLARE(void) ap_cache_reset_output_filters(request_rec *r)
{
ap_filter_t *f = r->output_filters;

while (f) {
if (!strcasecmp(f->frec->name, "CORE") ||
!strcasecmp(f->frec->name, "CONTENT_LENGTH") ||
!strcasecmp(f->frec->name, "HTTP_HEADER")) {
f = f->next;
continue;
}
else {
ap_remove_output_filter(f);
f = f->next;
}
}
}



[2004-03-16 11:45:18] [EMAIL PROTECTED]

read above message 



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

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


#28289 [Opn]: glob /xx relative to curdir, not curdrive under windows

2004-05-05 Thread xuefer at 21cn dot com
 ID:   28289
 User updated by:  xuefer at 21cn dot com
-Summary:  glob does not support / under windows
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: winxp
 PHP Version:  4.3.6
 New Comment:

it takes me so long time to figure it out: no, don't test it under /


C:\>mkdir tmp

C:\>cd tmp

C:\tmp>mkdir abc

C:\tmp>echo > abc\def

C:\tmp>d:\www\php4\cli\php.exe -r "var_dump(glob('/abc/*'));"
array(1) {
  [0]=>
  string(8) "/abc/def"
}

C:\tmp>d:\www\php4\cli\php.exe -r "var_dump(glob('/tmp/abc/*'));"
array(0) {
}


Previous Comments:


[2004-05-06 06:01:45] fvignals at ibsmedia dot com

-- test 1 --

-- test 2 --

-- test 3 --

-- test 4 --


work under win xp pro and personal, win server 2003
(Note : Apache standalone and IIS services. )

----------------

[2004-05-05 19:40:02] xuefer at 21cn dot com

Description:

path without driver letter(c: d:) failed to work
while other filesystem functions(file_get_contents/fopen) works
under *windows*


Reproduce code:
---


Expected result:

array with files in $cur_driver:/abc/ ($cur_driver = driver letter of
getcwd())

Actual result:
--
empty array





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


#28289 [NEW]: glob does not support / under windows

2004-05-05 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp
PHP version:  4.3.6
PHP Bug Type: Filesystem function related
Bug description:  glob does not support / under windows

Description:

path without driver letter(c: d:) failed to work
while other filesystem functions(file_get_contents/fopen) works
under *windows*


Reproduce code:
---


Expected result:

array with files in $cur_driver:/abc/ ($cur_driver = driver letter of
getcwd())

Actual result:
--
empty array

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


#28092 [Fbk->Csd]: apace2 crash when stop

2004-04-23 Thread xuefer at 21cn dot com
 ID:   28092
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: linux
 PHP Version:  4.3.6
 New Comment:

this bug is bogus
it seems a problem of mmcache. no crash when i removed mmcahce ext
sorry for disturbing u


Previous Comments:


[2004-04-23 19:59:30] [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





[2004-04-22 04:02:32] xuefer at 21cn dot com

Apache/2.0.48 (Unix) mod_ssl/2.0.48

without loading php module will not crash


CFLAGS="-O3 -mcpu=pentium3 -march=pentium3 -funroll-loops -pipe";
export CFLAGS
"./configure" \
"--with-layout=Apache" \
"--prefix=/test" \
"--with-mpm=prefork" \
"--enable-so" \
"--enable-modules=rewrite headers expires vhost_alias info rewrite ssl"
\
"$@"



[2004-04-22 01:57:27] [EMAIL PROTECTED]

What version of Apache 2 server are you using? 

----------------

[2004-04-21 15:55:54] xuefer at 21cn dot com

Description:

apache2
version 4.3.5 did't crash(at least this way)

Reproducible steps:
1. edit http.conf, CoreDumpDirectory /test/coredump/
2. /test/bin/apachectl start
3. /test/bin/apachectl stop
4. ls /test/coredump
got "core" file

Core was generated by `/test/bin/httpd -k start'.
Program terminated with signal 11, Segmentation fault.

#0  0x40740a90 in ?? ()
(gdb) bt
#0  0x40740a90 in ?? ()
#1  0x08099a78 in main ()
#2  0x401be657 in __libc_start_main (main=0x80997c0 , argc=3, 
ubp_av=0xbaf4, init=0x806296c <_init>, fini=0x80ba030 <_fini>,

rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xbaec)
at ../sysdeps/generic/libc-start.c:129
(gdb) q



config.nice:
#! /bin/sh
#
# Created by configure

'./configure' \
'--prefix=/test' \
'--with-mysql=/usr/local/mysql' \
'--with-apxs2=/test/bin/apxs' \
'--with-zlib' \
'--with-ttf' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-gd' \
'--with-dom=/usr/local/' \
'--with-openssl' \
'--with-posix' \
'--with-iconv' \
'--enable-sockets' \
'--enable-inline-optimization' \
'--enable-mbregex' \
'--enable-bcmath' \
'--enable-pcntl' \
"$@"







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


#28087 [Opn]: mysql.trace_mode in php.ini is not usable

2004-04-23 Thread xuefer at 21cn dot com
 ID:   28087
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: MySQL related
 Operating System: all
 PHP Version:  4.3.6
 New Comment:

oops, sorry. simply ignore my "fix".
MySG(trace_mode) just shouldn't be set to 0
should be the value in ini

btw: ini_set works on mysql.trace_mode


Previous Comments:


[2004-04-23 13:57:16] phpdev at martinsojka dot de

... doesn't even compile (at least, without ZTS).

What's your point?

----

[2004-04-21 10:50:34] xuefer at 21cn dot com

Description:

php_mysql.c in php4cvs
line 428
-   MySG(trace_mode) = 0;
+   mysql_globals->trace_mode = 0;







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


#27584 [Bgs->Opn]: flush sometimes don't work

2004-04-22 Thread xuefer at 21cn dot com
 ID:   27584
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  4CVS-2004-03-13
 New Comment:

php apache2handler should remove "BYTERANGE" outputfilter

example code is in:
./modules/experimental/cache_util.c
line 82

CACHE_DECLARE(void) ap_cache_reset_output_filters(request_rec *r)
{
ap_filter_t *f = r->output_filters;

while (f) {
if (!strcasecmp(f->frec->name, "CORE") ||
!strcasecmp(f->frec->name, "CONTENT_LENGTH") ||
!strcasecmp(f->frec->name, "HTTP_HEADER")) {
f = f->next;
continue;
}
else {
ap_remove_output_filter(f);
f = f->next;
}
}
}


Previous Comments:


[2004-03-16 11:45:18] [EMAIL PROTECTED]

read above message 



[2004-03-16 11:44:53] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

flushing works differently in ap2 then it does in ap1,  
which may explain the different output.  
 
P.S. Seems to work equally well in ap1 and ap2 on Linux 
however. 

----------------

[2004-03-15 09:52:45] xuefer at 21cn dot com

my expected result works under apache1
and failed(actual result) under apache2


so what? apache2 bug itself?



[2004-03-15 09:42:51] [EMAIL PROTECTED]

Can you verify if this happens with Apache 1 too..?


----------------

[2004-03-13 11:23:41] xuefer at 21cn dot com

tested with lastest build

without Rang:
Sun Mar 14 00:30:21 2004 GET /test.php HTTP/1.1
Sun Mar 14 00:30:21 2004 Host: 127.0.0.1
Sun Mar 14 00:30:21 2004 Accept: */*
Sun Mar 14 00:30:21 2004 User-Agent: Mozilla/4.0 (compatible; MSIE
5.00; Windows 98)
Sun Mar 14 00:30:21 2004 Pragma: no-cache
Sun Mar 14 00:30:21 2004 Cache-Control: no-cache
Sun Mar 14 00:30:21 2004 Connection: close
Sun Mar 14 00:30:21 2004 HTTP/1.1 200 OK
Sun Mar 14 00:30:21 2004 Date: Sat, 13 Mar 2004 16:30:21 GMT
Sun Mar 14 00:30:21 2004 Server: Apache/2.0.48 (Win32)
Sun Mar 14 00:30:21 2004 Connection: close
Sun Mar 14 00:30:21 2004 Transfer-Encoding: chunked
Sun Mar 14 00:30:21 2004 Content-Type: binary


with Rang:
Sun Mar 14 00:31:41 2004 GET /test.php HTTP/1.1
Sun Mar 14 00:31:41 2004 Host: 127.0.0.1
Sun Mar 14 00:31:41 2004 Accept: */*
Sun Mar 14 00:31:41 2004 User-Agent: Mozilla/4.0 (compatible; MSIE
5.00; Windows 98)
Sun Mar 14 00:31:41 2004 Range: bytes=839516-
Sun Mar 14 00:31:41 2004 Pragma: no-cache
Sun Mar 14 00:31:41 2004 Cache-Control: no-cache
Sun Mar 14 00:31:41 2004 Connection: close
Sun Mar 14 00:31:42 2004 HTTP/1.1 200 OK
Sun Mar 14 00:31:42 2004 Date: Sat, 13 Mar 2004 16:31:41 GMT
Sun Mar 14 00:31:42 2004 Server: Apache/2.0.48 (Win32)
Sun Mar 14 00:31:42 2004 Content-Range: bytes 839516-96413656/96413657
Sun Mar 14 00:31:42 2004 Content-Length: 95574141
Sun Mar 14 00:31:42 2004 Connection: close
Sun Mar 14 00:31:42 2004 Content-Type: binary



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

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


#28092 [Fbk->Opn]: apace2 crash when stop

2004-04-21 Thread xuefer at 21cn dot com
 ID:   28092
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: linux
 PHP Version:  4.3.6
 New Comment:

Apache/2.0.48 (Unix) mod_ssl/2.0.48

without loading php module will not crash


CFLAGS="-O3 -mcpu=pentium3 -march=pentium3 -funroll-loops -pipe";
export CFLAGS
"./configure" \
"--with-layout=Apache" \
"--prefix=/test" \
"--with-mpm=prefork" \
"--enable-so" \
"--enable-modules=rewrite headers expires vhost_alias info rewrite ssl"
\
"$@"


Previous Comments:


[2004-04-22 01:57:27] [EMAIL PROTECTED]

What version of Apache 2 server are you using? 

----------------

[2004-04-21 15:55:54] xuefer at 21cn dot com

Description:

apache2
version 4.3.5 did't crash(at least this way)

Reproducible steps:
1. edit http.conf, CoreDumpDirectory /test/coredump/
2. /test/bin/apachectl start
3. /test/bin/apachectl stop
4. ls /test/coredump
got "core" file

Core was generated by `/test/bin/httpd -k start'.
Program terminated with signal 11, Segmentation fault.

#0  0x40740a90 in ?? ()
(gdb) bt
#0  0x40740a90 in ?? ()
#1  0x08099a78 in main ()
#2  0x401be657 in __libc_start_main (main=0x80997c0 , argc=3, 
ubp_av=0xbaf4, init=0x806296c <_init>, fini=0x80ba030 <_fini>,

rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xbaec)
at ../sysdeps/generic/libc-start.c:129
(gdb) q



config.nice:
#! /bin/sh
#
# Created by configure

'./configure' \
'--prefix=/test' \
'--with-mysql=/usr/local/mysql' \
'--with-apxs2=/test/bin/apxs' \
'--with-zlib' \
'--with-ttf' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-gd' \
'--with-dom=/usr/local/' \
'--with-openssl' \
'--with-posix' \
'--with-iconv' \
'--enable-sockets' \
'--enable-inline-optimization' \
'--enable-mbregex' \
'--enable-bcmath' \
'--enable-pcntl' \
"$@"







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


#28092 [NEW]: apace2 crash when stop

2004-04-21 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  4.3.6
PHP Bug Type: Reproducible crash
Bug description:  apace2 crash when stop

Description:

apache2
version 4.3.5 did't crash(at least this way)

Reproducible steps:
1. edit http.conf, CoreDumpDirectory /test/coredump/
2. /test/bin/apachectl start
3. /test/bin/apachectl stop
4. ls /test/coredump
got "core" file

Core was generated by `/test/bin/httpd -k start'.
Program terminated with signal 11, Segmentation fault.

#0  0x40740a90 in ?? ()
(gdb) bt
#0  0x40740a90 in ?? ()
#1  0x08099a78 in main ()
#2  0x401be657 in __libc_start_main (main=0x80997c0 , argc=3, 
ubp_av=0xbaf4, init=0x806296c <_init>, fini=0x80ba030 <_fini>, 
rtld_fini=0x4100dc54 <_dl_fini>, stack_end=0xbaec)
at ../sysdeps/generic/libc-start.c:129
(gdb) q



config.nice:
#! /bin/sh
#
# Created by configure

'./configure' \
'--prefix=/test' \
'--with-mysql=/usr/local/mysql' \
'--with-apxs2=/test/bin/apxs' \
'--with-zlib' \
'--with-ttf' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-gd' \
'--with-dom=/usr/local/' \
'--with-openssl' \
'--with-posix' \
'--with-iconv' \
'--enable-sockets' \
'--enable-inline-optimization' \
'--enable-mbregex' \
'--enable-bcmath' \
'--enable-pcntl' \
"$@"



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


#28087 [NEW]: mysql.trace_mode in php.ini is not usable

2004-04-21 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: all
PHP version:  4.3.6
PHP Bug Type: MySQL related
Bug description:  mysql.trace_mode in php.ini is not usable

Description:

php_mysql.c in php4cvs
line 428
-   MySG(trace_mode) = 0;
+   mysql_globals->trace_mode = 0;



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


#5927 [Com]: Incorrect shutdown order of modules

2004-04-21 Thread xuefer at 21cn dot com
 ID:   5927
 Comment by:   xuefer at 21cn dot com
 Reported By:  ddebene at messagingdirect dot com
 Status:   Closed
 Bug Type: Dynamic loading
 Operating System: Redhat Linux 6.1
 PHP Version:  4.0.1pl2
 New Comment:

this should be a feature request
as of current php4.3.6, it still shutdown a before b


Previous Comments:


[2000-12-30 11:48:13] [EMAIL PROTECTED]

No feedback, considered fixed.

--Jani



[2000-11-27 05:34:22] [EMAIL PROTECTED]

Is this still happeningn with latest snapshot
from http://snaps.php.net/ ?

--Jani



[2000-08-02 17:39:10] ddebene at messagingdirect dot com

This occurs with statically or dynamically linked modules, but I am
only experiencing it myself with dynamically linked extensions. I have
configured PHP to load two extensions I have created at run time, let's
call them A and B. A relies on behaviour of B. I have ordered them in
the php.ini file so that A is before B, and thus A gets initialized
before B (which is required for B to work properly). However, on
shutdown, A is also shutdown before B, and since B requires A to be
still running to shut down, there is a core dump.

Modules should be getting shut down in the reverse order that they are
started, to preserve dependencies.

I've actually patched this myself, here is the simple fix:

Zend/zend_hash.c
539c539
<   p = ht->pListHead;
---
>   p = ht->pListTail;
542c542
<   p = p->pListNext;
---
>   p = p->pListLast;





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


#26223 [NoF->Csd]: Error message makes PHP crash (in some special cases)

2004-04-20 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   No Feedback
+Status:   Closed
 Bug Type: *General Issues
 Operating System: win32 only
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

seems fixed

but when i do "glob/unlink/rmdir" in session write handler, and it
crash randomly. still can't make a reproduciable script yet :(

marking this bug as closed


Previous Comments:


[2004-04-21 00:14:06] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2004-04-13 12:55:35] [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





[2004-02-13 10:02:13] [EMAIL PROTECTED]

The crash happens in the error outputting
functions..php_docref..something. Marcus broke it so Marcus fixes it.


----

[2003-11-17 23:08:44] Xuefer at 21cn dot com

i'm not familiar with debugging
i'm stucked

with same script
still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)

but not crash on:
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip
output:

Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14
warning: ---

warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:

warning: Beginning: 
warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)

warning:   End: 
warning: OK

warning: ---

[Tue Nov 18 11:23:53 2003]  Script:  'test.php'

Program exited normally.



[2003-11-17 21:38:43] [EMAIL PROTECTED]

Here you can find some debug enabled builds:

   http://www.thebrainroom.net/php-snaps/




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

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


#27674 [Csd->Opn]: getimagesize eat up hundreds of memory, can't do with a good swf

2004-04-09 Thread xuefer at 21cn dot com
 ID:   27674
 User updated by:  xuefer at 21cn dot com
-Summary:  getimagesize eat up hundreds of memory
 Reported By:  xuefer at 21cn dot com
-Status:   Closed
+Status:   Open
 Bug Type: GetImageSize related
 Operating System: *
 PHP Version:  4.3.5
 New Comment:

reoped and updated changed

cos 125-bad.swf is really "fine playing in flashplayer" swf


Previous Comments:


[2004-03-27 06:16:22] xuefer at 21cn dot com

yes, just a guess

because no matter how much memory it alloc, uncompress() just return
Z_BUF_ERROR



i don't know why this swf is bad, it plays ok in stand alone
flashplayer and ie browser



by the way, when i test it with a "good" swf, the part of erealloc()
don't even executed. In another word, the first uncompress:

if (uncompress(b, &len, a, sizeof(a)) != Z_OK) {

is Z_OK



[2004-03-27 05:58:53] [EMAIL PROTECTED]

Where does the 50MByte const come from, a guess?

--------

[2004-03-26 22:09:42] xuefer at 21cn dot com

this bug may be "can't reproduce" not "closed"



this is the "fix" with testing code

Index: ext/standard/image.c

===

RCS file: /repository/php-src/ext/standard/image.c,v

retrieving revision 1.72.2.13

diff -u -r1.72.2.13 image.c

--- ext/standard/image.c12 Nov 2003 22:56:09 - 
1.72.2.13

+++ ext/standard/image.c27 Mar 2004 03:11:00 -

@@ -196,8 +196,8 @@

 

long bits;

unsigned char a[64];

-   unsigned long len=64, szlength;

-   int factor=1,maxfactor=16;

+   unsigned long len=64, szlength, maxlength = 50*1024*1024;

+   int factor=1,maxfactor=8;

int slength, status=0;

char *b, *buf=NULL, *bufz=NULL;

 

@@ -226,8 +226,13 @@



do {

szlength=slength*(1< maxlength) {

+   break;

+   }

+   printf("szlength: %d\n", szlength);

buf = (char *) erealloc(buf,szlength);

status = uncompress(buf, &szlength, bufz,
slength);

+   printf("status: %d\n", (int) (status ==
Z_BUF_ERROR));

} while ((status==Z_BUF_ERROR)&&(factor enabled

Compiled Version => 1.1.4

Linked Version => 1.1.4



but when i compile cvs version of php5, it just works

./configure --disable-all --disable-cgi

make

./sapi/cli/php -r 'var_dump(getimagesize("125-bad.swf"));'

outputs: bool(false)



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

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


#14447 [Com]: Thread Safe

2004-04-03 Thread Xuefer at 21cn dot com
 ID:   14447
 Comment by:   Xuefer at 21cn dot com
 Reported By:  edejanu at route66 dot ro
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: ALL
 PHP Version:  4.1.0
 New Comment:

there has been a EXPERMINAL file as the flag for experminal status

so why not give a THREAD_SAFE file to indicate this module is thread
safe for all its functions

it's a simple and quick solution

but can't tell exactly which function is and is not thread safe, only
the whole module is marked


Previous Comments:


[2003-01-02 18:33:37] [EMAIL PROTECTED]

It would be nice, it's up the maintainer that does the documentation to
give such informations. Anyway I change it's status to a feature
request. 



Maybe Goba or Philip will have a nice idea for that?



[2001-12-12 02:19:01] edejanu at route66 dot ro

Will be nice if the documentation will list for each

function category all the functions that are thread safe

or not.

Ex:

XVI. Date and Time functions



time function is not thread safe



Mabe be a new node in the manual

like the "Function Reference" node.





What you say about this?



Best regards, 



Emanuel Dejanu






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


#27674 [Csd]: getimagesize eat up hundreds of memory

2004-03-27 Thread xuefer at 21cn dot com
 ID:   27674
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Closed
 Bug Type: GetImageSize related
 Operating System: *
 PHP Version:  4.3.5
 New Comment:

yes, just a guess

because no matter how much memory it alloc, uncompress() just return
Z_BUF_ERROR



i don't know why this swf is bad, it plays ok in stand alone
flashplayer and ie browser



by the way, when i test it with a "good" swf, the part of erealloc()
don't even executed. In another word, the first uncompress:

if (uncompress(b, &len, a, sizeof(a)) != Z_OK) {

is Z_OK


Previous Comments:


[2004-03-27 05:58:53] [EMAIL PROTECTED]

Where does the 50MByte const come from, a guess?



[2004-03-26 22:09:42] xuefer at 21cn dot com

this bug may be "can't reproduce" not "closed"



this is the "fix" with testing code

Index: ext/standard/image.c

===

RCS file: /repository/php-src/ext/standard/image.c,v

retrieving revision 1.72.2.13

diff -u -r1.72.2.13 image.c

--- ext/standard/image.c12 Nov 2003 22:56:09 - 
1.72.2.13

+++ ext/standard/image.c27 Mar 2004 03:11:00 -

@@ -196,8 +196,8 @@

 

long bits;

unsigned char a[64];

-   unsigned long len=64, szlength;

-   int factor=1,maxfactor=16;

+   unsigned long len=64, szlength, maxlength = 50*1024*1024;

+   int factor=1,maxfactor=8;

int slength, status=0;

char *b, *buf=NULL, *bufz=NULL;

 

@@ -226,8 +226,13 @@



do {

szlength=slength*(1< maxlength) {

+   break;

+   }

+   printf("szlength: %d\n", szlength);

buf = (char *) erealloc(buf,szlength);

status = uncompress(buf, &szlength, bufz,
slength);

+   printf("status: %d\n", (int) (status ==
Z_BUF_ERROR));

} while ((status==Z_BUF_ERROR)&&(factor enabled

Compiled Version => 1.1.4

Linked Version => 1.1.4



but when i compile cvs version of php5, it just works

./configure --disable-all --disable-cgi

make

./sapi/cli/php -r 'var_dump(getimagesize("125-bad.swf"));'

outputs: bool(false)



[2004-03-26 09:11:06] xuefer at 21cn dot com

more detail:



under xp

it eat more and more memory



under linux cli:

$ php -r "getimagesize('./125-bad.swf');"

FATAL:  erealloc():  Unable to allocate -2011570176 bytes



under linux apache: it crash



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

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


#27674 [Csd]: getimagesize eat up hundreds of memory

2004-03-26 Thread xuefer at 21cn dot com
 ID:   27674
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Closed
 Bug Type: GetImageSize related
 Operating System: winxp/linux
 PHP Version:  4.3.5RC4
 New Comment:

this bug may be "can't reproduce" not "closed"



this is the "fix" with testing code

Index: ext/standard/image.c

===

RCS file: /repository/php-src/ext/standard/image.c,v

retrieving revision 1.72.2.13

diff -u -r1.72.2.13 image.c

--- ext/standard/image.c12 Nov 2003 22:56:09 - 
1.72.2.13

+++ ext/standard/image.c27 Mar 2004 03:11:00 -

@@ -196,8 +196,8 @@

 

long bits;

unsigned char a[64];

-   unsigned long len=64, szlength;

-   int factor=1,maxfactor=16;

+   unsigned long len=64, szlength, maxlength = 50*1024*1024;

+   int factor=1,maxfactor=8;

int slength, status=0;

char *b, *buf=NULL, *bufz=NULL;

 

@@ -226,8 +226,13 @@



do {

szlength=slength*(1< maxlength) {

+   break;

+   }

+   printf("szlength: %d\n", szlength);

buf = (char *) erealloc(buf,szlength);

status = uncompress(buf, &szlength, bufz,
slength);

+   printf("status: %d\n", (int) (status ==
Z_BUF_ERROR));

} while ((status==Z_BUF_ERROR)&&(factor enabled

Compiled Version => 1.1.4

Linked Version => 1.1.4



but when i compile cvs version of php5, it just works

./configure --disable-all --disable-cgi

make

./sapi/cli/php -r 'var_dump(getimagesize("125-bad.swf"));'

outputs: bool(false)

----------------

[2004-03-26 09:11:06] xuefer at 21cn dot com

more detail:



under xp

it eat more and more memory



under linux cli:

$ php -r "getimagesize('./125-bad.swf');"

FATAL:  erealloc():  Unable to allocate -2011570176 bytes



under linux apache: it crash



[2004-03-25 10:28:56] [EMAIL PROTECTED]

With PHP 4.3.5 I get a return value of false instantly and 

no large memory allocation problems you describe. 

----

[2004-03-24 10:12:35] xuefer at 21cn dot com

Description:

file at: http://games.oursky.net:81/125-bad.swf (file will be removed
when this bug is closed)

eat up >400MB memory(or page file)



pls fix it before 4.3.5 is out.

Reproduce code:
---
wget http://games.oursky.net:81/125-bad.swf

php -r 'getimagesize("125-bad.swf")';








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


#27674 [Opn]: getimagesize eat up hundreds of memory

2004-03-26 Thread xuefer at 21cn dot com
 ID:   27674
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Open
 Bug Type: GetImageSize related
 Operating System: winxp/linux
 PHP Version:  4.3.5RC4
 New Comment:

the above test verified for php4.3.5



phpinfo() under linux:

zlib

ZLib Support => enabled

Compiled Version => 1.1.4

Linked Version => 1.1.4



but when i compile cvs version of php5, it just works

./configure --disable-all --disable-cgi

make

./sapi/cli/php -r 'var_dump(getimagesize("125-bad.swf"));'

outputs: bool(false)


Previous Comments:
----

[2004-03-26 09:11:06] xuefer at 21cn dot com

more detail:



under xp

it eat more and more memory



under linux cli:

$ php -r "getimagesize('./125-bad.swf');"

FATAL:  erealloc():  Unable to allocate -2011570176 bytes



under linux apache: it crash



[2004-03-25 10:28:56] [EMAIL PROTECTED]

With PHP 4.3.5 I get a return value of false instantly and 

no large memory allocation problems you describe. 

--------------------

[2004-03-24 10:12:35] xuefer at 21cn dot com

Description:

file at: http://games.oursky.net:81/125-bad.swf (file will be removed
when this bug is closed)

eat up >400MB memory(or page file)



pls fix it before 4.3.5 is out.

Reproduce code:
---
wget http://games.oursky.net:81/125-bad.swf

php -r 'getimagesize("125-bad.swf")';








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


#27674 [Bgs->Opn]: getimagesize eat up hundreds of memory

2004-03-26 Thread xuefer at 21cn dot com
 ID:   27674
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Bogus
+Status:   Open
 Bug Type: GetImageSize related
 Operating System: winxp/linux
 PHP Version:  4.3.5RC4
 New Comment:

more detail:



under xp

it eat more and more memory



under linux cli:

$ php -r "getimagesize('./125-bad.swf');"

FATAL:  erealloc():  Unable to allocate -2011570176 bytes



under linux apache: it crash


Previous Comments:


[2004-03-25 10:28:56] [EMAIL PROTECTED]

With PHP 4.3.5 I get a return value of false instantly and 

no large memory allocation problems you describe. 



[2004-03-24 10:12:35] xuefer at 21cn dot com

Description:

file at: http://games.oursky.net:81/125-bad.swf (file will be removed
when this bug is closed)

eat up >400MB memory(or page file)



pls fix it before 4.3.5 is out.

Reproduce code:
---
wget http://games.oursky.net:81/125-bad.swf

php -r 'getimagesize("125-bad.swf")';








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


#27674 [NEW]: getimagesize eat up hundreds of memory

2004-03-24 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp/linux
PHP version:  4.3.5RC4
PHP Bug Type: GetImageSize related
Bug description:  getimagesize eat up hundreds of memory

Description:

file at: http://games.oursky.net:81/125-bad.swf (file will be removed when
this bug is closed)

eat up >400MB memory(or page file)



pls fix it before 4.3.5 is out.

Reproduce code:
---
wget http://games.oursky.net:81/125-bad.swf

php -r 'getimagesize("125-bad.swf")';




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


#27584 [Fbk->Opn]: flush sometimes don't work

2004-03-15 Thread xuefer at 21cn dot com
 ID:   27584
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  4CVS-2004-03-13
 New Comment:

my expected result works under apache1

and failed(actual result) under apache2





so what? apache2 bug itself?


Previous Comments:


[2004-03-15 09:42:51] [EMAIL PROTECTED]

Can you verify if this happens with Apache 1 too..?





[2004-03-13 11:23:41] xuefer at 21cn dot com

tested with lastest build



without Rang:

Sun Mar 14 00:30:21 2004 GET /test.php HTTP/1.1

Sun Mar 14 00:30:21 2004 Host: 127.0.0.1

Sun Mar 14 00:30:21 2004 Accept: */*

Sun Mar 14 00:30:21 2004 User-Agent: Mozilla/4.0 (compatible; MSIE
5.00; Windows 98)

Sun Mar 14 00:30:21 2004 Pragma: no-cache

Sun Mar 14 00:30:21 2004 Cache-Control: no-cache

Sun Mar 14 00:30:21 2004 Connection: close

Sun Mar 14 00:30:21 2004 HTTP/1.1 200 OK

Sun Mar 14 00:30:21 2004 Date: Sat, 13 Mar 2004 16:30:21 GMT

Sun Mar 14 00:30:21 2004 Server: Apache/2.0.48 (Win32)

Sun Mar 14 00:30:21 2004 Connection: close

Sun Mar 14 00:30:21 2004 Transfer-Encoding: chunked

Sun Mar 14 00:30:21 2004 Content-Type: binary





with Rang:

Sun Mar 14 00:31:41 2004 GET /test.php HTTP/1.1

Sun Mar 14 00:31:41 2004 Host: 127.0.0.1

Sun Mar 14 00:31:41 2004 Accept: */*

Sun Mar 14 00:31:41 2004 User-Agent: Mozilla/4.0 (compatible; MSIE
5.00; Windows 98)

Sun Mar 14 00:31:41 2004 Range: bytes=839516-

Sun Mar 14 00:31:41 2004 Pragma: no-cache

Sun Mar 14 00:31:41 2004 Cache-Control: no-cache

Sun Mar 14 00:31:41 2004 Connection: close

Sun Mar 14 00:31:42 2004 HTTP/1.1 200 OK

Sun Mar 14 00:31:42 2004 Date: Sat, 13 Mar 2004 16:31:41 GMT

Sun Mar 14 00:31:42 2004 Server: Apache/2.0.48 (Win32)

Sun Mar 14 00:31:42 2004 Content-Range: bytes 839516-96413656/96413657

Sun Mar 14 00:31:42 2004 Content-Length: 95574141

Sun Mar 14 00:31:42 2004 Connection: close

Sun Mar 14 00:31:42 2004 Content-Type: binary



[2004-03-13 04:56:27] [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





[2004-03-12 21:45:17] xuefer at 21cn dot com

Description:

it works under apache1, but not on apache2

this script is used for network-speed testing



yet, i don't know if it's relative to php or apache



Reproduce code:
---




Expected result:

under apache1, each time request to this file will download start from
0% immediately

tested under IE & Flashget

Actual result:
--
but under apache2, 1st time seems ok, cancel IE download or stopped
flashget, then try again(with "Rang" header), download will not start
until script is timedout, then, start with a content-length in response
header

the process of apache2 is taking so much memory about XXmb even 1XXmb





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


#27590 [NEW]: mysql_pconnect crash under cli on exit

2004-03-13 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: xp
PHP version:  4.3.5RC3
PHP Bug Type: MySQL related
Bug description:  mysql_pconnect crash under cli on exit

Description:

cli/php



mysql_pconnect

script works as expect

script end

php exit

crash





yes, i know it take no sense to use pconnect under cli, but it shouldn't
crash

verifyed with lastest build


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


#27584 [Fbk->Opn]: flush sometimes don't work

2004-03-13 Thread xuefer at 21cn dot com
 ID:   27584
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  4.3.5RC3
 New Comment:

tested with lastest build



without Rang:

Sun Mar 14 00:30:21 2004 GET /test.php HTTP/1.1

Sun Mar 14 00:30:21 2004 Host: 127.0.0.1

Sun Mar 14 00:30:21 2004 Accept: */*

Sun Mar 14 00:30:21 2004 User-Agent: Mozilla/4.0 (compatible; MSIE
5.00; Windows 98)

Sun Mar 14 00:30:21 2004 Pragma: no-cache

Sun Mar 14 00:30:21 2004 Cache-Control: no-cache

Sun Mar 14 00:30:21 2004 Connection: close

Sun Mar 14 00:30:21 2004 HTTP/1.1 200 OK

Sun Mar 14 00:30:21 2004 Date: Sat, 13 Mar 2004 16:30:21 GMT

Sun Mar 14 00:30:21 2004 Server: Apache/2.0.48 (Win32)

Sun Mar 14 00:30:21 2004 Connection: close

Sun Mar 14 00:30:21 2004 Transfer-Encoding: chunked

Sun Mar 14 00:30:21 2004 Content-Type: binary





with Rang:

Sun Mar 14 00:31:41 2004 GET /test.php HTTP/1.1

Sun Mar 14 00:31:41 2004 Host: 127.0.0.1

Sun Mar 14 00:31:41 2004 Accept: */*

Sun Mar 14 00:31:41 2004 User-Agent: Mozilla/4.0 (compatible; MSIE
5.00; Windows 98)

Sun Mar 14 00:31:41 2004 Range: bytes=839516-

Sun Mar 14 00:31:41 2004 Pragma: no-cache

Sun Mar 14 00:31:41 2004 Cache-Control: no-cache

Sun Mar 14 00:31:41 2004 Connection: close

Sun Mar 14 00:31:42 2004 HTTP/1.1 200 OK

Sun Mar 14 00:31:42 2004 Date: Sat, 13 Mar 2004 16:31:41 GMT

Sun Mar 14 00:31:42 2004 Server: Apache/2.0.48 (Win32)

Sun Mar 14 00:31:42 2004 Content-Range: bytes 839516-96413656/96413657

Sun Mar 14 00:31:42 2004 Content-Length: 95574141

Sun Mar 14 00:31:42 2004 Connection: close

Sun Mar 14 00:31:42 2004 Content-Type: binary


Previous Comments:


[2004-03-13 04:56:27] [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





[2004-03-12 21:45:17] xuefer at 21cn dot com

Description:

it works under apache1, but not on apache2

this script is used for network-speed testing



yet, i don't know if it's relative to php or apache



Reproduce code:
---




Expected result:

under apache1, each time request to this file will download start from
0% immediately

tested under IE & Flashget

Actual result:
--
but under apache2, 1st time seems ok, cancel IE download or stopped
flashget, then try again(with "Rang" header), download will not start
until script is timedout, then, start with a content-length in response
header

the process of apache2 is taking so much memory about XXmb even 1XXmb





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


#27584 [NEW]: flush sometimes don't work

2004-03-12 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp/linux
PHP version:  4.3.5RC3
PHP Bug Type: Apache2 related
Bug description:  flush sometimes don't work

Description:

it works under apache1, but not on apache2

this script is used for network-speed testing



yet, i don't know if it's relative to php or apache



Reproduce code:
---




Expected result:

under apache1, each time request to this file will download start from 0%
immediately

tested under IE & Flashget

Actual result:
--
but under apache2, 1st time seems ok, cancel IE download or stopped
flashget, then try again(with "Rang" header), download will not start
until script is timedout, then, start with a content-length in response
header

the process of apache2 is taking so much memory about XXmb even 1XXmb

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


#27487 [Fbk->Opn]: yet another session_decode crash

2004-03-04 Thread xuefer at 21cn dot com
 ID:   27487
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: winxp/linux
 PHP Version:  4.3.5RC3
 New Comment:

can you reproduce the crash?



i used sql as session save handler

corrupted data may not bug of sedssion_encode(), it's bug of GBK mysql(
http://bugs.mysql.com/bug.php?id=369 ), as when i use file, no crash



but it IS bug of session_decode(), it shouldn't crash on corrupted
data.

e.g.: saving session data but crashed by other thread, data is
corrupted. when page load again, session_decode crash.

and anyone who use vhost, can write a simple script to make php crash

the server admin can hardly track who and what make the crash.





and if possible, pls make session_encode() do base64_encode, because
may ppl use his own sql-save-handler

e.g.: session_use_text_encode(true);


Previous Comments:


[2004-03-04 03:36:36] [EMAIL PROTECTED]

I fail to see how I can reproduce it. Can you tell me how you did get
this corrupted data? As it looks to me that there is a bug in
serializing here, not deserializing. I think it has to do with the
binary stuff inside the _cached_html part though and Windows ;-) Can
you provide the variable before serialization (use
var_export($_SESSION) to obtain it).



[2004-03-04 01:58:50] xuefer at 21cn dot com

Description:

tested on php4.3.4 and 4.3.5RC3

the data is produced by session_decode() but corrupted

the corrupted-data is base64 encoded in script, just for easy download



Reproduce code:
---
http://www.our-sky.com/misc/session.phps (will be removed when bug
closed)






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


#27487 [NEW]: yet another session_decode crash

2004-03-03 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp/linux
PHP version:  4.3.5RC3
PHP Bug Type: Session related
Bug description:  yet another session_decode crash

Description:

tested on php4.3.4 and 4.3.5RC3

the data is produced by session_decode() but corrupted

the corrupted-data is base64 encoded in script, just for easy download



Reproduce code:
---
http://www.our-sky.com/misc/session.phps (will be removed when bug closed)


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


#19245 [Com]: Alter error message for execution time exceeded

2004-02-17 Thread xuefer at 21cn dot com
 ID:   19245
 Comment by:   xuefer at 21cn dot com
 Reported By:  t_o_m_ at yahoo dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.2.2
 New Comment:

it's not only for timeout!

it's a internal fatal error which cannot be handled user handler.
for others error, i can write my own error-logger



not only PHP_SELF should be display/logged, but also the QUERY_STRING,
and GET or POST



but i'd like if there's another user handler can haldle critical
errors.



set_critical_error_handler('ceh');

function ceh(..)

{

... // any error in this function is suspended

}


Previous Comments:


[2002-09-05 06:49:08] t_o_m_ at yahoo dot com

I have the log_errors and error_log set in my php.ini.

However when I look through it I see lines like:



[05-Sep-2002 10:03:31] PHP Fatal error:  Maximum execution time of 30
seconds exceeded in E:\intranet\reports\db.inc on line 9



This file is includeded in many other files, and from this error it is
not possible to tell which the including file was. In my case the
including file contains an over complex sql statement, the include file
(db.inc) just runs it.



Would it be possible for this error message to have
$_SERVER['PHP_SELF'] in it?




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


#27244 [Fbk->Opn]: cannot restart apache2 with php5

2004-02-14 Thread xuefer at 21cn dot com
 ID:   27244
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: winxp
 PHP Version:  5.0.0b3 (beta3)
 New Comment:

tried, same problem

most of the time, the line "***I/O operation has been ***" is not in
log file


Previous Comments:


[2004-02-14 10:52:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-02-13 13:08:18] xuefer at 21cn dot com

Description:

it's 5.0.0b4

it's fine with php4.3.4





Reproduce code:
---
net stop apache2



(first start)

"Apache2\bin\Apache.exe" -w -n "Apache2" -k restart

(restart)

Apache2\bin\Apache.exe" -w -n "Apache2" -k restart



Expected result:

restart should be ok

Actual result:
--
-

[Sat Feb 14 02:06:34 2004] [notice] Parent: Created child process 2660

[Sat Feb 14 02:06:35 2004] [notice] Child 2660: Child process is
running

[Sat Feb 14 02:06:35 2004] [notice] Child 2660: Acquired the start
mutex.

[Sat Feb 14 02:06:35 2004] [notice] Child 2660: Starting 100 worker
threads.

--



[Sat Feb 14 02:06:55 2004] [notice] Parent: Received restart signal --
Restarting the server.

[Sat Feb 14 02:06:55 2004] [notice] Child 2660: Exit event signaled.
Child process is ending.

[Sat Feb 14 02:06:56 2004] [warn] (OS 995)I/O operation has been
aborted because of either a thread exit or an application request.  :
winnt_accept: Asynchronous AcceptEx failed.

[Sat Feb 14 02:06:56 2004] [warn] (OS 995)I/O operation has been
aborted because of either a thread exit or an application request.  :
winnt_accept: Asynchronous AcceptEx failed.

[Sat Feb 14 02:06:56 2004] [notice] Child 2660: Released the start
mutex

[Sat Feb 14 02:06:57 2004] [notice] Child 2660: Waiting for 100 worker
threads to exit.

[Sat Feb 14 02:06:57 2004] [notice] Child 2660: All worker threads have
exited.

[Sat Feb 14 02:06:57 2004] [notice] Child 2660: Child process is
exiting







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


#27244 [NEW]: cannot restart apache2 with php5

2004-02-13 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp
PHP version:  5.0.0b3 (beta3)
PHP Bug Type: Apache2 related
Bug description:  cannot restart apache2 with php5

Description:

it's 5.0.0b4

it's fine with php4.3.4





Reproduce code:
---
net stop apache2



(first start)

"Apache2\bin\Apache.exe" -w -n "Apache2" -k restart

(restart)

Apache2\bin\Apache.exe" -w -n "Apache2" -k restart



Expected result:

restart should be ok

Actual result:
--
-

[Sat Feb 14 02:06:34 2004] [notice] Parent: Created child process 2660

[Sat Feb 14 02:06:35 2004] [notice] Child 2660: Child process is running

[Sat Feb 14 02:06:35 2004] [notice] Child 2660: Acquired the start mutex.

[Sat Feb 14 02:06:35 2004] [notice] Child 2660: Starting 100 worker
threads.

--



[Sat Feb 14 02:06:55 2004] [notice] Parent: Received restart signal --
Restarting the server.

[Sat Feb 14 02:06:55 2004] [notice] Child 2660: Exit event signaled. Child
process is ending.

[Sat Feb 14 02:06:56 2004] [warn] (OS 995)I/O operation has been aborted
because of either a thread exit or an application request.  :
winnt_accept: Asynchronous AcceptEx failed.

[Sat Feb 14 02:06:56 2004] [warn] (OS 995)I/O operation has been aborted
because of either a thread exit or an application request.  :
winnt_accept: Asynchronous AcceptEx failed.

[Sat Feb 14 02:06:56 2004] [notice] Child 2660: Released the start mutex

[Sat Feb 14 02:06:57 2004] [notice] Child 2660: Waiting for 100 worker
threads to exit.

[Sat Feb 14 02:06:57 2004] [notice] Child 2660: All worker threads have
exited.

[Sat Feb 14 02:06:57 2004] [notice] Child 2660: Child process is exiting



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


#21513 [Com]: shutdown functions not executed if timed out

2004-02-12 Thread xuefer at 21cn dot com
 ID:   21513
 Comment by:   xuefer at 21cn dot com
 Reported By:  ceeam at mail dot ru
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: win32 (only)
 PHP Version:  4CVS, 5CVS
 Assigned To:  zeev
 New Comment:

compiled under cygwin

[Xuefer php4]$ ./sapi/cli/php.exe -v

PHP 4.3.5RC3-dev (cli) (built: Feb 13 2004 01:29:25)

Copyright (c) 1997-2004 The PHP Group

Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies



[Xuefer php4]$ make test

.

PASS Testing register_shutdown_function() [tests/func/005.phpt]

<<- freeze here

it's running 005a.phpt





[Xuefer php4]$ sapi/cli/php -d max_execution_time=1 -r
'set_time_limit(1); for(;;) {}'

[Xuefer php4]$ sapi/cli/php test/func/005a.phpt

both is frozen


Previous Comments:


[2004-01-19 04:52:58] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





[2003-08-04 00:24:07] wmeler at wp-sa dot pl

This is related to http://bugs.php.net/bug.php?id=16820 (see comment
from 21 Jul 2:46am CDT)

You can find my patch at http://strony.wp.pl/wp/wmeler/.

These are old issues ...



[2003-01-22 22:44:36] [EMAIL PROTECTED]

I can not reproduce this with PHP CGI/CLI/Apache DSO,

but Steph tested the script under windows and

got the same results as [EMAIL PROTECTED] did so this is

definately a windows-only bug.





[2003-01-22 02:09:49] ceeam at mail dot ru

[EMAIL PROTECTED]:

> This script works just fine for me (using CLI):

> [skipped]



I tested your script. The output is:



PHP Fatal error:  Maximum execution time of 1 second exceeded in
c:\exp.php on line 16

PHP Fatal error:  Maximum execution time of 1 second exceeded in
c:\exp.php on line 7



"test.log" contains only one "Start" line.



I tried with both my own (pretty much cleaned up) php.ini and
"recommended" php.ini.

I suspect it is only Windows-related problem.



[2003-01-20 22:47:06] [EMAIL PROTECTED]

And this is related to http://bugs.php.net/bug.php?id=14542

(and maybe to http://bugs.php.net/bug.php?id=14251 ?)





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

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


#26223 [Com]: wired file system with session write handler make php crash

2004-02-12 Thread xuefer at 21cn dot com
 ID:   26223
 Comment by:   xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: Session related
 Operating System: winxp
 PHP Version:  4CVS-2003-12-2
 New Comment:

i've built a simple version under cygwin, but do not crash



[Xuefer php4]$ ./build/buildcheck.sh 

buildconf: checking installation...

buildconf: autoconf version 2.13 (ok)

buildconf: libtool version 1.4.3 (ok)



[Xuefer php4]$ bison -V

bison (GNU Bison) 1.875b

Written by Robert Corbett and Richard Stallman.



Copyright (C) 2003 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is
NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

[Xuefer php4]$ flex -V

flex version 2.5.4



[Xuefer php4]$ cat config.nice 

#! /bin/sh

#

# Created by configure



'./configure' \

'--disable-all' \

'--enable-cli' \

'--enable-session' \

'--with-pcre-regex' \

"$@"



[Xuefer php4]$ sapi/cli/php.exe -v

PHP 4.3.5RC3-dev (cli) (built: Feb 13 2004 01:29:25)

Copyright (c) 1997-2004 The PHP Group

Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


Previous Comments:
--------------------

[2004-02-12 11:18:20] Xuefer at 21cn dot com

not crash under linux

but still crash on winxp



[2004-02-11 12:37:03] [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

Works fine for me.



--------------------

[2004-01-31 22:27:11] xuefer at 21cn dot com

verified on linux



is anyone fixing this bug?



btw, in error log:

[01-Feb-2004 11:24:30] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0



maybe it generate this error everytime it crash, i'm not sure

----------------

[2003-11-17 23:08:44] Xuefer at 21cn dot com

i'm not familiar with debugging

i'm stucked



with same script

still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)



but not crash on:

http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip

output:



Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14

warning: ---



warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:



warning: Beginning: 

warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)



warning:   End: 

warning: OK



warning: ---



[Tue Nov 18 11:23:53 2003]  Script:  'test.php'



Program exited normally.



[2003-11-17 21:38:43] [EMAIL PROTECTED]

Here you can find some debug enabled builds:



   http://www.thebrainroom.net/php-snaps/





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

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


#26223 [Fbk->Opn]: wired file system with session write handler make php crash

2004-02-12 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
-Operating System: win32
+Operating System: winxp
 PHP Version:  4CVS-2003-12-2
 New Comment:

not crash under linux

but still crash on winxp


Previous Comments:


[2004-02-11 12:37:03] [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

Works fine for me.





[2004-01-31 22:27:11] xuefer at 21cn dot com

verified on linux



is anyone fixing this bug?



btw, in error log:

[01-Feb-2004 11:24:30] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0



maybe it generate this error everytime it crash, i'm not sure



[2003-11-17 23:08:44] Xuefer at 21cn dot com

i'm not familiar with debugging

i'm stucked



with same script

still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)



but not crash on:

http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip

output:



Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14

warning: ---



warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:



warning: Beginning: 

warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)



warning:   End: 

warning: OK



warning: ---



[Tue Nov 18 11:23:53 2003]  Script:  'test.php'



Program exited normally.



[2003-11-17 21:38:43] [EMAIL PROTECTED]

Here you can find some debug enabled builds:



   http://www.thebrainroom.net/php-snaps/



----

[2003-11-17 20:53:09] Xuefer at 21cn dot com

Program received signal SIGSEGV, Segmentation fault.

0x100c00a4 in shutdown_memory_manager () from
/cygdrive/d/www/php4/php4ts.dll

(gdb) bt

#0  0x100c00a4 in shutdown_memory_manager ()

   from /cygdrive/d/www/php4/php4ts.dll

#1  0x0012fd68 in ?? ()

#2  0x003e82b4 in ?? ()

#3  0x0012fe74 in ?? ()

#4  0x003e4248 in ?? ()

#5  0x10004276 in php_register_variable_ex ()

   from /cygdrive/d/www/php4/php4ts.dll

Previous frame inner to this frame (corrupt stack?)

(gdb) 



i'm using cygwin gdb to debug

but it is said:

"To get a backtrace with correct information you must have PHP
configured with --enable-debug!"

where can i get a debug built?

is the snapshot already with --enable-debug?



i've tested under linux and it does not crash

but under windows xp, updated to lastest snapshot still crash :(

what point am i missing?



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

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


#26223 [Com]: wired file system with session write handler make php crash

2004-01-31 Thread xuefer at 21cn dot com
 ID:   26223
 Comment by:   xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Verified
 Bug Type: Session related
 Operating System: win32
 PHP Version:  4CVS-2003-12-2
 New Comment:

verified on linux

is anyone fixing this bug?

btw, in error log:
[01-Feb-2004 11:24:30] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0

maybe it generate this error everytime it crash, i'm not sure


Previous Comments:


[2003-11-17 23:08:44] Xuefer at 21cn dot com

i'm not familiar with debugging
i'm stucked

with same script
still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)

but not crash on:
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip
output:

Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14
warning: ---

warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:

warning: Beginning: 
warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)

warning:   End: 
warning: OK

warning: ---

[Tue Nov 18 11:23:53 2003]  Script:  'test.php'

Program exited normally.



[2003-11-17 21:38:43] [EMAIL PROTECTED]

Here you can find some debug enabled builds:

   http://www.thebrainroom.net/php-snaps/


----

[2003-11-17 20:53:09] Xuefer at 21cn dot com

Program received signal SIGSEGV, Segmentation fault.
0x100c00a4 in shutdown_memory_manager () from
/cygdrive/d/www/php4/php4ts.dll
(gdb) bt
#0  0x100c00a4 in shutdown_memory_manager ()
   from /cygdrive/d/www/php4/php4ts.dll
#1  0x0012fd68 in ?? ()
#2  0x003e82b4 in ?? ()
#3  0x0012fe74 in ?? ()
#4  0x003e4248 in ?? ()
#5  0x10004276 in php_register_variable_ex ()
   from /cygdrive/d/www/php4/php4ts.dll
Previous frame inner to this frame (corrupt stack?)
(gdb) 

i'm using cygwin gdb to debug
but it is said:
"To get a backtrace with correct information you must have PHP
configured with --enable-debug!"
where can i get a debug built?
is the snapshot already with --enable-debug?

i've tested under linux and it does not crash
but under windows xp, updated to lastest snapshot still crash :(
what point am i missing?

----------------

[2003-11-14 00:09:21] Xuefer at 21cn dot com

sorry for my careless
it took me so much time to track down this problem
but i don't know if it'll still crash if php env(system+apache+php..)
changed



----------------

[2003-11-12 11:35:16] Xuefer at 21cn dot com

Description:

using session_set_save_handler()
in write handler, if an error occur or using echo, something is output,
php crash

this make script debugging very hard






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


#27109 [NEW]: [request] magic string concat

2004-01-31 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: *
PHP version:  5CVS-2004-01-31 (dev)
PHP Bug Type: Feature/Change Request
Bug description:  [request] magic string concat

Description:

as we know, in C/C++, const string will be concat magically
char *str = "FOO" "BAR";

but in php, we used dot '.' to concat, which is widely used as
object.method() method.property in other languages, there isn't much
symbols on our keyboard, this make php have to use $this->foo() $this->bar
for objects
many and many times we type "-" shift + ">" :(

i suggest that php should be able to do:
$hello = "hell" "o";
$hello = $hello " wo"; // same as $hello = $hello . " wo";
$hello .= "rld"; // still, and ever supported

space between expressions means string-concat

$query = "select abc"
 " from table"
 " where ...";

we don't have to:
$query = "select abc"
 . " from table"
 . " where ...";

or:
$query = "select abc" .
 " from table" .
 " where ...";
(hard to modify)

or:
$query = "select abc
  from table
  where ...";
(ugly)

php is for web, web is text, text is string
hope one day all code is written with out using dot concat (.) so we can
deprecate it, and then disabled, and we can $phpers.smile(";)")



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


#26934 [NEW]: error logging should log url for each page

2004-01-16 Thread Xuefer at 21cn dot com
From: Xuefer at 21cn dot com
Operating system: *
PHP version:  5CVS-2004-01-16 (dev)
PHP Bug Type: Feature/Change Request
Bug description:  error logging should log url for each page

Description:

don't know if this feature is request before(i searched, not found)

there're many times error show in my log files
1.
[16-Jan-2004 21:38:42] PHP Warning:  Unknown(): A session is active. You
cannot change the session module's ini settings at this time. in Unknown
on line 0

2.
[16-Jan-2004 21:38:47] PHP Fatal error:  Maximum execution time of 30
seconds exceeded in /path/to/file.inc.php on line 113

but i don't know which request url cause the above error
there're too many pages include file /path/to/file.inc.php
what a hard life~

please add init setting:
error_log_request_url (boolean) default: true

[16-Jan-2004 21:38:42] PHP REQUEST:  GET www.domain.com/abc.php
[16-Jan-2004 21:38:42] PHP Warning:  etc etc..
[16-Jan-2004 21:38:43] PHP Fatal error:  etc etc..



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


#26883 [Csd->Opn]: [suggestion] 2nd argument for set_error_handler to speed up performance

2004-01-14 Thread xuefer at 21cn dot com
 ID:   26883
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Closed
+Status:   Open
 Bug Type: Performance problem
 Operating System: *
 PHP Version:  5CVS-2004-01-12 (dev)
 New Comment:

opening, because:
http://cvs.php.net/co.php/php-src/ChangeLog?login=2&r=1.1506

* ZendEngine2/zend_builtin_functions.c
ZendEngine2/zend_execute_API.c
ZendEngine2/zend_globals.h
ZendEngine2/zend_operators.c:
Added error mask to set_error_handler()
Patch by Christian Schneider <[EMAIL PROTECTED]>


zend.c is not modified, i.e.: error mask is not in use


Previous Comments:


[2004-01-12 10:36:50] xuefer at 21cn dot com

eh? sorry, but i don't see the changes?

my recommend change is for zend.c
http://cvs.php.net/cvs.php/ZendEngine2/zend.c?login=2

what i said "this change require" means those patch should not be
revert because of this feature request



[2004-01-12 10:04:00] [EMAIL PROTECTED]

Already done:

revision 1.222
date: 2004/01/10 11:43:41;  author: zeev;  state: Exp;  lines: +13 -8
Added error mask to set_error_handler()
Patch by Christian Schneider <[EMAIL PROTECTED]>



----

[2004-01-12 08:58:18] xuefer at 21cn dot com

Description:

the idea is from the internals mailinglist recently that discuss about
2nd argument for set_error_handler.
it seems error mask is not going to be used, as i saw no changes in
zend.c function zend_error()
but i'm talking about performance here.


many php scripters use:
$page = (int) @ $_GET['page'];
$id = (int) @ $_GET['id'];
etc etc..
and they use set_error_handler('myErrorHandler');
and 
function myErrorHandler($errstr, $errno, ...)
{
 if (! (error_reporting() & $errno) ) {
   return;
 }
 ..
}

for just every undefined index of page/id
bunch of code in zend_error() is executed and then user defined
function "myErrorHandler", and then error_reporting()

callback set_error_handler(callback handler, [int error_mask]);

error_mask default to NULL(or 0), means "don't check with mask", which
is BackCompat with old scripts

for most scripters, use
set_error_handler('myErrorHandler', E_ALL);
and (error_reporting() & $error_mask) is check BEFORE calling
myErrorHandler


= change ===
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {

 into 
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
 || !EG(user_error_handler_error_reporting)
 || !((EG(user_error_handler_error_reporting) & type)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {


this change require:
http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?login=2&r1=1.221&r2=1.222&ty=h

Last Log Message for rev 1.222:
Added error mask to set_error_handler()







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


#26883 [Csd]: [suggestion] 2nd argument for set_error_handler to speed up performance

2004-01-12 Thread xuefer at 21cn dot com
 ID:   26883
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
 Status:   Closed
 Bug Type: Performance problem
 Operating System: *
 PHP Version:  5CVS-2004-01-12 (dev)
 New Comment:

eh? sorry, but i don't see the changes?

my recommend change is for zend.c
http://cvs.php.net/cvs.php/ZendEngine2/zend.c?login=2

what i said "this change require" means those patch should not be
revert because of this feature request


Previous Comments:


[2004-01-12 10:04:00] [EMAIL PROTECTED]

Already done:

revision 1.222
date: 2004/01/10 11:43:41;  author: zeev;  state: Exp;  lines: +13 -8
Added error mask to set_error_handler()
Patch by Christian Schneider <[EMAIL PROTECTED]>





[2004-01-12 08:58:18] xuefer at 21cn dot com

Description:

the idea is from the internals mailinglist recently that discuss about
2nd argument for set_error_handler.
it seems error mask is not going to be used, as i saw no changes in
zend.c function zend_error()
but i'm talking about performance here.


many php scripters use:
$page = (int) @ $_GET['page'];
$id = (int) @ $_GET['id'];
etc etc..
and they use set_error_handler('myErrorHandler');
and 
function myErrorHandler($errstr, $errno, ...)
{
 if (! (error_reporting() & $errno) ) {
   return;
 }
 ..
}

for just every undefined index of page/id
bunch of code in zend_error() is executed and then user defined
function "myErrorHandler", and then error_reporting()

callback set_error_handler(callback handler, [int error_mask]);

error_mask default to NULL(or 0), means "don't check with mask", which
is BackCompat with old scripts

for most scripters, use
set_error_handler('myErrorHandler', E_ALL);
and (error_reporting() & $error_mask) is check BEFORE calling
myErrorHandler


= change ===
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {

 into 
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
 || !EG(user_error_handler_error_reporting)
 || !((EG(user_error_handler_error_reporting) & type)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {


this change require:
http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?login=2&r1=1.221&r2=1.222&ty=h

Last Log Message for rev 1.222:
Added error mask to set_error_handler()







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


#26883 [NEW]: [suggestion] 2nd argument for set_error_handler to speed up performance

2004-01-12 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: *
PHP version:  5CVS-2004-01-12 (dev)
PHP Bug Type: Performance problem
Bug description:  [suggestion] 2nd argument for set_error_handler to speed up 
performance

Description:

the idea is from the internals mailinglist recently that discuss about 2nd
argument for set_error_handler.
it seems error mask is not going to be used, as i saw no changes in zend.c
function zend_error()
but i'm talking about performance here.


many php scripters use:
$page = (int) @ $_GET['page'];
$id = (int) @ $_GET['id'];
etc etc..
and they use set_error_handler('myErrorHandler');
and 
function myErrorHandler($errstr, $errno, ...)
{
 if (! (error_reporting() & $errno) ) {
   return;
 }
 ..
}

for just every undefined index of page/id
bunch of code in zend_error() is executed and then user defined function
"myErrorHandler", and then error_reporting()

callback set_error_handler(callback handler, [int error_mask]);

error_mask default to NULL(or 0), means "don't check with mask", which is
BackCompat with old scripts

for most scripters, use
set_error_handler('myErrorHandler', E_ALL);
and (error_reporting() & $error_mask) is check BEFORE calling
myErrorHandler


= change ===
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {

 into 
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
 || !EG(user_error_handler_error_reporting)
 || !((EG(user_error_handler_error_reporting) & type)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {


this change require:
http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?login=2&r1=1.221&r2=1.222&ty=h

Last Log Message for rev 1.222:
Added error mask to set_error_handler()



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


#26869 [NEW]: (string) numeric constant as the key of static array mess up!

2004-01-11 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp
PHP version:  5CVS-2004-01-11 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  (string) numeric constant as the key of static array mess up!

Description:

defined numeric constant but in string type
used in static $a = array(A => 1);
this produce array $a with a messed up key

Reproduce code:
---
under cygwin:
./php5/php.exe -n -r 'define("A", "1"); static $a=array(A => 1);
var_dump($a); echo isset($a[A]); echo "\n";'


Expected result:

array(1) {
  [1]=>
  int(1)
}
1


Actual result:
--
array(1) {
  ["1"]=>
  int(1)
}


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


#26868 [NEW]: PATH_TRANSLATED not set

2004-01-10 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: winxp
PHP version:  5CVS-2004-01-11 (dev)
PHP Bug Type: Apache2 related
Bug description:  PATH_TRANSLATED not set

Description:

apache2.0.18

LoadModule php5_module C:/php5/php5apache2.dll
AddType application/x-httpd-php .php


Reproduce code:
---



Expected result:

echo the correct path

Actual result:
--
Notice:  Undefined index:  PATH_TRANSLATED in **.php on line 2

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


#26838 [NEW]: signals make STDIN become EOF

2004-01-08 Thread xuefer at 21cn dot com
From: xuefer at 21cn dot com
Operating system: linux
PHP version:  4.3.4
PHP Bug Type: Filesystem function related
Bug description:  signals make STDIN become EOF

Description:

code
shell> ./test.php
don't press CTRL+D to end input. but program exists in 3 seconds because
feof() return true
uncomment line 7 will works ok, exit only when i press CTRL+D

Reproduce code:
---
file ./test.php:

#!/usr/bin/php




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


#26338 [Opn]: 2nd param for array_values

2003-11-24 Thread Xuefer at 21cn dot com
 ID:   26338
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.3.4
 New Comment:

if anyone think we should not modify array_values
i have anohter suggested name:
array_column($array, $whichColumn)
because it's mostly used to get all fields(foreah row) in one column


Previous Comments:


[2003-11-20 22:51:27] Xuefer at 21cn dot com

Description:

old:
Usage: array array_values ( array input )
Purpose: Return all the values of an array 

new suggestion:
Usage: array array_values ( array input, [mixed key] )
Purpose: Return all the values of an array 

key default to null, which is same as old array_values
if key is_int or is_string

it act like this:
function array_values($input, $key)
{
$ret = array();
foreach ($input as $value) {
$ret[] = $value[$key];
}
return $ret;
}

this is very useful to collect ids
e.g.:
$idrows = db_query_all_rows("select id from table1");
$ids = implode(',', array_values($idrows, 'id'));
$myrows = db_query_all_rows("select  from table2 where id
IN($ids)");
(db_query_all_rows is custom function which fetch all rows of query
result)
thanks






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


#26338 [NEW]: 2nd param for array_values

2003-11-20 Thread Xuefer at 21cn dot com
From: Xuefer at 21cn dot com
Operating system: all
PHP version:  4.3.4
PHP Bug Type: Feature/Change Request
Bug description:  2nd param for array_values

Description:

old:
Usage: array array_values ( array input )
Purpose: Return all the values of an array 

new suggestion:
Usage: array array_values ( array input, [mixed key] )
Purpose: Return all the values of an array 

key default to null, which is same as old array_values
if key is_int or is_string

it act like this:
function array_values($input, $key)
{
$ret = array();
foreach ($input as $value) {
$ret[] = $value[$key];
}
return $ret;
}

this is very useful to collect ids
e.g.:
$idrows = db_query_all_rows("select id from table1");
$ids = implode(',', array_values($idrows, 'id'));
$myrows = db_query_all_rows("select  from table2 where id IN($ids)");
(db_query_all_rows is custom function which fetch all rows of query
result)
thanks


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


#26223 [Opn]: wired file system with session write handler make php crash

2003-11-17 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
 Status:   Open
 Bug Type: Session related
 Operating System: win
 PHP Version:  4.3.4
 New Comment:

btw: i can use go-pear.php under non-debug built
but under debug built, i get 

==
If you wish to abort, press Control-C now, or press Enter to continue:

HTTP proxy (http://user:[EMAIL PROTECTED]:port), or Enter for
none::

We do not find any php.exe, please select the php.exe folder (CLI is
recommanded, usually in c:\php\cli\php.exe)

=
and a alert messagebox:
=
Debug Assertion Failed!
program path\to\cli\php.exe
File: fdopen.c
Line: 54

Expression: _osfile(filedes) & FOPEN


Previous Comments:


[2003-11-17 23:08:44] Xuefer at 21cn dot com

i'm not familiar with debugging
i'm stucked

with same script
still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)

but not crash on:
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip
output:

Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14
warning: ---

warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:

warning: Beginning: 
warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)

warning:   End: 
warning: OK

warning: ---

[Tue Nov 18 11:23:53 2003]  Script:  'test.php'

Program exited normally.



[2003-11-17 21:38:43] [EMAIL PROTECTED]

Here you can find some debug enabled builds:

   http://www.thebrainroom.net/php-snaps/




[2003-11-17 20:53:09] Xuefer at 21cn dot com

Program received signal SIGSEGV, Segmentation fault.
0x100c00a4 in shutdown_memory_manager () from
/cygdrive/d/www/php4/php4ts.dll
(gdb) bt
#0  0x100c00a4 in shutdown_memory_manager ()
   from /cygdrive/d/www/php4/php4ts.dll
#1  0x0012fd68 in ?? ()
#2  0x003e82b4 in ?? ()
#3  0x0012fe74 in ?? ()
#4  0x003e4248 in ?? ()
#5  0x10004276 in php_register_variable_ex ()
   from /cygdrive/d/www/php4/php4ts.dll
Previous frame inner to this frame (corrupt stack?)
(gdb) 

i'm using cygwin gdb to debug
but it is said:
"To get a backtrace with correct information you must have PHP
configured with --enable-debug!"
where can i get a debug built?
is the snapshot already with --enable-debug?

i've tested under linux and it does not crash
but under windows xp, updated to lastest snapshot still crash :(
what point am i missing?



[2003-11-17 15:01:52] [EMAIL PROTECTED]

Also does not crash...

------------

[2003-11-14 00:09:21] Xuefer at 21cn dot com

sorry for my careless
it took me so much time to track down this problem
but i don't know if it'll still crash if php env(system+apache+php..)
changed





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

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


#26223 [Fbk->Opn]: wired file system with session write handler make php crash

2003-11-17 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: win
 PHP Version:  4.3.4
 New Comment:

i'm not familiar with debugging
i'm stucked

with same script
still crash on
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-foundstone-latest.zip
(with similar gdb bt)

but not crash on:
http://www.thebrainroom.net/php-snaps/php4-win32-STABLE-debug-foundstone-latest.zip
output:

Warning: file_exists(): Stat failed for Unknown (errno=9 - Bad file
descriptor) in c:\test.php on line 14
warning: ---

warning:
f:\tbr\php\snapbuilder\php_4_3-foundstone\ext\standard\filestat.c(616)
: Block 0x00BAE800 status:

warning: Beginning: 
warning: Cached (allocated on
f:\tbr\php\snapbuilder\php_4_3-foundstone\main\main.c:485, 21 bytes)

warning:   End: 
warning: OK

warning: ---

[Tue Nov 18 11:23:53 2003]  Script:  'test.php'

Program exited normally.


Previous Comments:


[2003-11-17 21:38:43] [EMAIL PROTECTED]

Here you can find some debug enabled builds:

   http://www.thebrainroom.net/php-snaps/




[2003-11-17 20:53:09] Xuefer at 21cn dot com

Program received signal SIGSEGV, Segmentation fault.
0x100c00a4 in shutdown_memory_manager () from
/cygdrive/d/www/php4/php4ts.dll
(gdb) bt
#0  0x100c00a4 in shutdown_memory_manager ()
   from /cygdrive/d/www/php4/php4ts.dll
#1  0x0012fd68 in ?? ()
#2  0x003e82b4 in ?? ()
#3  0x0012fe74 in ?? ()
#4  0x003e4248 in ?? ()
#5  0x10004276 in php_register_variable_ex ()
   from /cygdrive/d/www/php4/php4ts.dll
Previous frame inner to this frame (corrupt stack?)
(gdb) 

i'm using cygwin gdb to debug
but it is said:
"To get a backtrace with correct information you must have PHP
configured with --enable-debug!"
where can i get a debug built?
is the snapshot already with --enable-debug?

i've tested under linux and it does not crash
but under windows xp, updated to lastest snapshot still crash :(
what point am i missing?



[2003-11-17 15:01:52] [EMAIL PROTECTED]

Also does not crash...

--------

[2003-11-14 00:09:21] Xuefer at 21cn dot com

sorry for my careless
it took me so much time to track down this problem
but i don't know if it'll still crash if php env(system+apache+php..)
changed





[2003-11-13 19:46:05] [EMAIL PROTECTED]

Make sure you do not have older PHP dlls anywhere on your system. I am
unable to replicate the crash using latest CVS on either windows on
linux.



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

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


#26223 [Fbk->Opn]: wired file system with session write handler make php crash

2003-11-17 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: win
 PHP Version:  4.3.4
 New Comment:

Program received signal SIGSEGV, Segmentation fault.
0x100c00a4 in shutdown_memory_manager () from
/cygdrive/d/www/php4/php4ts.dll
(gdb) bt
#0  0x100c00a4 in shutdown_memory_manager ()
   from /cygdrive/d/www/php4/php4ts.dll
#1  0x0012fd68 in ?? ()
#2  0x003e82b4 in ?? ()
#3  0x0012fe74 in ?? ()
#4  0x003e4248 in ?? ()
#5  0x10004276 in php_register_variable_ex ()
   from /cygdrive/d/www/php4/php4ts.dll
Previous frame inner to this frame (corrupt stack?)
(gdb) 

i'm using cygwin gdb to debug
but it is said:
"To get a backtrace with correct information you must have PHP
configured with --enable-debug!"
where can i get a debug built?
is the snapshot already with --enable-debug?

i've tested under linux and it does not crash
but under windows xp, updated to lastest snapshot still crash :(
what point am i missing?


Previous Comments:


[2003-11-17 15:01:52] [EMAIL PROTECTED]

Also does not crash...



[2003-11-14 00:09:21] Xuefer at 21cn dot com

sorry for my careless
it took me so much time to track down this problem
but i don't know if it'll still crash if php env(system+apache+php..)
changed





[2003-11-13 19:46:05] [EMAIL PROTECTED]

Make sure you do not have older PHP dlls anywhere on your system. I am
unable to replicate the crash using latest CVS on either windows on
linux.

----

[2003-11-12 21:04:25] Xuefer at 21cn dot com

function n(){ }
function write() {
$b = $a;
return true;
}
session_set_save_handler ("n", "n", "n", "write", "n", "n"); 

session_start();



[2003-11-12 12:55:52] [EMAIL PROTECTED]

Please supply a short script that can be used to replicate the problem.



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

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


#26223 [Fbk->Opn]: wired file system with session write handler make php crash

2003-11-13 Thread Xuefer at 21cn dot com
 ID:   26223
 User updated by:  Xuefer at 21cn dot com
-Summary:  output/error in session write handler make php crash
 Reported By:  Xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: win
 PHP Version:  4.3.4
 New Comment:

sorry for my careless
it took me so much time to track down this problem
but i don't know if it'll still crash if php env(system+apache+php..)
changed




Previous Comments:


[2003-11-13 19:46:05] [EMAIL PROTECTED]

Make sure you do not have older PHP dlls anywhere on your system. I am
unable to replicate the crash using latest CVS on either windows on
linux.



[2003-11-12 21:04:25] Xuefer at 21cn dot com

function n(){ }
function write() {
$b = $a;
return true;
}
session_set_save_handler ("n", "n", "n", "write", "n", "n"); 

session_start();



[2003-11-12 12:55:52] [EMAIL PROTECTED]

Please supply a short script that can be used to replicate the problem.

----------------

[2003-11-12 11:35:16] Xuefer at 21cn dot com

Description:

using session_set_save_handler()
in write handler, if an error occur or using echo, something is output,
php crash

this make script debugging very hard






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


#26171 [Fbk->Opn]: using /(a)+/ to match a long string makes php crash

2003-11-12 Thread xuefer at 21cn dot com
 ID:   26171
 User updated by:  xuefer at 21cn dot com
 Reported By:  xuefer at 21cn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PCRE related
-Operating System: win
+Operating System: winxp
 PHP Version:  4.3.4
 New Comment:

sorry, but no use
still crash without winxp crashing notice
it just shown error in apache log so i get nothing in drwtsn32.exe


Previous Comments:


[2003-11-12 13:05:27] [EMAIL PROTECTED]

Try raising the memory limit to 20-30 megs.



[2003-11-10 21:31:34] xuefer at 21cn dot com

;;;
; Resource Limits ;
;;;

max_execution_time = 30 ; Maximum execution time of each script, in
seconds
max_input_time = 60 ; Maximum amount of time each script may spend
parsing request data
memory_limit = 8M  ; Maximum amount of memory a script may consume
(8MB)



[2003-11-10 20:14:19] [EMAIL PROTECTED]

Do you have memory limit enabled?



[2003-11-08 13:20:23] xuefer at 21cn dot com

apache2
[Sun Nov 09 02:20:30 2003] [notice] Parent: child process exited with
status 128 -- Restarting.
still crashing

but what system did u pass the test?



[2003-11-08 12:50:57] [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

Works fine here with PHP4 & PHP5.



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

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


  1   2   >