#24534 [Fbk->Opn]: instability : iis is reseted automatically frequently

2003-07-17 Thread mstaiger at informatik dot uni-siegen dot de
 ID:   24534
 User updated by:  mstaiger at informatik dot uni-siegen dot de
 Reported By:  mstaiger at informatik dot uni-siegen dot de
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Win2k
 PHP Version:  4.3.2
 New Comment:

So far the snapshot didn't help. IIS keeps resetting (1-2 times a
day).
BUT : I found out, that before it happens, the available System Memory
goes rapidly down. Does this information help in any way?


Previous Comments:


[2003-07-13 10:56:21] [EMAIL PROTECTED]

And make sure you remove ALL existing PHP related dlls/binaries from
your system before installing the new version.




[2003-07-13 10:55:52] [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





[2003-07-10 03:32:05] mstaiger at informatik dot uni-siegen dot de

My description seems to give a wrong impression of the situation :
It is definitively NOT a "normal" thing to happen if the web service
resets several times during a day. 

This behaviour just started when we upgraded from php4.1 to 4.3.2, so
to me it seems to be related to the new version of php - Am I wrong?

Problem is, that I'm currently not able to trace the reset to certain
situations. Can someone recommend a monitoring tool for this situation?



[2003-07-09 17:54:41] [EMAIL PROTECTED]

And what exactly is the PHP problem here?
If I understood correctly, this 'terminates and restarts' is perfectly
normal thing to happen?




[2003-07-08 05:20:13] mstaiger at informatik dot uni-siegen dot de

Description:

win2k "service control manager" terminates and restarts www-services
automatically frequently. During this time, web-service is not
available (of course).

This information is logged in windows system log.

I'm currently not able to trace this behaviour to a certain point in
php-code, but it did not happen with versions prior to 4.2 and it
happens on different machines with the current php-version.






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



#24687 [Bgs->Opn]: Fatal error: Only variables or references can be returned by reference

2003-07-17 Thread derick
 ID:   24687
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nologic at pchome dot com dot tw
-Status:   Bogus
+Status:   Open
-Bug Type: Class/Object related
+Bug Type: Zend Engine 2 problem
 Operating System: windows2000sp4
 PHP Version:  5CVS-2003-07-16 (dev)
-Assigned To:  
+Assigned To:  zeev
 New Comment:

Actually this is not a bug, but just another BC break, but a pretty
huge one. I think it's too much of a problem not to address it.


Previous Comments:


[2003-07-16 19:48:20] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

..



[2003-07-16 19:00:30] nologic at pchome dot com dot tw

Description:

apache_2.0.47-win32-x86-no_ssl
XOOPS203 ( http://www.xoops.org )

For install:

php5-win32-200307162230 => Fatal Error !
php4.3.2=> succeeded !


sorry...my English is poor.



Reproduce code:
---
class TextSanitizer
{
function &htmlSpecialChars($text)
 {
line 96 -> return preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
 }
}

Expected result:

Fatal error: Only variables or references can be returned by reference
in D:\www\xoops2\html\install\class\textsanitizer.php on line 96






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



#24687 [Opn->Ana]: Fatal error: Only variables or references can be returned by reference

2003-07-17 Thread zeev
 ID:   24687
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nologic at pchome dot com dot tw
-Status:   Open
+Status:   Analyzed
 Bug Type: Zend Engine 2 problem
 Operating System: windows2000sp4
 PHP Version:  5CVS-2003-07-16 (dev)
 Assigned To:  zeev
 New Comment:

It never really worked (caused memory corruption).
Unlikely to be changed, since it doesn't make sense, but we'll see.


Previous Comments:


[2003-07-17 03:11:29] [EMAIL PROTECTED]

Actually this is not a bug, but just another BC break, but a pretty
huge one. I think it's too much of a problem not to address it.



[2003-07-16 19:48:20] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

..



[2003-07-16 19:00:30] nologic at pchome dot com dot tw

Description:

apache_2.0.47-win32-x86-no_ssl
XOOPS203 ( http://www.xoops.org )

For install:

php5-win32-200307162230 => Fatal Error !
php4.3.2=> succeeded !


sorry...my English is poor.



Reproduce code:
---
class TextSanitizer
{
function &htmlSpecialChars($text)
 {
line 96 -> return preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
 }
}

Expected result:

Fatal error: Only variables or references can be returned by reference
in D:\www\xoops2\html\install\class\textsanitizer.php on line 96






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



#24687 [Ana]: Fatal error: Only variables or references can be returned by reference

2003-07-17 Thread derick
 ID:   24687
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nologic at pchome dot com dot tw
 Status:   Analyzed
 Bug Type: Zend Engine 2 problem
 Operating System: windows2000sp4
 PHP Version:  5CVS-2003-07-16 (dev)
 Assigned To:  zeev
 New Comment:

If you do it like this it works:

class TextSanitizer
{
 function &htmlSpecialChars($text) {
  $foo = preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
  return $foo;
 }
}

So would it really be *that* hard to make it work?


Previous Comments:


[2003-07-17 03:23:15] [EMAIL PROTECTED]

It never really worked (caused memory corruption).
Unlikely to be changed, since it doesn't make sense, but we'll see.



[2003-07-17 03:11:29] [EMAIL PROTECTED]

Actually this is not a bug, but just another BC break, but a pretty
huge one. I think it's too much of a problem not to address it.



[2003-07-16 19:48:20] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

..



[2003-07-16 19:00:30] nologic at pchome dot com dot tw

Description:

apache_2.0.47-win32-x86-no_ssl
XOOPS203 ( http://www.xoops.org )

For install:

php5-win32-200307162230 => Fatal Error !
php4.3.2=> succeeded !


sorry...my English is poor.



Reproduce code:
---
class TextSanitizer
{
function &htmlSpecialChars($text)
 {
line 96 -> return preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
 }
}

Expected result:

Fatal error: Only variables or references can be returned by reference
in D:\www\xoops2\html\install\class\textsanitizer.php on line 96






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



#19434 [Fbk->Opn]: oci8 + ldap -> crash

2003-07-17 Thread ronan dot salmon at staff dot ittralee dot ie
 ID:   19434
 User updated by:  ronan dot salmon at staff dot ittralee dot ie
 Reported By:  ronan dot salmon at staff dot ittralee dot ie
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: redhat 7.3
 PHP Version:  4.3.3RC2-dev
 New Comment:

Sorry, I don't know what I've done yesterday but in fact LDAP doesn't
work alone anymore.

Here the script :
Wrong username or password!\n";
exit;
}
?>

I'm using the same php as yesterday.

[~/php]# gdb ./php4-STABLE-200307160330/sapi/cgi/php login.php
(gdb) run login.php
Starting program: /root/php/php4-STABLE-200307160330/sapi/cgi/php
login.php
[New Thread 16384 (LWP 23469)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 23469)]
0x40a71a34 in _int_free () from /lib/libc.so.6
(gdb) bt
#0  0x40a71a34 in _int_free () from /lib/libc.so.6
#1  0x40a709cc in free () from /lib/libc.so.6
#2  0x08065d81 in zif_ldap_get_entries (ht=2, return_value=0x8208040,
this_ptr=0x0, return_value_used=1, tsrm_ls=0x40d76440)
at /root/php/php4-STABLE-200307160330/ext/ldap/ldap.c:953
#3  0x0813ce45 in execute (op_array=0x8203028, tsrm_ls=0x81876b0)
at /root/php/php4-STABLE-200307160330/Zend/zend_execute.c:1616
#4  0x0812f7f1 in zend_execute_scripts (type=8, tsrm_ls=0x81876b0,
retval=0x0,
file_count=3) at
/root/php/php4-STABLE-200307160330/Zend/zend.c:886
#5  0x08106305 in php_execute_script (primary_file=0xb980,
tsrm_ls=0x81876b0) at
/root/php/php4-STABLE-200307160330/main/main.c:1685
#6  0x08142609 in main (argc=2, argv=0xba14)
at /root/php/php4-STABLE-200307160330/sapi/cgi/cgi_main.c:1542
#7  0x40a195cd in __libc_start_main () from /lib/libc.so.6


Previous Comments:


[2003-07-16 14:31:31] [EMAIL PROTECTED]

Can you try and reduce your script to smallest possible that causes the
crash? (like with only the ldap stuff?)




[2003-07-16 08:43:47] ronan dot salmon at staff dot ittralee dot ie

Red Hat Linux release 7.2
Oracle 9.0.1

./configure   --prefix=/home/sysadmin/usr
--exec-prefix=/home/sysadmin/usr --bindir=/home/sysadmin/usr/bin 
--sbindir=/home/sysadmin/usr/sbin --sysconfdir=/home/sysadmin/etc 
--datadir=/home/sysadmin/usr/share
--includedir=/home/sysadmin/usr/include --sysconfdir=/home/sysadmin/etc
--datadir=/home/sysadmin/usr/share 
--includedir=/usr/include--libdir=/home/sysadmin/usr/lib
-libexecdir=/home/sysadmin/usr/libexec
--mandir=/home/sysadmin/usr/share/man 
--infodir=/home/sysadmin/usr/share/info 
--with-config-file-path=/home/sysadmin/etc   --enable-debug 
--with-exec-dir=/home/sysadmin/usr/bin 
--with-ldap=/home/oracle/Oracle-9.0.1/ --enable-sigchild
--with-oci8=/home/oracle/Oracle-9.0.1/ --enable-experimental-zts

[~/php]$ gdb ./php4-STABLE-200307160530/sapi/cgi/php
(gdb) run login.php
Starting program:
/home/sysadmin/php/php4-STABLE-200307160530/sapi/cgi/php login.php
[New Thread 1024 (LWP 3325)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 3325)]
__pthread_mutex_lock (mutex=0xc085fa41) at mutex.c:99
99  mutex.c: No such file or directory.
in mutex.c
(gdb) bt
#0  __pthread_mutex_lock (mutex=0xc085fa41) at mutex.c:99
#1  0x408a0f94 in __libc_free (mem=0x409dc460) at malloc.c:3152
#2  0x08066421 in zif_ldap_get_entries (ht=2, return_value=0x820ed38,
this_ptr=0x0, return_value_used=1, tsrm_ls=0x81934b8)
at /home/sysadmin/php/php4-STABLE-200307160530/ext/ldap/ldap.c:953
#3  0x08144204 in execute (op_array=0x8209f70, tsrm_ls=0x81934b8)
at
/home/sysadmin/php/php4-STABLE-200307160530/Zend/zend_execute.c:1616
#4  0x08130e4c in zend_execute_scripts (type=8, tsrm_ls=0x81934b8,
retval=0x0,
file_count=3)
at /home/sysadmin/php/php4-STABLE-200307160530/Zend/zend.c:886
#5  0x0810671e in php_execute_script (primary_file=0xb9d0,
tsrm_ls=0x81934b8)
at /home/sysadmin/php/php4-STABLE-200307160530/main/main.c:1685
#6  0x0814d32a in main (argc=2, argv=0xba74)
at
/home/sysadmin/php/php4-STABLE-200307160530/sapi/cgi/cgi_main.c:1542
#7  0x40840316 in __libc_start_main (main=0x814c820 , argc=2,
ubp_av=0xba74, init=0x8062d98 <_init>, fini=0x814da60 <_fini>,
rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xba6c)
at ../sysdeps/generic/libc-start.c:129


--
Red Hat Linux release 9 (Shrike)
Oracle 9.2.0.1

./configure   --prefix=/usr  --exec-prefix=/usr   --bindir=/usr/bin 
--sbindir=/usr/sbin  --sysconfdir=/etc   --datadir=/usr/share
--includedir=/usr/include --sysconfdir=/etc   --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib   --libexecdir=/usr/libexec
--mandir=/usr/share/man   --infodir=/usr/share/info   --prefix=/usr
--with-config-file-path=/etc   --enable-debug  --with-exec-dir=/usr/bin
--with-ldap=/home/oracle

#24534 [Com]: instability : iis is reseted automatically frequently

2003-07-17 Thread info at xboot dot de
 ID:   24534
 Comment by:   info at xboot dot de
 Reported By:  mstaiger at informatik dot uni-siegen dot de
 Status:   Open
 Bug Type: IIS related
 Operating System: Win2k
 PHP Version:  4.3.2
 New Comment:

One of my customers has the same problem since upgrade from Php 4.1 to
4.32. The error occures 3 - 10 times a day.

I've tried a lot: Installing Php on three different machines with a
clean OS (and different Php versions > 4.2), playing arround with
IIS-settings, enable and disable Zend-Optimizer.
But problem is still there.

Now I use Windows 2003 Webserver Edition. IIS doesn't restart abnormal
(because he now uses a seperate worker process), but in the
Event-Viewer I found this (once again 3 - 10 times a day):
A process serving application pool 'DefaultAppPool' terminated
unexpectly. The process id was '...'.
The process exit code was '0xc005'.
When this error occures the following message is displayed on browser:
"Php has encountered an access violation at..."
When I reload the site everything works fine.


Previous Comments:


[2003-07-17 02:31:27] mstaiger at informatik dot uni-siegen dot de

So far the snapshot didn't help. IIS keeps resetting (1-2 times a
day).
BUT : I found out, that before it happens, the available System Memory
goes rapidly down. Does this information help in any way?



[2003-07-13 10:56:21] [EMAIL PROTECTED]

And make sure you remove ALL existing PHP related dlls/binaries from
your system before installing the new version.




[2003-07-13 10:55:52] [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





[2003-07-10 03:32:05] mstaiger at informatik dot uni-siegen dot de

My description seems to give a wrong impression of the situation :
It is definitively NOT a "normal" thing to happen if the web service
resets several times during a day. 

This behaviour just started when we upgraded from php4.1 to 4.3.2, so
to me it seems to be related to the new version of php - Am I wrong?

Problem is, that I'm currently not able to trace the reset to certain
situations. Can someone recommend a monitoring tool for this situation?



[2003-07-09 17:54:41] [EMAIL PROTECTED]

And what exactly is the PHP problem here?
If I understood correctly, this 'terminates and restarts' is perfectly
normal thing to happen?




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

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



#24672 [Opn]: "parse" is not similar to "parse_ini_file"

2003-07-17 Thread goba
 ID:   24672
 Updated by:   [EMAIL PROTECTED]
-Summary:  Search Documentation - Function list does not work
   correctly
 Reported By:  s dot pfalz at teles dot de
 Status:   Open
-Bug Type: Website problem
+Bug Type: Unknown/Other Function
 Operating System: PHP Website de*.php.net mirrors
 PHP Version:  Irrelevant
 New Comment:

There are functions returned with double underscores, when searching
for "parse" or "parse " (without quotes). Namely yaz_ccl_parse and
mb_parse_str. The fact that the parse_ini_file function is not found is
probably a bug in the similar_text() function, which we use on the
website.


Previous Comments:


[2003-07-16 02:51:29] s dot pfalz at teles dot de

Description:

When using the PHP.net document search function on de3.php.net to
search for parse_ini_file() and using the searchstring
"parse " (note the trailing space) this function will be found, but not
on de.php.net and de2.php.net.
Searching for "parse" only does not even return the parse_ini_file
function. There seems to be a problem with double underscores in
function names and the website search.


Reproduce code:
---
Try to search for "parse" on any of the de.php.net mirrors and  see
yourself what is returned ;)

Expected result:

Expected to get a list of functions containing the word "parse", but
not all functions are returned, mainly none of the functions containing
double underscores.

Actual result:
--
As mentioned above, this is always reproduceable with either Mozilla
1.4 or IE 6.0.





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



#24687 [Ana->Asn]: Fatal error: Only variables or references can be returned by reference

2003-07-17 Thread sniper
 ID:   24687
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nologic at pchome dot com dot tw
-Status:   Analyzed
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: windows2000sp4
 PHP Version:  5CVS-2003-07-16 (dev)
 Assigned To:  zeev


Previous Comments:


[2003-07-17 03:35:38] [EMAIL PROTECTED]

If you do it like this it works:

class TextSanitizer
{
 function &htmlSpecialChars($text) {
  $foo = preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
  return $foo;
 }
}

So would it really be *that* hard to make it work?



[2003-07-17 03:23:15] [EMAIL PROTECTED]

It never really worked (caused memory corruption).
Unlikely to be changed, since it doesn't make sense, but we'll see.



[2003-07-17 03:11:29] [EMAIL PROTECTED]

Actually this is not a bug, but just another BC break, but a pretty
huge one. I think it's too much of a problem not to address it.



[2003-07-16 19:48:20] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

..



[2003-07-16 19:00:30] nologic at pchome dot com dot tw

Description:

apache_2.0.47-win32-x86-no_ssl
XOOPS203 ( http://www.xoops.org )

For install:

php5-win32-200307162230 => Fatal Error !
php4.3.2=> succeeded !


sorry...my English is poor.



Reproduce code:
---
class TextSanitizer
{
function &htmlSpecialChars($text)
 {
line 96 -> return preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
 }
}

Expected result:

Fatal error: Only variables or references can be returned by reference
in D:\www\xoops2\html\install\class\textsanitizer.php on line 96






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



#24683 [Bgs]: ISO8601 weeks date seems incorrect for week 52

2003-07-17 Thread s dot vanvelthem at ibelgique dot com
 ID:   24683
 User updated by:  s dot vanvelthem at ibelgique dot com
 Reported By:  s dot vanvelthem at ibelgique dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Redhat Linux 9
 PHP Version:  4.3.2
 New Comment:

My english is too bad to understand thoroughly the document
(http://www.cl.cam.ac.uk/~mgk25/iso-time.html). 

But I suspect the function date is incorrect :

date ('Y-W', '2003-12-31') returns "2003-1". Ok for week 1, but should
return "2004-1", isn't it?


In PHP4.2.3 this function returned "2003-53".

If you take a look at Mysql doc
(http://www.mysql.com/doc/en/Date_and_time_functions.html) and the
function week, I've tested :

select week('2003-12-31', 3); -> 1 (as PHP does)

select date_format('2003-12-31', '%Y-%v') -> returns '2003-1'
(it's not what I want to have)

select date_format('2003-12-31', '%x-%v') -> returns '2004-1'
(OK that's what I wanted!!!).

In MySQL you have a supplementary 'format' character for year -> %x
used in conjunction with %v (ISO8601 week number). Maybe it would be
nice if we have it too in PHP. I've looked in the manual but I didn't
find this feature.


Previous Comments:


[2003-07-16 21:16:55] [EMAIL PROTECTED]

It actually works correctly now.

>From http://www.cl.cam.ac.uk/~mgk25/iso-time.html :

"In commercial and industrial applications (delivery times, production
plans, etc.), especially in Europe, it is often required to refer to a
week of a year. Week 01 of a year is per definition the first week that
has the Thursday in this year, which is equivalent to the week that
contains the fourth day of January. In other words, the first week of a
new year is the week that has the majority of its days in the new year.
Week 01 might also contain days from the previous year and the week
before week 01 of a year is the last week (52 or 53) of the previous
year even if it contains days from the new year. A week starts with
Monday (day 1) and ends with Sunday (day 7). For example, the first
week of the year 1997 lasts from 1996-12-30 to 1997-01-05 and can be
written in standard notation as.."



[2003-07-16 12:08:50] s dot vanvelthem at ibelgique dot com

Description:

In PHP4.3.2, the function date('W', $timestamp) behaves differently
from PHP4.2.3 concerning the ISO8601 dates 

For example (timestamps has been written in simple form for
readablility), 

date('W', '2003-12-31') 
reports 1 in PHP4.3.2 (incorrect? Mysql returns the same result)
reports 53 in PHP4.2.3 (should be the correct behaviour?)
 
(ISO8601 weeks starting on Monday, so i think you could sometimes have
a 53rd week in the year?).

It's difficult to differenciate same week between years as 

date('Y-W', '2003-12-31') reports '2003-1'


Sorry for my english,

Thanks for your time.

Seb






Reproduce code:
---
$timestamp = strtotime("2003-12-31");
echo date('Y-W', $timestamp);

> outputs '2003-1'






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



#24689 [NEW]: mysql_connect() doesn't set mysql_error() to false on valid connect

2003-07-17 Thread moa_hunter at yahoo dot com
From: moa_hunter at yahoo dot com
Operating system: Linux from source, 2.4.21
PHP version:  4.3.2
PHP Bug Type: MySQL related
Bug description:  mysql_connect() doesn't set mysql_error() to false on valid connect

Description:

If an error is created by a mysql query, then you try to open a new
database connection, then call mysql_error(), mysql_error() returns the
error from the failed query, not false because the connection was valid.

Having searched through the bug reports, esp 2051, 10291, and 22651, it
seems like mysql_error() should be false from version 4.0.6 onwards.

Reproduce code:
---
$connect_id = mysql_connect("localhost","auser","pass");
mysql_select_db("main_student_data");
$query = "INSERT INTO  VALUES('0012', 'Mike's place', 'false')";
mysql_query($query);
if(mysql_error())
{
  $con_id_2 = mysql_connect("localhost", "someuser", "apass");
  if(mysql_error())
  {
//abort with error
die(mysql_error());
  } else
  {
//code to write error to database
//...
  }
}

//I know one should check if mysql_connect returns false
//rather than if mysql_error() exists, but this is to show
// what happens.


Expected result:

For the code under write error to database to be run, because
mysql_error() should be false if the second connection is made.

Actual result:
--
The script dies with error: 

You have an error in your SQL syntax near 's place', 'false' at line 1

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



#17606 [Com]: File upload fails on large files

2003-07-17 Thread leon66427 at yahoo dot com dot tw
 ID:   17606
 Comment by:   leon66427 at yahoo dot com dot tw
 Reported By:  luimarma at iti dot upv dot es
 Status:   Closed
 Bug Type: HTTP related
 Operating System: RedHat 7.3
 PHP Version:  4.2.1
 New Comment:

I just found a thread... and it fix my problem

http://forums.devshed.com/t51395/s.html

Apache setting a limit on the size of files I upload

/etc/httpd/conf.d/php.conf 

LimitRequestBody


Previous Comments:


[2003-07-10 10:27:02] rahuddleston at yahoo dot com

I am having this trouble now... running php 4.2.2 on redhat 8 stock
build with apache 2.0.40...
I have adjusted ini for upload_max_filesize, max_execution_time and
post_max_Size using ini_set for just my upload page... Problem... Will
not write a file to /tmp if over a certain size... I'm trying to apply
5MB file - upload_max_filesize set to 10M, max_execution_time set to
300 and post_max_size set to 10M.. Also edited apache conf file -
LimitRequestBody per a post... I can upload 1.5MB but not 2MB or more..
Is ini_set maybe not working?



[2003-06-10 10:34:23] j dot henshaw at ulster dot ac dot uk

with reference to "[9 Jan 8:56am CST] OK, problem solved - here's what
I did" 

(I just found this thread ... and thanks to all that contributed, 'cos
you helped me fix my box.)

The reboot was not necessary. 

However, the php.ini file is only read when apache starts. So issue
"service httpd restart" command and your changes to php.ini are read
when apache restarts.

No way will Linux ever behave like a windoze box!



[2003-06-03 02:42:26] luimarma at iti dot upv dot es

Use a newer php version, versions under 4.2 have this feature 
broken.



[2003-06-02 19:45:56] aiphuong1001 at yahoo dot com

It doesn't work for my case. What did I do wrong?
I'm using PHP version 4.1.2, apache 1.3.26 on Mac OS X and 
trying to upload a 200M file via Internet Explorer with the 
setting in php.ini:

max_execution_time = 3
max_input_time = 3
memory_limit = 2000M
post_max_size = 2000M
file_uploads = On
;upload_tmp_dir = 
upload_max_filesize = 2000M
allow_url_fopen = On

and in http.conf:
Timeout = 3
MaxKeepAliveRequests = 5

The result is that the progress bar keeps showing 3/10 of 
the bar, the spinning wheel keeps spinning  and the 
uploading never ends for hours.

Files under 50M are uploaded successfully though. In my php 
code, I direct the uploaded files to a specific folder in 
the server. So, Is the upload_tmp_dir used at all? By the 
way, where is this folder? How can I check whether the 
upload eats sytem memory or not?
This task is so important to me. Please help!!!
Thanks so much.



[2003-02-12 02:33:12] simone at cisbic dot com

Someone found a solution for old PHP like 4.0.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/17606

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



#24690 [NEW]: Image-bug in PHP

2003-07-17 Thread peteralien2003 at yahoo dot com
From: peteralien2003 at yahoo dot com
Operating system: Win XP Pro
PHP version:  4.3.2
PHP Bug Type: Unknown/Other Function
Bug description:  Image-bug in PHP

Description:

I have:

Win XP Pro
IIS 5.1
PHP 4.3.2
GD 2.0.12

Reproduce code:
---


Expected result:

It was supposed to appear an image with the IP of the machine in the
browser.

Actual result:
--
Sometimes appears an image but other times it just appears the placehold
of it, even when i refresh the browser.

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



#24689 [Opn]: mysql_connect() doesn't set mysql_error() to false on valid connect

2003-07-17 Thread moa_hunter at yahoo dot com
 ID:   24689
 User updated by:  moa_hunter at yahoo dot com
 Reported By:  moa_hunter at yahoo dot com
 Status:   Open
 Bug Type: MySQL related
 Operating System: Linux from source, 2.4.21
 PHP Version:  4.3.2
 New Comment:

By the way, it's the code under //die with error
that is executed, not that the script is dying after the mysql_query
line.
Proven by changing the line 
die(mysql_error()); 
to 
die("Connection error : ".mysql_error());


Previous Comments:


[2003-07-17 06:08:14] moa_hunter at yahoo dot com

Description:

If an error is created by a mysql query, then you try to open a new
database connection, then call mysql_error(), mysql_error() returns the
error from the failed query, not false because the connection was
valid.

Having searched through the bug reports, esp 2051, 10291, and 22651, it
seems like mysql_error() should be false from version 4.0.6 onwards.

Reproduce code:
---
$connect_id = mysql_connect("localhost","auser","pass");
mysql_select_db("main_student_data");
$query = "INSERT INTO  VALUES('0012', 'Mike's place', 'false')";
mysql_query($query);
if(mysql_error())
{
  $con_id_2 = mysql_connect("localhost", "someuser", "apass");
  if(mysql_error())
  {
//abort with error
die(mysql_error());
  } else
  {
//code to write error to database
//...
  }
}

//I know one should check if mysql_connect returns false
//rather than if mysql_error() exists, but this is to show
// what happens.


Expected result:

For the code under write error to database to be run, because
mysql_error() should be false if the second connection is made.

Actual result:
--
The script dies with error: 

You have an error in your SQL syntax near 's place', 'false' at line 1





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



#24691 [NEW]: gmdate() problem

2003-07-17 Thread da_boost at hotmail dot com
From: da_boost at hotmail dot com
Operating system: FreeBSD 5.1-RELEASE #0
PHP version:  4.3.1
PHP Bug Type: Date/time related
Bug description:  gmdate() problem

Description:

this code is supposed to return the same as date() because my timezone is
GMT +1

Reproduce code:
---
echo "Date: ".date('d/m/Y H:i:s');
echo "";
echo "Gmdate: ".gmdate('d/m/Y H:i:s', time() + 3600);

Expected result:

Date: 17/07/2003 14:03:06
Gmdate: 17/07/2003 14:03:06

Actual result:
--
Date: 17/07/2003 14:03:06
Gmdate: 17/07/2003 13:03:06

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



#24691 [Opn->Bgs]: gmdate() problem

2003-07-17 Thread derick
 ID:   24691
 Updated by:   [EMAIL PROTECTED]
 Reported By:  da_boost at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: FreeBSD 5.1-RELEASE #0
 PHP Version:  4.3.1
 New Comment:

Never heard of daylight savings time? Europe is GMT+2 at the moment.


Previous Comments:


[2003-07-17 07:18:10] da_boost at hotmail dot com

Description:

this code is supposed to return the same as date() because my timezone
is GMT +1

Reproduce code:
---
echo "Date: ".date('d/m/Y H:i:s');
echo "";
echo "Gmdate: ".gmdate('d/m/Y H:i:s', time() + 3600);

Expected result:

Date: 17/07/2003 14:03:06
Gmdate: 17/07/2003 14:03:06

Actual result:
--
Date: 17/07/2003 14:03:06
Gmdate: 17/07/2003 13:03:06





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



#11989 [Com]: PHP Won't work on XP

2003-07-17 Thread ock1991 at hotmail dot com
 ID:   11989
 Comment by:   ock1991 at hotmail dot com
 Reported By:  lanceseidman at lasvegas dot com
 Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Microsoft Windows XP Professiona
 PHP Version:  4.0.6
 New Comment:

oh so your case might be the filename extension (php supported: php,
php3, phtml) problem. Whats worse, you might be installing on the wrong
partition of your hard disk. Check or do a search on the location of
php.exe might help determine if the server was on the same partition


Previous Comments:


[2001-07-09 18:56:07] [EMAIL PROTECTED]

First try news://news.php.net/php.install and/or
news://news.php.net/php.windows before sending bug reports.



[2001-07-09 18:51:05] [EMAIL PROTECTED]

please give more information, 
which webserver do you use, did you make sure that this webserver knows
your file extension?!



[2001-07-09 17:55:02] lanceseidman at lasvegas dot com

I download the Windows Installer and try to install it on windows XP
but does not wish to work.It installs and then if I go to try and view
a php script it shows just the script text and not the actual document
for an example:

Did not work at all, and I was wondering will PHP be fore Windows XP at
all?

Thank you,
Lance Seidman




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



#24177 [Fbk->Opn]: header() call doesn't replace 404 status code

2003-07-17 Thread [EMAIL PROTECTED]
 ID:   24177
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  4.3.2
 New Comment:

I've just tried out php4-STABLE-200307171330 and the problem is still
present.

I'll write a small testcase during the weekend so that you can easily
verify the bug.

Regards,
Fredrik


Previous Comments:


[2003-07-10 23:48:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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


Can you do a favor and test the latest CVS? 
I have no time to setup a mirror just to test this.. :)




[2003-06-15 10:20:54] [EMAIL PROTECTED]

Yes. Odd at first.

After some experimentation I figured it out.

do-download.inc calls flush() on line 31. This causes the 'original'
status to be sent instead of the one specified by the call to
header().

If 4096 bytes or more are written before the flush the correct status
is sent.

I guess the codepath that handles an expicit flush manages to loose the
new status code somewhere.

I replaced echo " " with echo str_repeat(' ', 4096) and now our mirror
works fine and dandy again.



[2003-06-13 15:19:17] [EMAIL PROTECTED]

# lynx -dump -head http://se.php.net/imap
HTTP/1.1 200 OK
Date: Fri, 13 Jun 2003 19:17:17 GMT
Server: Apache/2.0.46 (Unix) mod_ssl/2.0.46 OpenSSL/0.9.6b PHP/4.3.2
X-Powered-By: PHP/4.3.2
Content-language: en
Set-Cookie: COUNTRY=FIN%2C213.243.181.8; expires=Fri, 20-Jun-2003
19:17:17 GMT;
 path=/; domain=.php.net
Status: 200 OK
Last-Modified: Fri, 13 Jun 2003 19:09:38 GMT
Vary: Cookie
Connection: close
Content-Type: text/html;charset=ISO-8859-1

That works just fine?




[2003-06-13 13:42:09] [EMAIL PROTECTED]

Description:

Using Apache 2.0.46 and PHP 4.3.2 compiled with --with-apxs2

When a PHP page is used as an ErrorDocument page, calling any variation
of header() to replace the status code doesn't work. The client always
receive 404.

For example, try downloading from se.php.net:
http://se.php.net/get/php-4.3.2.tar.gz/from/this/mirror

You'll se that a Location header has been added (by the call to
header() in /include/do-download.inc) but the status returned is still
404, not 302 as expected.






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



#24681 [Fbk->Opn]: windows xp and php-module with apache2

2003-07-17 Thread harry at rhsoft dot net
 ID:   24681
 User updated by:  harry at rhsoft dot net
 Reported By:  harry at rhsoft dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  4.3.2
 New Comment:

PHP Version 4.3.3RC2-dev

I have installed this version but the problem still exists

the browser shows the title of the error-page but then the connection
will hang


Previous Comments:


[2003-07-16 21:08:04] [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





[2003-07-16 11:01:57] harry at rhsoft dot net

Description:

On Windows XP with Apache (Apache/2.0.47 (Win32) PHP/4.3.2 - PHP 4.3.2
APACHE2HANDLER) when a page will not be found the server doesnt close
the connection and dont show the error page

so the browser will hang and must be closed or the server restartet

this problem is only with php-module
with the cgi it will work but i cant use it because there is no
authentication with php

This error also happens when a css-file ore something else will not be
found from a page what is parsed with php

on urls that not will be parsed with php the error-page from apache
will be loaded and the connection closed so it must be a bug in php
itself














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



#24683 [Bgs]: ISO8601 weeks date seems incorrect for week 52

2003-07-17 Thread mgf
 ID:   24683
 Updated by:   [EMAIL PROTECTED]
 Reported By:  s dot vanvelthem at ibelgique dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Redhat Linux 9
 PHP Version:  4.3.2
 New Comment:

The result from date() is correct -- the date() formats do not include
one for the year corresponding to the ISO8601 week number (perhaps this
should be a feature request?).

However, strftime() does -- see http://www.php.net/strftime, and look
for the %g and %G conversion specifiers.


Previous Comments:


[2003-07-17 05:13:21] s dot vanvelthem at ibelgique dot com

My english is too bad to understand thoroughly the document
(http://www.cl.cam.ac.uk/~mgk25/iso-time.html). 

But I suspect the function date is incorrect :

date ('Y-W', '2003-12-31') returns "2003-1". Ok for week 1, but should
return "2004-1", isn't it?


In PHP4.2.3 this function returned "2003-53".

If you take a look at Mysql doc
(http://www.mysql.com/doc/en/Date_and_time_functions.html) and the
function week, I've tested :

select week('2003-12-31', 3); -> 1 (as PHP does)

select date_format('2003-12-31', '%Y-%v') -> returns '2003-1'
(it's not what I want to have)

select date_format('2003-12-31', '%x-%v') -> returns '2004-1'
(OK that's what I wanted!!!).

In MySQL you have a supplementary 'format' character for year -> %x
used in conjunction with %v (ISO8601 week number). Maybe it would be
nice if we have it too in PHP. I've looked in the manual but I didn't
find this feature.



[2003-07-16 21:16:55] [EMAIL PROTECTED]

It actually works correctly now.

>From http://www.cl.cam.ac.uk/~mgk25/iso-time.html :

"In commercial and industrial applications (delivery times, production
plans, etc.), especially in Europe, it is often required to refer to a
week of a year. Week 01 of a year is per definition the first week that
has the Thursday in this year, which is equivalent to the week that
contains the fourth day of January. In other words, the first week of a
new year is the week that has the majority of its days in the new year.
Week 01 might also contain days from the previous year and the week
before week 01 of a year is the last week (52 or 53) of the previous
year even if it contains days from the new year. A week starts with
Monday (day 1) and ends with Sunday (day 7). For example, the first
week of the year 1997 lasts from 1996-12-30 to 1997-01-05 and can be
written in standard notation as.."



[2003-07-16 12:08:50] s dot vanvelthem at ibelgique dot com

Description:

In PHP4.3.2, the function date('W', $timestamp) behaves differently
from PHP4.2.3 concerning the ISO8601 dates 

For example (timestamps has been written in simple form for
readablility), 

date('W', '2003-12-31') 
reports 1 in PHP4.3.2 (incorrect? Mysql returns the same result)
reports 53 in PHP4.2.3 (should be the correct behaviour?)
 
(ISO8601 weeks starting on Monday, so i think you could sometimes have
a 53rd week in the year?).

It's difficult to differenciate same week between years as 

date('Y-W', '2003-12-31') reports '2003-1'


Sorry for my english,

Thanks for your time.

Seb






Reproduce code:
---
$timestamp = strtotime("2003-12-31");
echo date('Y-W', $timestamp);

> outputs '2003-1'






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



#24684 [Bgs]: PHP 4.3.1 + no longer compatible with O'reilly WebSite Pro 3.0

2003-07-17 Thread webmaster at wisesoftwareinc dot com
 ID:   24684
 User updated by:  webmaster at wisesoftwareinc dot com
 Reported By:  webmaster at wisesoftwareinc dot com
 Status:   Bogus
 Bug Type: CGI related
 Operating System: Win 2000 SP4
 PHP Version:  4.3.1
 New Comment:

Greetings, 

I've tried three different ways to get PHP 4.3.1 + to run on server
software that works fine with 4.3.0 - CLI is just one thing I tried as
specified in my "bogus" bug report. I do understand the difference.

You changed something in 4.3.1. 

What happened, at least tell us that and I'll leave this issue alone
and stick with 4.3.0.

Thank you.


Previous Comments:


[2003-07-16 20:53:20] [EMAIL PROTECTED]

DO NOT use the 'Add comment' link when you add comments to your own bug
report, use the 'Edit Submission'..

And this is bogus, CLI is not CGI.




[2003-07-16 16:31:20] webmaster at wisesoftwareinc dot com

Greetings, 

Thank you very much for your expedient response, it is greatly
appreciated.

I downloaded and installed the latest snap shot and switched between 1
and 0 on the cgi.fix_pathinfo setting as you suggested, but alas the
problem (bug?) still remains with the 4.3.2 snap shot on WebSite Pro 3.



[2003-07-16 15:12:40] [EMAIL PROTECTED]

Try latest stable snapshot from http://snaps.php.net/

Then try setting cgi.fix_pathinfo in your php.ini file. I don't know
which setting (0 or 1) works with that webserver, but one of them
should.




[2003-07-16 14:44:51] webmaster at wisesoftwareinc dot com

Description:

Greetings, PHP

I have spent the last few days trying to find a successful combination
that will work with O'reilly WebSite 3.0 as well as PHP 4.3.0 does. 

Versions 4.3.1 and higher (including 5 beta) seems to be no longer
compatible with this web server software.

I use the CGI configuration w/o cgi redirect on two other identical
severs - which works seamlessly with PHP 4.3.0 and O'reilly WebSite
3.0.

After failed attempts with versions 4.3.1+ on this new server, I tried
this same PHP 4.3.0 configuration and again works perfectly.

But now with 4.3.1 + all I receive is the "No Input File Specified"
messages or page not found is some cases.

I'm only presenting the 3 notes below to prove incompatibility...
please do not take them as support questions or a false bugs reports; I
do realize they would be if submitted separately as such.

Solutions Tried for 4.3.1 +

1. I tried the CLI folder's php.exe, which works past the default
php.exe only to the point were the simplest echo of "hello world" needs
to have a line break before any PHP or html code - or you receive a CGI
500 error.

2. So I place a line break before any code to get the script to output
properly - but of course I then can not use sessions. (headers already
sent message).

3. I then tried the isapi extension configuration - which too does not
work with sessions on WebSite Pro 3 - due to the fact that the
session_start function creates a new session file on every page
refresh.



This new lack of compatibility may or may not be a bug, but I feel it
needs to be professionally addressed by the PHP staff. Even a notice on
the web site, though heart breaking, would suffice.

Thank you for your kind attention.

Reproduce code:
---


test






Expected result:

Hello World

Actual result:
--
: : : : : hello world : : Content-length: 589 
500 Server Error
The server encountered an error and was unable to complete your
request.
Message: CGI output from C:/WebSite/htdocs/test.php contained no blank
line separating header and data (most likely a broken CGI program)

Please contact the server administrator at
[EMAIL PROTECTED] and inform them of the time the error
occured, plus anything you know of that may have caused the error.






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



#24684 [Bgs]: PHP 4.3.1 + no longer compatible with O'reilly WebSite Pro 3.0

2003-07-17 Thread webmaster at wisesoftwareinc dot com
 ID:   24684
 User updated by:  webmaster at wisesoftwareinc dot com
 Reported By:  webmaster at wisesoftwareinc dot com
 Status:   Bogus
 Bug Type: CGI related
 Operating System: Win 2000 SP4
 PHP Version:  4.3.1
 New Comment:

Greetings, 

Let me clarify this.

The only successful combination that WebSite Pro 3 has with PHP 4.3.0
and lower is the following:

You must use the php.exe (the default one, not CLI's folder of php.exe
of course).
You must set wwwserver/shellcgi as the content type.
You must set "cgi.force_redirect = 0"

This has successfully worked on three servers using WSP 3 since PHP 4
was on the table until 4.3.1.

I only tried the other configuration I mentioned, in my past
correspondence on this issue, out of desperation not as a final
solution.

Sorry if I'm being a pest, but something changed.

I just want you to know that I'm too much in love with PHP to
disrespect you guys.

Thank you for time and kind help!

Best wishes!


Previous Comments:


[2003-07-17 11:21:52] webmaster at wisesoftwareinc dot com

Greetings, 

I've tried three different ways to get PHP 4.3.1 + to run on server
software that works fine with 4.3.0 - CLI is just one thing I tried as
specified in my "bogus" bug report. I do understand the difference.

You changed something in 4.3.1. 

What happened, at least tell us that and I'll leave this issue alone
and stick with 4.3.0.

Thank you.



[2003-07-16 20:53:20] [EMAIL PROTECTED]

DO NOT use the 'Add comment' link when you add comments to your own bug
report, use the 'Edit Submission'..

And this is bogus, CLI is not CGI.




[2003-07-16 16:31:20] webmaster at wisesoftwareinc dot com

Greetings, 

Thank you very much for your expedient response, it is greatly
appreciated.

I downloaded and installed the latest snap shot and switched between 1
and 0 on the cgi.fix_pathinfo setting as you suggested, but alas the
problem (bug?) still remains with the 4.3.2 snap shot on WebSite Pro 3.



[2003-07-16 15:12:40] [EMAIL PROTECTED]

Try latest stable snapshot from http://snaps.php.net/

Then try setting cgi.fix_pathinfo in your php.ini file. I don't know
which setting (0 or 1) works with that webserver, but one of them
should.




[2003-07-16 14:44:51] webmaster at wisesoftwareinc dot com

Description:

Greetings, PHP

I have spent the last few days trying to find a successful combination
that will work with O'reilly WebSite 3.0 as well as PHP 4.3.0 does. 

Versions 4.3.1 and higher (including 5 beta) seems to be no longer
compatible with this web server software.

I use the CGI configuration w/o cgi redirect on two other identical
severs - which works seamlessly with PHP 4.3.0 and O'reilly WebSite
3.0.

After failed attempts with versions 4.3.1+ on this new server, I tried
this same PHP 4.3.0 configuration and again works perfectly.

But now with 4.3.1 + all I receive is the "No Input File Specified"
messages or page not found is some cases.

I'm only presenting the 3 notes below to prove incompatibility...
please do not take them as support questions or a false bugs reports; I
do realize they would be if submitted separately as such.

Solutions Tried for 4.3.1 +

1. I tried the CLI folder's php.exe, which works past the default
php.exe only to the point were the simplest echo of "hello world" needs
to have a line break before any PHP or html code - or you receive a CGI
500 error.

2. So I place a line break before any code to get the script to output
properly - but of course I then can not use sessions. (headers already
sent message).

3. I then tried the isapi extension configuration - which too does not
work with sessions on WebSite Pro 3 - due to the fact that the
session_start function creates a new session file on every page
refresh.



This new lack of compatibility may or may not be a bug, but I feel it
needs to be professionally addressed by the PHP staff. Even a notice on
the web site, though heart breaking, would suffice.

Thank you for your kind attention.

Reproduce code:
---


test






Expected result:

Hello World

Actual result:
--
: : : : : hello world : : Content-length: 589 
500 Server Error
The server encountered an error and was unable to complete your
request.
Message: CGI output from C:/WebSite/htdocs/test.php contained no blank
line separating header and data (most likely a broken CGI program)

Please contact the server administrator at
[EMAIL PROTECTED] and inform them of the time the error
occured, plus anything you know of that may have caused the error.



---

#24693 [NEW]: session.use_trans_sid should changeable by scripts

2003-07-17 Thread chris_se at gmx dot net
From: chris_se at gmx dot net
Operating system: GNU/Linux
PHP version:  4.3.2
PHP Bug Type: Feature/Change Request
Bug description:  session.use_trans_sid should changeable by scripts

Description:

According to http://de3.php.net/manual/de/function.ini-set.php you may not
alter session.use_trans_sid in PHP scripts, because it is only changeable
in PHP_INI_SYSTEM|PHP_INI_PERDIR.

I do not know why this is so, but in my eyes it should at least be
possible to deactivate this option at runtime.

Reproduce code:
---

Test


Expected result:

In an environment with 'session.use_trans_sid' activated in the php.ini
file or in a .htaccess file, it should *not* append the session id to the
link:

Test

Actual result:
--
The session id is appended to the link and not even an error or notice ist
produced:

Test

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



#24658 [Opn->Ver]: class hints with array_walk() causing crash

2003-07-17 Thread moriyoshi
 ID:   24658
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eric at cosky dot com
-Status:   Open
+Status:   Verified
 Bug Type: Reproducible crash
 Operating System: Windows XP SP1
 PHP Version:  5.0.0b1 (beta1)
 New Comment:

verified



Previous Comments:


[2003-07-15 01:09:40] eric at cosky dot com

Description:

The following code crashes my install of PHP from July 13, 2003.
Removing the class hint in BoomWalker eliminates the crash.

Reproduce code:
---
class SomeClass {}
class CrashClass {
function Boom()
{
$a = array( 0,1,2 );
array_walk(&$a, "BoomWalker", &$this);
}
}
function BoomWalker(SomeClass &$arrayItem, &$key, &$crashObj) {}
$c = new CrashClass;
$c->Boom();


Expected result:

Nothing.

Actual result:
--
System alert for PHP crashing.





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



#24485 [Ver]: $a = $b; become $a=&$b; when I use a function

2003-07-17 Thread moriyoshi
 ID:   24485
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gomez at efrei dot fr
 Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  4.3.3RC2-dev, 5.0.0b2-dev
 New Comment:

The following piece produces a similar result:





Previous Comments:


[2003-07-09 18:19:42] [EMAIL PROTECTED]

Same result with both PHP 4.3.3RC2-dev and 5.0.0b2-dev.




[2003-07-03 10:17:47] gomez at efrei dot fr

Description:

In an array, classes become classes references when I use a function
member.

Because of that, I don't copy it anymore, I just produce more  pointers
to it.
(see the '&' in the var dump)

If you comment the magic line, the bug won't appear.

Tested under linux (php 4.1.2 and 4.2.3)
and windows (php 4.3.2)

Reproduce code:
---
show(); /* magic line */
$A[0]->value = 'A';
$B = $A;
$B[0]->value = 'B';
echo $A[0]->value.$B[0]->value;
echo "\n";
var_dump( $A );

?>

Expected result:

AB
array(1) {
  [0]=>
  object(a)(1) {
["value"]=>
string(1) "A"
  }
}

Actual result:
--
BB
array(1) {
  [0]=>
  &object(a)(1) {
["value"]=>
string(1) "B"
  }
}






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



#21769 [Com]: round error

2003-07-17 Thread kdeschen at ers dot ca
 ID:   21769
 Comment by:   kdeschen at ers dot ca
 Reported By:  ltaupiac at lfdj dot com
 Status:   Bogus
 Bug Type: Math related
 Operating System: Solaris 7
 PHP Version:  4.3.0
 New Comment:

Try these rounds. It give unexpected results on my web server.
Apache/1.3.26 and PHP4.3.0

echo "".round(7026.005,2); --> 7026.01
echo "".round(7026.015,2); --> 7026.02
echo "".round(7026.025,2); --> 7026.02
echo "".round(7026.035,2); --> 7026.03
echo "".round(7026.045,2); --> 7026.05
echo "".round(7026.055,2); --> 7026.06
echo "".round(7026.065,2); --> 7026.06
echo "".round(7026.075,2); --> 7026.07
echo "".round(7026.085,2); --> 7026.09
echo "".round(7026.095,2); --> 7026.1


Previous Comments:


[2003-01-20 03:54:13] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

http://www.php.net/manual/en/language.types.float.php



[2003-01-20 03:48:54] ltaupiac at lfdj dot com

a=-$a-  b=-$b-  m=$a*$b=-$m- and res=$res")  ."-" ;
print ("v1=round(4.31 * 5 , 1)=-$v1-  -") . round($v1,1) ."-" ;
print ("v2=round(m, 1)=-$v2-  -") . round($v2,1) ."-" ;
print ("v3=round(a*b , 1)=-$v3-  -") . round($v3,1) ."-" ;
print ("v4=round(res , 1)=-$v4-  -") . round($v4,1) ."-" ;
print ("expected round by 2 round... ") ;
print ("vbiz=round($a*$b ,2)=$vbiz -- and round($vbiz, 1)=") .
round($vbiz,1) ."" ;

print ("r=$v2-$v1=$r -good-") ;
print ("r2=$v3-$v1=$r2 -good-") ;
print ("unexpected result... ") ;
print ("r3=$res-$m=$r3 -Huh ?-") ;

?>


will give that output

a=-4.31- b=-5- m=4.31*5=-21.55- and res=21.55-
v1=round(4.31 * 5 , 1)=-21.5- -21.5-
v2=round(m, 1)=-21.5- -21.5-
v3=round(a*b , 1)=-21.5- -21.5-
v4=round(res , 1)=-21.6- -21.6-
expected round by 2 round...
vbiz=round(4.31*5 ,2)=21.55 -- and round(21.55, 1)=21.6

r=21.5-21.5=0 -good-
r2=21.5-21.5=0 -good-
unexpected result...
r3=21.55-21.55=3.5527136788005E-15 -Huh ?-





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



#24694 [NEW]: File upload support does not populate $_FILES, $_POST

2003-07-17 Thread namejko at topiksolutions dot com
From: namejko at topiksolutions dot com
Operating system: Windows NT 5.1 build 2000 (XP)
PHP version:  4.3.1
PHP Bug Type: HTTP related
Bug description:  File upload support does not populate $_FILES, $_POST

Description:

This version of PHP appears to not handle file uploads properly.  Code
verbatim from the documentation to use the multipart/form-data enctype in
POST forms don't actually send the information properly into $_POST or
$_FILES.  Instead, the request comes across in $_GET, where it is
unusable.  In previous versions of PHP (in this case, tested on 4.0.6) the
code works perfectly.  Below are the HTML form code and the PHP code,
together in one file.  On 4.3.1, $_POST and $_FILES are empty arrays,
whereas they are filled on 4.0.6.

Reproduce code:
---



File:  




Expected result:

This is what is returned under PHP 4.0.6:

Array
(
[MAX_FILE_SIZE] => 3
[submit] => submit
)
Array
(
)
Array
(
[userfile] => Array
(
[name] => Icon7EFDA3AC3.txt
[type] => application/octet-stream
[tmp_name] => /tmp/phpEPVaEg
[size] => 27648
)

)
...

Actual result:
--
This is what is returned by PHP 4.3.1:

Array
(
)
Array
(
[Content-Disposition:_form-data;_name] => \"MAX_FILE_SIZE\"

3
-7d32f4b280238
Content-Disposition: form-data; name=\"userfile\";
filename=\"C:\\Documents and Settings\\Zawitz\\Application
Data\\Microsoft\\Installer\\{7EFDA3AC-8A61-43C0-B023-33866829C816}\\Icon7EFDA3AC3.txt\"
Content-Type: application/octet-stream

MZ
)
Array
(
)
---

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



#24694 [Opn->Fbk]: File upload support does not populate $_FILES, $_POST

2003-07-17 Thread derick
 ID:   24694
 Updated by:   [EMAIL PROTECTED]
 Reported By:  namejko at topiksolutions dot com
-Status:   Open
+Status:   Feedback
 Bug Type: HTTP related
 Operating System: Windows NT 5.1 build 2000 (XP)
 PHP Version:  4.3.1
 New Comment:

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


Previous Comments:


[2003-07-17 14:34:03] namejko at topiksolutions dot com

Description:

This version of PHP appears to not handle file uploads properly.  Code
verbatim from the documentation to use the multipart/form-data enctype
in POST forms don't actually send the information properly into $_POST
or $_FILES.  Instead, the request comes across in $_GET, where it is
unusable.  In previous versions of PHP (in this case, tested on 4.0.6)
the code works perfectly.  Below are the HTML form code and the PHP
code, together in one file.  On 4.3.1, $_POST and $_FILES are empty
arrays, whereas they are filled on 4.0.6.

Reproduce code:
---



File:  




Expected result:

This is what is returned under PHP 4.0.6:

Array
(
[MAX_FILE_SIZE] => 3
[submit] => submit
)
Array
(
)
Array
(
[userfile] => Array
(
[name] => Icon7EFDA3AC3.txt
[type] => application/octet-stream
[tmp_name] => /tmp/phpEPVaEg
[size] => 27648
)

)
...

Actual result:
--
This is what is returned by PHP 4.3.1:

Array
(
)
Array
(
[Content-Disposition:_form-data;_name] => \"MAX_FILE_SIZE\"

3
-7d32f4b280238
Content-Disposition: form-data; name=\"userfile\";
filename=\"C:\\Documents and Settings\\Zawitz\\Application
Data\\Microsoft\\Installer\\{7EFDA3AC-8A61-43C0-B023-33866829C816}\\Icon7EFDA3AC3.txt\"
Content-Type: application/octet-stream

MZ
)
Array
(
)
---





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



#24695 [NEW]: SEGV in zend_hash_find - possible memory corruption?

2003-07-17 Thread jna at retina dot net
From: jna at retina dot net
Operating system: Redhat Linux 7.2
PHP version:  5CVS-2003-07-17 (dev)
PHP Bug Type: Scripting Engine problem
Bug description:  SEGV in zend_hash_find - possible memory corruption?

Description:

We are actually running on php4-STABLE-200307160330.
uname -a:

[EMAIL PROTECTED] http-debug]# uname -a
Linux shibboleth.unspunrecords.com 2.4.2-ac20 #3 Wed 
Mar 21 07:23:43 PST 2001 i686 unknown

zend_hash_find causes a segmentation fault at random 
intervals in a running site, after long uptimes (and 
sometimes immediately on startup)

It appears that the hashtable (ht) holds a corrupt 
pointer and this is what is causing the crash. I have a 
core dump and binary available to anyone who wants to 
look at it.

In every frame of the backtrace, I can't view hashtable 
(and I assume I should be able to, right?)

Also, I realize that I am filing a bug on dev code -- 
We have had a similar issue (random core dumps after 
long uptimes) in nearly every version of PHP up to now, 
and this is the first time I was able to capture a core 
dump because we run our server in a chroot which was 
making it quite hard to capture this error properly.

Reproduce code:
---
I believe this is caused during an auto-increment operation as part of a
hashtable lookup:

in top.php (called from index.php):



Considering that this lookup is the first lookup done by any code on this
request, it seems almost certain that the hashtable is being clobbered.

Expected result:

$browse_type should be set with the contents of 
$HTTP_GET_VARS["browse_type"]

Actual result:
--
(gdb) frame 0
(gdb) print ht 
$25 = (HashTable *) 0x6574693f
(gdb) print *ht
Cannot access memory at address 0x6574693f

and...

(gdb) backtrace
#0  0x809aed9 in zend_hash_find (ht=0x825660c, 
arKey=0x8287a6c "browse_type", 
nKeyLength=12, pData=0xbfffba1c)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_hash.c:880
#1  0x809fcc8 in zend_fetch_dimension_address 
(result=0x829a5bc, 
op1=0x829a5cc, op2=0x829a5dc, Ts=0xbfffbb18, 
type=0)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:633
#2  0x80a342e in execute (op_array=0x8284424)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:1283
#3  0x80ab680 in execute (op_array=0x8254274)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:2177
#4  0x8096ffe in zend_execute_scripts (type=8, 
retval=0x0, file_count=3)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend.c:886
#5  0x8079ff6 in php_execute_script 
(primary_file=0xb5d8)
at /unspun/src/php4-STABLE-200307160330/main/
main.c:1685
#6  0x80ad6b6 in apache_php_module_main (r=0x824dbbc, 
display_source_mode=0)
at /unspun/src/php4-STABLE-200307160330/sapi/
apache/sapi_apache.c:54
#7  0x807359c in send_php ()
#8  0x80735f9 in send_parsed_php ()
#9  0x813600b in ap_invoke_handler ()
#10 0x814b0ab in process_request_internal ()
#11 0x814b4e3 in ap_internal_redirect ()
#12 0x806c548 in handle_dir ()
#13 0x813600b in ap_invoke_handler ()
---Type  to continue, or q  to quit--- 
#14 0x814b0ab in process_request_internal ()
#15 0x814b10c in ap_process_request ()
#16 0x8142021 in child_main ()
#17 0x81422b3 in make_child ()
#18 0x8142364 in startup_children ()
#19 0x81429dc in standalone_main ()
#20 0x814325b in main ()
#21 0x400c0b5c in __libc_start_main (main=0x8142e98 
, argc=1, 
ubp_av=0xbaec, init=0x8066840 <_init>, 
fini=0x81735bc <_fini>, 
rtld_fini=0x4000d634 <_dl_fini>, 
stack_end=0xbae4)
at ../sysdeps/generic/libc-start.c:129

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



#3928 [Com]: shorthand notation for filling associative arrays, please

2003-07-17 Thread tomer at parity-bit dot com
 ID:   3928
 Comment by:   tomer at parity-bit dot com
 Reported By:  erw dot dongen at wxs dot nl
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows 98
 PHP Version:  4.0
 New Comment:

I think you could do something with the range() function here as a
workaround.


Previous Comments:


[2001-02-10 14:15:33] [EMAIL PROTECTED]

refiling against 4.0.



[2000-03-26 02:11:31] erw dot dongen at wxs dot nl

To my knowledge there's no way of labelling/declaring the keys in an
associative arrays once 
and then simply only specifying the individual values. 
So when I set up an array with basically constant string values I ended
up typing something like this 75 times:

$tokens[] = array ( "startcode" => "la",
"endcode" => "di",
"classname" => "da"
   );
$tokens[] = array ( "startcode" => "ob",
"endcode" => "la",
"classname" => "di"
);
etc.

So an extension to the array() definition would greatly be appreciated
to alleviate the typing.
I suggest something like:

array ( [keylist][keylist][keylist] = 
  val1, val2, val3, etc,
);
or in the above example
array ( [][keylist] = )

Where 'keylist' is a finite list of keys of the associative array
and '[]' denotes the current behaviour of defaulting to numeric keys
starting at 'number of element in array =1'

Example:
$tokens = array ( ['foo', 'bar']['start','end','class'] =
 "la", "di", "da", // the elements  of
'foo'
   "ob", "la", "di" // ditto 'bar'
   );
Which gives $tokens['foo']['start']="la", $tokens['foo']['end']="di",
$tokens['foo']['class']="da"
$tokens['bar']['class']= "ob", $tokens['bar']['class']= "la",
$tokens['bar']['class']= "di".

Similar: $tokens = array( []['start,'end',class'] =
   "la", "di","da",
   "ob", "la", "di"
 );
gives $tokens[0]['start']="la" etc. until $tokens[1]['class']="di"
(assuming $tokens was empty)

Possible extensions for numeric keys may be:
'[1..3]'  denoting a finite list with numeric keys starting with 1 and
ending with 3 inclusive.
In this case, if less than 3 rows are subsequently defined,
row3 would still exist but be empty
and
'[5..]' denoting 'start at numeric key 5 and count upwards'

Basically it all boils down to the inability to specify an associative
key-name for a specific index position - a kind of a reverse 'key()'
function. (Yes indeed that's the second feature request in the same
report;-))

Can't say that I've succeeded in limiting the typing this time, but I
hope you can do something with these suggestions. Thanks and keep up
the excellent work!
Erwin van Dongen





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



#7568 [Com]: 64-bit integers, 32-bit unsigned and 64-bit unsigned

2003-07-17 Thread tomer at parity-bit dot com
 ID:   7568
 Comment by:   tomer at parity-bit dot com
 Reported By:  simon at comsys dot ntu-kpi dot kiev dot ua
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: FreeBSD 4.1-STABLE
 PHP Version:  4.0.3pl1
 New Comment:

Use the bcmath extension if you have it.


Previous Comments:


[2000-11-01 06:44:56] simon at comsys dot ntu-kpi dot kiev dot ua

Is it possible to add support of 64-bit integers (signed and unsigned)
and 32-bit unsigned integers to PHP?

I use MySQL with BIGINT UNSIGNED fields and it's impossible to read
such values from database (I can read them, but can't operate with
them). I can't just convert returned string to integers because size of
integers in PHP is limmited to 32-bit, and last bit is used for sign. I
can write my own functions to work with 64-bit unsigned integers but it
should do PHP itself.

Another problem is 32-bit integers. They always are signed integers and
it is also hard to work with INT UNSDIGNED fields in database.




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



#22592 [Csd->Opn]: Cascading assignments to strings with curly braces broken

2003-07-17 Thread helly
 ID:   22592
 Updated by:   [EMAIL PROTECTED]
 Reported By:  matteo at beccati dot com
-Status:   Closed
+Status:   Open
 Bug Type: Scripting Engine problem
-Operating System: Debian GNU/Linux 3.0
+Operating System: *
-PHP Version:  4.3.2-dev 5CVS-2003-03-11
+PHP Version:  4.3.3-dev
 New Comment:

Reopen since it leaks now


Previous Comments:


[2003-06-17 10:51:26] [EMAIL PROTECTED]

Also fixed in PHP 4.3.3-dev (latest STABLE snapshot..)




[2003-06-16 10:44:19] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Fixed in ZE2. 



[2003-03-10 13:35:45] [EMAIL PROTECTED]

Update version



[2003-03-07 12:13:25] [EMAIL PROTECTED]

Happens also with 4.3.2-dev. (from today)





[2003-03-07 11:40:25] matteo at beccati dot com

When using cascading assignments to strings and curly braces, to change
characters within strings, only the last character is changed to the
right value. Other characters become NUL (0x00).




The resulting output is:

a*c*e*
ace*

a%2Ac%2Ae%2A
a%00c%00e%2A


I also tested it on a old PHP 4.2.0-dev, and it gives the same result.




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



#24640 [Asn->Csd]: var_export and var_dump can't output large float

2003-07-17 Thread helly
 ID:   24640
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gharman at erols dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Variables related
 Operating System: *
-PHP Version:  4.3.3RC2-dev, PHP 5.0.0b2-dev
+PHP Version:  4.3.3RC2-dev
 Assigned To:  helly
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-07-13 21:49:23] [EMAIL PROTECTED]

Marcus, this is again spprintf() that is broken.. :)




[2003-07-13 21:25:33] gharman at erols dot com

Description:

Given $v = 1.7e+300, both var_dump and var_export output 0.E+79.  Echo
and print_r produce expected result.

Reproduce code:
---
';
var_dump($v);
echo "$v";
print_r($v);
?>

Expected result:

1.7E+300
float(1.7E+300)
1.7E+300
1.7E+300

Actual result:
--
0.E+79
float(0.E+79) 
1.7E+300
1.7E+300 





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



#24696 [NEW]: Perfect output in ssh, nothing in http

2003-07-17 Thread peter at good-news dot no
From: peter at good-news dot no
Operating system: Red Hat 9
PHP version:  4.3.1
PHP Bug Type: Unknown/Other Function
Bug description:  Perfect output in ssh, nothing in http

Description:

(Bare with me, this is my first report, and my English is simple!)

I'm working on a multi-game script for querying game-servers.
I've completed a few games that returns perfectly in both http and ssh.
(I'm only using ssh for bug-tracking and testing.)
Then I came to Half-life. In ssh the returned perfectly as expected (see
submitted expected result), but when trying to run the script in http, it
seems to get stuck in an endless loop not outputting anything (it's not
even triggering max execution-time (30 seconds))

I don't know much about compiling nor configuring php (I just got my work
space, I'm not server-admin), but this could be helpful
http://www.good-news.no/info.php

Reproduce code:
---
http://www.good-news.no/peter/game/source.php <- source of my class
http://www.good-news.no/peter/game/index.php <- should return a
goodlookin' array(and does in ssh)

and I call the script with...:
$server = new server('HL', 'some-gameip-here'); // 66.28.14.60:27015
currently used
echo $server->output;

...from another file in the same folder.

A function that returned an error (IN HTTP, NOT SSH) earlier was
get_time() , as it returned that unpack didn't get it's 4 bytes. This
worked fine in ssh at the same time.
Now in http I don't get any errors returned, just a blank
never-stopping-to-load-page. Ssh works fine, which made me suspicious to a
bug.

Expected result:

Array
(
[IP] => 66.28.14.60:27015
[hostname] => [OSF] Fraggin' Friar Tucks [OwP]
[mapname] => de_inferno
[gamedir] => cstrike
[gamedes] => CounterStrike
[maxplayers] => 16
[protocol] => 46
[stype] => Dedicated
[os] => Windows
[password] => No
[numrules] => 76
[numplayers] => 2
[rules] => Array
(
[admin_highlander] => 0
[admin_ignore_immunity] => 0
[admin_mod_version] => 2.50.55-beta (MM)
[admin_quiet] => 2
[allow_client_exec] => 1
[allow_spectators] => 1
[amv_private_server] => 0
[coop] => 0
[deathmatch] => 1
[decalfrequency] => 30
[default_access] => 1
[edgefriction] => 2
[max_queries_sec] => 1
[max_queries_sec_global] => 1
[max_queries_window] => 1
[mp_allowmonsters] => 0
[mp_autokick] => 0
[mp_autoteambalance] => 1
[mp_buytime] => .75
[mp_c4timer] => 35
[mp_chattime] => 10
[mp_consistency] => 1
[mp_fadetoblack] => 0
[mp_flashlight] => 1
[mp_footsteps] => 1
[mp_forcecamera] => 0
[mp_forcechasecam] => 0
[mp_fragsleft] => 0
[mp_freezetime] => 6
[mp_friendlyfire] => 0
[mp_ghostfrequency] => 0.1
[mp_hostagepenalty] => 2
[mp_kickpercent] => 67
[mp_limitteams] => 1
[mp_logdetail] => 0
[mp_logfile] => 1
[mp_logmessages] => 1
[mp_mapvoteratio] => 51
[mp_maxrounds] => 0
[mp_mirrordamage] => 0
[mp_playerid] => 0
[mp_roundtime] => 5
[mp_startmoney] => 800
[mp_timeleft] => 0
[mp_timelimit] => 30
[mp_tkpunish] => 1
[mp_winlimit] => 20
[pausable] => 0
[public_slots_free] => 14
[reserve_slots] => 1
[reserve_type] => 1
[sv_accelerate] => 5
[sv_aim] => 0
[sv_airaccelerate] => 10
[sv_airmove] => 1
[sv_allowupload] => 0
[sv_bounce] => 1
[sv_cheats] => 0
[sv_clienttrace] => 1
[sv_clipmode] => 0
[sv_contact] => [EMAIL PROTECTED]
[sv_friction] => 4
[sv_gravity] => 800
[sv_logblocks] => 0
[sv_maxrate] => 6500
[sv_maxspeed] => 320
[sv_minrate] => 1500
[sv_password] => 0
[sv_proxies] => 0
[sv_restart] => 0
[sv_restartround] => 0
[sv_stepsize] => 18
[sv_stopspeed] => 75
[sv_voiceenable] => 1
[sv_wateraccelerate] => 10
[sv_waterfriction] => 1
)

[teams] => 

PlayerFragsTime Online

[Joe]George_a_Greene509:28:21


[Joe]Merry_Man109:28:21



)


Actual result:
--
nothing... >(

-- 
Edit bug report at http://bugs.php.net/?id=24696&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24696&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24696&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=

#24696 [Opn]: Perfect output in ssh, nothing in http

2003-07-17 Thread peter at good-news dot no
 ID:   24696
 User updated by:  peter at good-news dot no
 Reported By:  peter at good-news dot no
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Red Hat 9
 PHP Version:  4.3.1
 New Comment:

I think the most intersting functions to look at will be:
query() (game == HL part);
get_time();
and possible parse_hl();


Previous Comments:


[2003-07-17 19:03:47] peter at good-news dot no

Description:

(Bare with me, this is my first report, and my English is simple!)

I'm working on a multi-game script for querying game-servers.
I've completed a few games that returns perfectly in both http and
ssh.
(I'm only using ssh for bug-tracking and testing.)
Then I came to Half-life. In ssh the returned perfectly as expected
(see submitted expected result), but when trying to run the script in
http, it seems to get stuck in an endless loop not outputting anything
(it's not even triggering max execution-time (30 seconds))

I don't know much about compiling nor configuring php (I just got my
work space, I'm not server-admin), but this could be helpful
http://www.good-news.no/info.php

Reproduce code:
---
http://www.good-news.no/peter/game/source.php <- source of my class
http://www.good-news.no/peter/game/index.php <- should return a
goodlookin' array(and does in ssh)

and I call the script with...:
$server = new server('HL', 'some-gameip-here'); // 66.28.14.60:27015
currently used
echo $server->output;

...from another file in the same folder.

A function that returned an error (IN HTTP, NOT SSH) earlier was
get_time() , as it returned that unpack didn't get it's 4 bytes. This
worked fine in ssh at the same time.
Now in http I don't get any errors returned, just a blank
never-stopping-to-load-page. Ssh works fine, which made me suspicious
to a bug.

Expected result:

Array
(
[IP] => 66.28.14.60:27015
[hostname] => [OSF] Fraggin' Friar Tucks [OwP]
[mapname] => de_inferno
[gamedir] => cstrike
[gamedes] => CounterStrike
[maxplayers] => 16
[protocol] => 46
[stype] => Dedicated
[os] => Windows
[password] => No
[numrules] => 76
[numplayers] => 2
[rules] => Array
(
[admin_highlander] => 0
[admin_ignore_immunity] => 0
[admin_mod_version] => 2.50.55-beta (MM)
[admin_quiet] => 2
[allow_client_exec] => 1
[allow_spectators] => 1
[amv_private_server] => 0
[coop] => 0
[deathmatch] => 1
[decalfrequency] => 30
[default_access] => 1
[edgefriction] => 2
[max_queries_sec] => 1
[max_queries_sec_global] => 1
[max_queries_window] => 1
[mp_allowmonsters] => 0
[mp_autokick] => 0
[mp_autoteambalance] => 1
[mp_buytime] => .75
[mp_c4timer] => 35
[mp_chattime] => 10
[mp_consistency] => 1
[mp_fadetoblack] => 0
[mp_flashlight] => 1
[mp_footsteps] => 1
[mp_forcecamera] => 0
[mp_forcechasecam] => 0
[mp_fragsleft] => 0
[mp_freezetime] => 6
[mp_friendlyfire] => 0
[mp_ghostfrequency] => 0.1
[mp_hostagepenalty] => 2
[mp_kickpercent] => 67
[mp_limitteams] => 1
[mp_logdetail] => 0
[mp_logfile] => 1
[mp_logmessages] => 1
[mp_mapvoteratio] => 51
[mp_maxrounds] => 0
[mp_mirrordamage] => 0
[mp_playerid] => 0
[mp_roundtime] => 5
[mp_startmoney] => 800
[mp_timeleft] => 0
[mp_timelimit] => 30
[mp_tkpunish] => 1
[mp_winlimit] => 20
[pausable] => 0
[public_slots_free] => 14
[reserve_slots] => 1
[reserve_type] => 1
[sv_accelerate] => 5
[sv_aim] => 0
[sv_airaccelerate] => 10
[sv_airmove] => 1
[sv_allowupload] => 0
[sv_bounce] => 1
[sv_cheats] => 0
[sv_clienttrace] => 1
[sv_clipmode] => 0
[sv_contact] => [EMAIL PROTECTED]
[sv_friction] => 4
[sv_gravity] => 800
[sv_logblocks] => 0
[sv_maxrate] => 6500
[sv_maxspeed] => 320
[sv_minrate] => 1500
[sv_password] => 0
[sv_proxies] => 0
[sv_restart] => 0
[sv_restartround] => 0
[sv_stepsize] => 18
[sv_stopspeed] => 75
[sv_voiceenable] => 1
[sv_wateraccelerate] => 10
[sv_waterfriction] => 1
)

[teams] => 

PlayerFragsTime Online

[Joe]George_a_Greene509:28:21


[Joe]Merry_Man109:28:21



)


Actual 

#24697 [NEW]: odbc can not return accurate result when we handle excel file use odbc

2003-07-17 Thread tty3000 at hotmail dot com
From: tty3000 at hotmail dot com
Operating system: win 2000
PHP version:  4.3.2
PHP Bug Type: ODBC related
Bug description:  odbc can not return accurate result when we handle excel file use 
odbc 

Description:

odbc can not return accurate result when we handle excel file use odbc.
In excel file,we handle "NUMBER" nor "VARCHAR" ,this question appear.
  we find ,this question appear when "0878-13420987" or "0878_13420987".

Reproduce code:
---
$user = '';
$pass = '';
$host = 'customerxls';
$phptype='odbc';
//database name in excel
file£º[main],[con_data],[con_person],[detail_data]
$dsn = "$phptype://$user:[EMAIL PROTECTED]";
$type=main;
[EMAIL PROTECTED]($host,"","");
$query="select a,b,d from $type";

[EMAIL PROTECTED]($connection,$query);



$query_count="select count(*) from $type";  

echo "".$query."";



$col=count($title_array);
for($i=0;$i<$col;$i++)
echo $title_array[$i]."\t";
echo ""; 

while (@odbc_fetch_row($result)){  
echo
odbc_result($result,a)."<>".odbc_result($result,b)."<>".odbc_result($result,y)."";
//echo $row[0]."";

}

 


Expected result:

1.0<>China<>3395
2.0<>China<>13308
2.0<>China<>


Actual result:
--
1.0<>China<>3395
2.0<>China<>13308
3.0<>China<>


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



#24689 [Opn->Csd]: mysql_connect() doesn't set mysql_error() to false on valid connect

2003-07-17 Thread sniper
 ID:   24689
 Updated by:   [EMAIL PROTECTED]
 Reported By:  moa_hunter at yahoo dot com
-Status:   Open
+Status:   Closed
 Bug Type: MySQL related
 Operating System: Linux from source, 2.4.21
 PHP Version:  4.3.2
 New Comment:

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

Seems to be fixed in CVS.



Previous Comments:


[2003-07-17 06:16:18] moa_hunter at yahoo dot com

By the way, it's the code under //die with error
that is executed, not that the script is dying after the mysql_query
line.
Proven by changing the line 
die(mysql_error()); 
to 
die("Connection error : ".mysql_error());



[2003-07-17 06:08:14] moa_hunter at yahoo dot com

Description:

If an error is created by a mysql query, then you try to open a new
database connection, then call mysql_error(), mysql_error() returns the
error from the failed query, not false because the connection was
valid.

Having searched through the bug reports, esp 2051, 10291, and 22651, it
seems like mysql_error() should be false from version 4.0.6 onwards.

Reproduce code:
---
$connect_id = mysql_connect("localhost","auser","pass");
mysql_select_db("main_student_data");
$query = "INSERT INTO  VALUES('0012', 'Mike's place', 'false')";
mysql_query($query);
if(mysql_error())
{
  $con_id_2 = mysql_connect("localhost", "someuser", "apass");
  if(mysql_error())
  {
//abort with error
die(mysql_error());
  } else
  {
//code to write error to database
//...
  }
}

//I know one should check if mysql_connect returns false
//rather than if mysql_error() exists, but this is to show
// what happens.


Expected result:

For the code under write error to database to be run, because
mysql_error() should be false if the second connection is made.

Actual result:
--
The script dies with error: 

You have an error in your SQL syntax near 's place', 'false' at line 1





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



#24695 [Opn->Fbk]: SEGV in zend_hash_find - possible memory corruption?

2003-07-17 Thread sniper
 ID:   24695
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jna at retina dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Redhat Linux 7.2
 PHP Version:  5CVS-2003-07-17 (dev)
 New Comment:

> We are actually running on php4-STABLE-200307160330.

Then why the hell did you put "5CVS..." in Version ??!



Previous Comments:


[2003-07-17 15:59:39] jna at retina dot net

Description:

We are actually running on php4-STABLE-200307160330.
uname -a:

[EMAIL PROTECTED] http-debug]# uname -a
Linux shibboleth.unspunrecords.com 2.4.2-ac20 #3 Wed 
Mar 21 07:23:43 PST 2001 i686 unknown

zend_hash_find causes a segmentation fault at random 
intervals in a running site, after long uptimes (and 
sometimes immediately on startup)

It appears that the hashtable (ht) holds a corrupt 
pointer and this is what is causing the crash. I have a 
core dump and binary available to anyone who wants to 
look at it.

In every frame of the backtrace, I can't view hashtable 
(and I assume I should be able to, right?)

Also, I realize that I am filing a bug on dev code -- 
We have had a similar issue (random core dumps after 
long uptimes) in nearly every version of PHP up to now, 
and this is the first time I was able to capture a core 
dump because we run our server in a chroot which was 
making it quite hard to capture this error properly.

Reproduce code:
---
I believe this is caused during an auto-increment operation as part of
a hashtable lookup:

in top.php (called from index.php):



Considering that this lookup is the first lookup done by any code on
this request, it seems almost certain that the hashtable is being
clobbered.

Expected result:

$browse_type should be set with the contents of 
$HTTP_GET_VARS["browse_type"]

Actual result:
--
(gdb) frame 0
(gdb) print ht 
$25 = (HashTable *) 0x6574693f
(gdb) print *ht
Cannot access memory at address 0x6574693f

and...

(gdb) backtrace
#0  0x809aed9 in zend_hash_find (ht=0x825660c, 
arKey=0x8287a6c "browse_type", 
nKeyLength=12, pData=0xbfffba1c)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_hash.c:880
#1  0x809fcc8 in zend_fetch_dimension_address 
(result=0x829a5bc, 
op1=0x829a5cc, op2=0x829a5dc, Ts=0xbfffbb18, 
type=0)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:633
#2  0x80a342e in execute (op_array=0x8284424)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:1283
#3  0x80ab680 in execute (op_array=0x8254274)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:2177
#4  0x8096ffe in zend_execute_scripts (type=8, 
retval=0x0, file_count=3)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend.c:886
#5  0x8079ff6 in php_execute_script 
(primary_file=0xb5d8)
at /unspun/src/php4-STABLE-200307160330/main/
main.c:1685
#6  0x80ad6b6 in apache_php_module_main (r=0x824dbbc, 
display_source_mode=0)
at /unspun/src/php4-STABLE-200307160330/sapi/
apache/sapi_apache.c:54
#7  0x807359c in send_php ()
#8  0x80735f9 in send_parsed_php ()
#9  0x813600b in ap_invoke_handler ()
#10 0x814b0ab in process_request_internal ()
#11 0x814b4e3 in ap_internal_redirect ()
#12 0x806c548 in handle_dir ()
#13 0x813600b in ap_invoke_handler ()
---Type  to continue, or q  to quit--- 
#14 0x814b0ab in process_request_internal ()
#15 0x814b10c in ap_process_request ()
#16 0x8142021 in child_main ()
#17 0x81422b3 in make_child ()
#18 0x8142364 in startup_children ()
#19 0x81429dc in standalone_main ()
#20 0x814325b in main ()
#21 0x400c0b5c in __libc_start_main (main=0x8142e98 
, argc=1, 
ubp_av=0xbaec, init=0x8066840 <_init>, 
fini=0x81735bc <_fini>, 
rtld_fini=0x4000d634 <_dl_fini>, 
stack_end=0xbae4)
at ../sysdeps/generic/libc-start.c:129





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



#24695 [Fbk]: SEGV in zend_hash_find - possible memory corruption?

2003-07-17 Thread sniper
 ID:   24695
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jna at retina dot net
 Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Redhat Linux 7.2
 PHP Version:  5CVS-2003-07-17 (dev)
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:


[2003-07-17 21:21:01] [EMAIL PROTECTED]

> We are actually running on php4-STABLE-200307160330.

Then why the hell did you put "5CVS..." in Version ??!




[2003-07-17 15:59:39] jna at retina dot net

Description:

We are actually running on php4-STABLE-200307160330.
uname -a:

[EMAIL PROTECTED] http-debug]# uname -a
Linux shibboleth.unspunrecords.com 2.4.2-ac20 #3 Wed 
Mar 21 07:23:43 PST 2001 i686 unknown

zend_hash_find causes a segmentation fault at random 
intervals in a running site, after long uptimes (and 
sometimes immediately on startup)

It appears that the hashtable (ht) holds a corrupt 
pointer and this is what is causing the crash. I have a 
core dump and binary available to anyone who wants to 
look at it.

In every frame of the backtrace, I can't view hashtable 
(and I assume I should be able to, right?)

Also, I realize that I am filing a bug on dev code -- 
We have had a similar issue (random core dumps after 
long uptimes) in nearly every version of PHP up to now, 
and this is the first time I was able to capture a core 
dump because we run our server in a chroot which was 
making it quite hard to capture this error properly.

Reproduce code:
---
I believe this is caused during an auto-increment operation as part of
a hashtable lookup:

in top.php (called from index.php):



Considering that this lookup is the first lookup done by any code on
this request, it seems almost certain that the hashtable is being
clobbered.

Expected result:

$browse_type should be set with the contents of 
$HTTP_GET_VARS["browse_type"]

Actual result:
--
(gdb) frame 0
(gdb) print ht 
$25 = (HashTable *) 0x6574693f
(gdb) print *ht
Cannot access memory at address 0x6574693f

and...

(gdb) backtrace
#0  0x809aed9 in zend_hash_find (ht=0x825660c, 
arKey=0x8287a6c "browse_type", 
nKeyLength=12, pData=0xbfffba1c)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_hash.c:880
#1  0x809fcc8 in zend_fetch_dimension_address 
(result=0x829a5bc, 
op1=0x829a5cc, op2=0x829a5dc, Ts=0xbfffbb18, 
type=0)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:633
#2  0x80a342e in execute (op_array=0x8284424)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:1283
#3  0x80ab680 in execute (op_array=0x8254274)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend_execute.c:2177
#4  0x8096ffe in zend_execute_scripts (type=8, 
retval=0x0, file_count=3)
at /unspun/src/php4-STABLE-200307160330/Zend/
zend.c:886
#5  0x8079ff6 in php_execute_script 
(primary_file=0xb5d8)
at /unspun/src/php4-STABLE-200307160330/main/
main.c:1685
#6  0x80ad6b6 in apache_php_module_main (r=0x824dbbc, 
display_source_mode=0)
at /unspun/src/php4-STABLE-200307160330/sapi/
apache/sapi_apache.c:54
#7  0x807359c in send_php ()
#8  0x80735f9 in send_parsed_php ()
#9  0x813600b in ap_invoke_handler ()
#10 0x814b0ab in process_request_internal ()
#11 0x814b4e3 in ap_internal_redirect ()
#12 0x806c548 in handle_dir ()
#13 0x813600b in ap_invoke_handler ()
---Type  to continue, or q  to quit--- 
#14 0x814b0ab in process_request_internal ()
#15 0x814b10c in ap_process_request ()
#16 0x8142021 in child_main ()
#17 0x81422b3 in make_child ()
#18 0x8142364 in startup_children ()
#19 0x81429dc in standalone_main ()
#20 0x814325b in main ()
#21 0x400c0b5c in __libc_start_main (main=0x8142e98 
, argc=1, 
ubp_av=0xbaec, init=0x8066840 <_init>, 
fini=0x81735bc <_fini>, 
rtld_fini=0x4000d634 <_dl_fini>, 
stack_end=0xbae4)
at ../sysdeps/generic/libc-start.c:129





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



#24696 [Opn->Bgs]: Perfect output in ssh, nothing in http

2003-07-17 Thread sniper
 ID:   24696
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peter at good-news dot no
-Status:   Open
+Status:   Bogus
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
 Operating System: Red Hat 9
 PHP Version:  4.3.1
 New Comment:

Please go ask support questions elsewhere, no bug here.
(or come up with a report someone actually wants to read through..with
a SHORT example what isn't working, etc.)



Previous Comments:


[2003-07-17 19:13:33] peter at good-news dot no

I think the most intersting functions to look at will be:
query() (game == HL part);
get_time();
and possible parse_hl();



[2003-07-17 19:03:47] peter at good-news dot no

Description:

(Bare with me, this is my first report, and my English is simple!)

I'm working on a multi-game script for querying game-servers.
I've completed a few games that returns perfectly in both http and
ssh.
(I'm only using ssh for bug-tracking and testing.)
Then I came to Half-life. In ssh the returned perfectly as expected
(see submitted expected result), but when trying to run the script in
http, it seems to get stuck in an endless loop not outputting anything
(it's not even triggering max execution-time (30 seconds))

I don't know much about compiling nor configuring php (I just got my
work space, I'm not server-admin), but this could be helpful
http://www.good-news.no/info.php

Reproduce code:
---
http://www.good-news.no/peter/game/source.php <- source of my class
http://www.good-news.no/peter/game/index.php <- should return a
goodlookin' array(and does in ssh)

and I call the script with...:
$server = new server('HL', 'some-gameip-here'); // 66.28.14.60:27015
currently used
echo $server->output;

...from another file in the same folder.

A function that returned an error (IN HTTP, NOT SSH) earlier was
get_time() , as it returned that unpack didn't get it's 4 bytes. This
worked fine in ssh at the same time.
Now in http I don't get any errors returned, just a blank
never-stopping-to-load-page. Ssh works fine, which made me suspicious
to a bug.

Expected result:

Array
(
[IP] => 66.28.14.60:27015
[hostname] => [OSF] Fraggin' Friar Tucks [OwP]
[mapname] => de_inferno
[gamedir] => cstrike
[gamedes] => CounterStrike
[maxplayers] => 16
[protocol] => 46
[stype] => Dedicated
[os] => Windows
[password] => No
[numrules] => 76
[numplayers] => 2
[rules] => Array
(
[admin_highlander] => 0
[admin_ignore_immunity] => 0
[admin_mod_version] => 2.50.55-beta (MM)
[admin_quiet] => 2
[allow_client_exec] => 1
[allow_spectators] => 1
[amv_private_server] => 0
[coop] => 0
[deathmatch] => 1
[decalfrequency] => 30
[default_access] => 1
[edgefriction] => 2
[max_queries_sec] => 1
[max_queries_sec_global] => 1
[max_queries_window] => 1
[mp_allowmonsters] => 0
[mp_autokick] => 0
[mp_autoteambalance] => 1
[mp_buytime] => .75
[mp_c4timer] => 35
[mp_chattime] => 10
[mp_consistency] => 1
[mp_fadetoblack] => 0
[mp_flashlight] => 1
[mp_footsteps] => 1
[mp_forcecamera] => 0
[mp_forcechasecam] => 0
[mp_fragsleft] => 0
[mp_freezetime] => 6
[mp_friendlyfire] => 0
[mp_ghostfrequency] => 0.1
[mp_hostagepenalty] => 2
[mp_kickpercent] => 67
[mp_limitteams] => 1
[mp_logdetail] => 0
[mp_logfile] => 1
[mp_logmessages] => 1
[mp_mapvoteratio] => 51
[mp_maxrounds] => 0
[mp_mirrordamage] => 0
[mp_playerid] => 0
[mp_roundtime] => 5
[mp_startmoney] => 800
[mp_timeleft] => 0
[mp_timelimit] => 30
[mp_tkpunish] => 1
[mp_winlimit] => 20
[pausable] => 0
[public_slots_free] => 14
[reserve_slots] => 1
[reserve_type] => 1
[sv_accelerate] => 5
[sv_aim] => 0
[sv_airaccelerate] => 10
[sv_airmove] => 1
[sv_allowupload] => 0
[sv_bounce] => 1
[sv_cheats] => 0
[sv_clienttrace] => 1
[sv_clipmode] => 0
[sv_contact] => [EMAIL PROTECTED]
[sv_friction] => 4
[sv_gravity] => 800
[sv_logblocks] => 0
[sv_maxrate] => 6500
[sv_maxspeed] => 320
[sv_minrate] => 1500
[sv_password] => 0
[sv_proxies] => 0
[sv

#24693 [Opn->Bgs]: session.use_trans_sid should changeable by scripts

2003-07-17 Thread sniper
 ID:   24693
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chris_se at gmx dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: GNU/Linux
 PHP Version:  4.3.2
 New Comment:

Not possible.



Previous Comments:


[2003-07-17 12:57:04] chris_se at gmx dot net

Description:

According to http://de3.php.net/manual/de/function.ini-set.php you may
not alter session.use_trans_sid in PHP scripts, because it is only
changeable in PHP_INI_SYSTEM|PHP_INI_PERDIR.

I do not know why this is so, but in my eyes it should at least be
possible to deactivate this option at runtime.

Reproduce code:
---

Test


Expected result:

In an environment with 'session.use_trans_sid' activated in the php.ini
file or in a .htaccess file, it should *not* append the session id to
the link:

Test

Actual result:
--
The session id is appended to the link and not even an error or notice
ist produced:

Test





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



#24177 [Opn->Fbk]: header() call doesn't replace 404 status code

2003-07-17 Thread sniper
 ID:   24177
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  4.3.2
 New Comment:

Ok. Set back to "Open" when you get that testcase done.




Previous Comments:


[2003-07-17 10:10:56] [EMAIL PROTECTED]

I've just tried out php4-STABLE-200307171330 and the problem is still
present.

I'll write a small testcase during the weekend so that you can easily
verify the bug.

Regards,
Fredrik



[2003-07-10 23:48:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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


Can you do a favor and test the latest CVS? 
I have no time to setup a mirror just to test this.. :)




[2003-06-15 10:20:54] [EMAIL PROTECTED]

Yes. Odd at first.

After some experimentation I figured it out.

do-download.inc calls flush() on line 31. This causes the 'original'
status to be sent instead of the one specified by the call to
header().

If 4096 bytes or more are written before the flush the correct status
is sent.

I guess the codepath that handles an expicit flush manages to loose the
new status code somewhere.

I replaced echo " " with echo str_repeat(' ', 4096) and now our mirror
works fine and dandy again.



[2003-06-13 15:19:17] [EMAIL PROTECTED]

# lynx -dump -head http://se.php.net/imap
HTTP/1.1 200 OK
Date: Fri, 13 Jun 2003 19:17:17 GMT
Server: Apache/2.0.46 (Unix) mod_ssl/2.0.46 OpenSSL/0.9.6b PHP/4.3.2
X-Powered-By: PHP/4.3.2
Content-language: en
Set-Cookie: COUNTRY=FIN%2C213.243.181.8; expires=Fri, 20-Jun-2003
19:17:17 GMT;
 path=/; domain=.php.net
Status: 200 OK
Last-Modified: Fri, 13 Jun 2003 19:09:38 GMT
Vary: Cookie
Connection: close
Content-Type: text/html;charset=ISO-8859-1

That works just fine?




[2003-06-13 13:42:09] [EMAIL PROTECTED]

Description:

Using Apache 2.0.46 and PHP 4.3.2 compiled with --with-apxs2

When a PHP page is used as an ErrorDocument page, calling any variation
of header() to replace the status code doesn't work. The client always
receive 404.

For example, try downloading from se.php.net:
http://se.php.net/get/php-4.3.2.tar.gz/from/this/mirror

You'll se that a Location header has been added (by the call to
header() in /include/do-download.inc) but the status returned is still
404, not 302 as expected.






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



#5303 [Com]: the ISAPI Filter is not loaded for vesion 4.01 !

2003-07-17 Thread felix_au at hotmail dot com
 ID:   5303
 Comment by:   felix_au at hotmail dot com
 Reported By:  mbaroz at RAFAEL dot CO dot IL
 Status:   Closed
 Bug Type: Installation problem
 Operating System: windows NT
 PHP Version:  4.0.1
 New Comment:

I added the php isapi filter on the IIS 6.0, in the WinXp professional
version.  once added the filter is indicated as not loaded and no
priority.  I tried everything, almost all the comments and suggestion
on the internet I've tried, still nothing happend.  I changed the
folder, placed the dll almost in every folder.  Change the rights of
the folder.  Could there be something wrong with the isapi?


Previous Comments:


[2000-08-20 02:42:07] [EMAIL PROTECTED]

No feedback from user.

--Jani



[2000-07-27 19:59:42] [EMAIL PROTECTED]

Please verify that it´s still happening using the latest version of PHP
(release 4.0.1pl2 or CVS).



[2000-07-01 11:45:35] mbaroz at RAFAEL dot CO dot IL

while installing the php 4.01 under windows nt 4.0 platform on an IIS
Server version 4 the ISAPI filter (php4isapi.dll) is failed to load
after starting the IIS Server service.
 
while after replacig that file with the 4.0(previos) version everything
is ok.






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



#24690 [Opn->Fbk]: Image-bug in PHP

2003-07-17 Thread sniper
 ID:   24690
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peteralien2003 at yahoo dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Unknown/Other Function
+Bug Type: GD related
 Operating System: Win XP Pro
 PHP Version:  4.3.2
 New Comment:

Please try using this CVS snapshot:

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

Can not reproduce. There might be errors during the
script execution but you won't see them if you output
the image on browser. Try this script:





Previous Comments:


[2003-07-17 06:15:46] peteralien2003 at yahoo dot com

Description:

I have:

Win XP Pro
IIS 5.1
PHP 4.3.2
GD 2.0.12

Reproduce code:
---


Expected result:

It was supposed to appear an image with the IP of the machine in the
browser.

Actual result:
--
Sometimes appears an image but other times it just appears the
placehold of it, even when i refresh the browser.





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



#24698 [NEW]: isapi filter would not load

2003-07-17 Thread felix_au at hotmail dot com
From: felix_au at hotmail dot com
Operating system: WinXP
PHP version:  5.0.0b1 (beta1)
PHP Bug Type: IIS related
Bug description:  isapi filter would not load

Description:

Once I added the isapi filter of php, IIS indicates that it in not loaded.
 I checked the folder security, it was ok, it allows anonymous.  I checked
the path it was correct.  I already added in the mappings the .php, and
supplied the path.

I ran the phpinfo page it would not load, it say " HTTP 500 Internal
Server Error"


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



#24698 [Opn->Fbk]: isapi filter would not load

2003-07-17 Thread sniper
 ID:   24698
 Updated by:   [EMAIL PROTECTED]
 Reported By:  felix_au at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: WinXP
 PHP Version:  5.0.0b1 (beta1)
 New Comment:

Is this specific to PHP 5 or does this happen with PHP 4.3.2?



Previous Comments:


[2003-07-17 22:05:12] felix_au at hotmail dot com

Description:

Once I added the isapi filter of php, IIS indicates that it in not
loaded.  I checked the folder security, it was ok, it allows anonymous.
 I checked the path it was correct.  I already added in the mappings
the .php, and supplied the path.

I ran the phpinfo page it would not load, it say " HTTP 500 Internal
Server Error"






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



#24697 [Opn->Fbk]: odbc can not return accurate result when we handle excel file use odbc

2003-07-17 Thread kalowsky
 ID:   24697
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tty3000 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: win 2000
 PHP Version:  4.3.2
 New Comment:

I'm not quite sure I follow the bug you're reporting here.  Can you
(with another ODBC application) get the results you're expecting?  I
don't see how a query like that can fail as it's upto the logic of the
backing DB and not PHP to return the result set.


Previous Comments:


[2003-07-17 20:50:59] tty3000 at hotmail dot com

Description:

odbc can not return accurate result when we handle excel file use
odbc.
In excel file,we handle "NUMBER" nor "VARCHAR" ,this question appear.
  we find ,this question appear when "0878-13420987" or
"0878_13420987".

Reproduce code:
---
$user = '';
$pass = '';
$host = 'customerxls';
$phptype='odbc';
//database name in excel
file£º[main],[con_data],[con_person],[detail_data]
$dsn = "$phptype://$user:[EMAIL PROTECTED]";
$type=main;
[EMAIL PROTECTED]($host,"","");
$query="select a,b,d from $type";

[EMAIL PROTECTED]($connection,$query);



$query_count="select count(*) from $type";  

echo "".$query."";



$col=count($title_array);
for($i=0;$i<$col;$i++)
echo $title_array[$i]."\t";
echo ""; 

while (@odbc_fetch_row($result)){  
echo
odbc_result($result,a)."<>".odbc_result($result,b)."<>".odbc_result($result,y)."";
//echo $row[0]."";

}

 


Expected result:

1.0<>China<>3395
2.0<>China<>13308
2.0<>China<>


Actual result:
--
1.0<>China<>3395
2.0<>China<>13308
3.0<>China<>






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



#24664 [Opn->Fbk]: relocation error: symbol not found: ap_pass_brigade

2003-07-17 Thread sniper
 ID:   24664
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot polli at mir dot it
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: OpenUnix 8
 PHP Version:  4.3.3RC2-dev
 New Comment:

What does this output:

# nm -g httpd |grep pass_brig

(for Apache2, of course :)



Previous Comments:


[2003-07-16 07:38:33] a dot polli at mir dot it

I try with apache 1.3.27 and it works (I can see a phpinfo page ...)
yes, I think it's a Apache2 related problem



[2003-07-16 04:05:28] [EMAIL PROTECTED]

Have you tried Apache 1.3.27 which might actually work?




[2003-07-16 03:15:30] a dot polli at mir dot it

I try it (php4-STABLE-200307160530),
but I have the same error when I start apache2.



[2003-07-15 13:27:51] [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



[2003-07-15 08:30:10] a dot polli at mir dot it

Description:

I have this error when I start apache2 (2.0.46) with php4 (4.3.2)

Syntax error on line 233 of /mypath/apache2/conf/httpd.conf:
Cannot load /mypath/apache2/modules/libphp4.so into server: dynamic
linker:
/mypath/apache2/bin/httpd: relocation error: symbol not found:
ap_pass_brigade; referenced from: /mypath/apache2/modules/libphp4.so


I compile apache 2.0.46 with

./configure --prefix=/mypath/apache2 
--enable-modules="ssl dav mime-magic
auth-anon auth-dbm auth-digest cern-meta expires headers usertrack
unique-id
proxy info cgi vhost-alias rewrite so speling"

and then php 4.3.2 with

./configure  --with-apxs2=/mypath/apache2/bin/apxs 
--with-pgsql=/mypath/pgsql 
--with-mysql=/mypath/mysql 
--with-zlib 
--with-gd 
--with-ftp 
--with-xml







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



#24652 [Fbk->Asn]: array keys that are strings but numeric behave incorrectly

2003-07-17 Thread sniper
 ID:   24652
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tater at potatoe dot com
-Status:   Feedback
+Status:   Assigned
 Bug Type: Zend Engine 2 problem
-Operating System: OS X 10.2
+Operating System: *
 PHP Version:  5CVS-2003-07-14 (dev)
-Assigned To:  
+Assigned To:  sterling
 New Comment:

The OS is irrelevant.
This simple script shows that there indeed is a bug:

 0);
  var_dump($f);
  var_dump(array_key_exists(7, $f));
  var_dump(array_key_exists('7', $f));

  /* This doesn't */
  $f = array_flip(array('7'));
  var_dump($f);
  var_dump(array_key_exists(7, $f));
  var_dump(array_key_exists('7', $f));
?>

Result with PHP 4.3.3RC2-dev:
-
array(1) {
  [7]=>
  int(0)
}
bool(true)
bool(true)
array(1) {
  [7]=>
  int(0)
}
bool(true)
bool(true)

Result with PHP 5.0.0b2-dev:
-
array(1) {
  [7]=>
  int(0)
}
bool(true)
bool(true)
array(1) {
  ["7"]=>
  int(0)
}
bool(false)
bool(false)

Assigning to Sterling who broke it. :)



Previous Comments:


[2003-07-15 21:13:26] Nico dot Laus dot 2001 at gmx dot de

sorry, I forgot to mention:

I am working with WinXP SP1, newest CVS of PHP5 (this time: 2003-07-15
14:30)



[2003-07-15 18:02:57] [EMAIL PROTECTED]

Nico is your problem as well on OSX or another platform?



[2003-07-15 12:31:54] Nico dot Laus dot 2001 at gmx dot de

I have the same problem, but a simplier Code to see, what is wrong:

print "";
if (isset($_POST['test'])) {
var_dump($_POST['test']);
print ($_POST['test'][1]);
print ($_POST['test']['1']);
print ($_POST['test'][(string)1]);
}

though this index should be numeric, it isn't and even with trying to
access it by string doesn't work!
-> I can't access this value of the array!



[2003-07-14 16:53:10] tater at potatoe dot com

Description:

This is really bug #23935, but that's marked 'Closed' and I am still
seeing the problem in the current PHP5 code. It's beyond array_flip(),
too, strictly. I first saw this in $_POST with a field named
"myfield[1]" - this comes through as $_POST["myfield"]["1"]. Same with
array_combine() using array("1") as the key array.

Reproduce code:
---
submit a form with hidden field named 'myfield[1]':




test ", $tick++, ":\n";
var_dump($a, array_key_exists(key($a), $a), empty($a[1]),
empty($a['1']));
}
testit(array("1"=>"1"));
testit(array_flip(array(1=>"1")));
testit(array_combine(array('1'),array('1')));
if (!empty($_POST['myfield'])) { testit($_POST['myfield']); }
?>

Expected result:

Output for test 2 on PHP 4.3.3RC1 (cli) (built: Jun 20 2003 23:09:34)
(DEBUG):

array(1) {
  [1]=>
  int(1)
}
bool(true)
bool(false)
bool(false)

Actual result:
--
Output for test 2 on PHP 5.0.0b2-dev (cli) (built: Jul 14 2003
14:14:54) (DEBUG):

array(1) {
  ["1"]=>
  int(1)
}
bool(false)
bool(true)
bool(true)





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



#24699 [NEW]: Memory Leak with per-class constants

2003-07-17 Thread fujimura at wakhok dot ac dot jp
From: fujimura at wakhok dot ac dot jp
Operating system: Linux kernel-2.4.21
PHP version:  5CVS-2003-07-17 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  Memory Leak with per-class constants

Description:

The per-class constant causes memory leaks used with builtin constants.

configure line:
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--disable-short-tags \
--enable-versioning \
--enable-bcmath \
--enable-dio \
--enable-mbstring \
--enable-mbregex \
--enable-wddx \
--enable-dom \
--with-iconv \
--with-xsl \
--with-openssl \
--with-zlib \
--with-bz2 \
--enable-debug


Reproduce code:
---
[EMAIL PROTECTED] php-src]$ php -r 'class TEST { const FOO = SEEK_CUR; }'
/home/user/php-src/Zend/zend_language_scanner.l() :  Freeing
0x40435334 (9 bytes), script=-
/home/user/php-src/Zend/zend_compile.c(2405) :  Freeing 0x404352F0 (16
bytes), script=-



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



#24681 [Opn]: windows xp and php-module with apache2

2003-07-17 Thread sniper
 ID:   24681
 Updated by:   [EMAIL PROTECTED]
 Reported By:  harry at rhsoft dot net
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  4.3.3RC2-dev
 New Comment:

Try with Apache 1.3.27 which is much more stable than Apache2..



Previous Comments:


[2003-07-17 10:16:27] harry at rhsoft dot net

PHP Version 4.3.3RC2-dev

I have installed this version but the problem still exists

the browser shows the title of the error-page but then the connection
will hang



[2003-07-16 21:08:04] [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





[2003-07-16 11:01:57] harry at rhsoft dot net

Description:

On Windows XP with Apache (Apache/2.0.47 (Win32) PHP/4.3.2 - PHP 4.3.2
APACHE2HANDLER) when a page will not be found the server doesnt close
the connection and dont show the error page

so the browser will hang and must be closed or the server restartet

this problem is only with php-module
with the cgi it will work but i cant use it because there is no
authentication with php

This error also happens when a css-file ore something else will not be
found from a page what is parsed with php

on urls that not will be parsed with php the error-page from apache
will be loaded and the connection closed so it must be a bug in php
itself














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



#24658 [Ver]: class hints with array_walk() causing crash

2003-07-17 Thread sniper
 ID:   24658
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eric at cosky dot com
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: irrelevant
 PHP Version:  5CVS-20030718
 New Comment:

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (runnable)]
0x817b4fc in zend_assign_to_variable_reference (result=0x4029dee0,
variable_ptr_ptr=0x4029a940, 
value_ptr_ptr=0x4028f9d8, Ts=0x0) at
/usr/src/web/php/php5/Zend/zend_execute.c:238
238 T(result->u.var).var.ptr_ptr =
variable_ptr_ptr;
(gdb) bt
#0  0x817b4fc in zend_assign_to_variable_reference (result=0x4029dee0,
variable_ptr_ptr=0x4029a940, 
value_ptr_ptr=0x4028f9d8, Ts=0x0) at
/usr/src/web/php/php5/Zend/zend_execute.c:238
#1  0x8197be9 in zend_recv_handler (execute_data=0xbfffccec,
op_array=0x8244858)
at /usr/src/web/php/php5/Zend/zend_execute.c:2988
#2  0x817e77e in execute (op_array=0x8244858) at
/usr/src/web/php/php5/Zend/zend_execute.c:1194
#3  0x815c0f1 in fast_call_user_function (function_table=0x81e9c78,
object_pp=0x0, function_name=0x4029cec4, 
retval_ptr_ptr=0xbfffce44, param_count=3, params=0xbfffce5c,
no_separation=0, symbol_table=0x0, 
function_pointer=0x81e516c) at
/usr/src/web/php/php5/Zend/zend_execute_API.c:693
#4  0x80cc434 in php_array_walk (target_hash=0x4029cd1c,
userdata=0x4028f9cc, recursive=0)
at /usr/src/web/php/php5/ext/standard/array.c:990
#5  0x80cc5ff in zif_array_walk (ht=3, return_value=0x4029cf24,
this_ptr=0x0, return_value_used=0)
at /usr/src/web/php/php5/ext/standard/array.c:1045
#6  0x8195cdf in zend_do_fcall_common_helper (execute_data=0xbfffd03c,
op_array=0x4029dc84)
at /usr/src/web/php/php5/Zend/zend_execute.c:2634
#7  0x8196384 in zend_do_fcall_handler (execute_data=0xbfffd03c,
op_array=0x4029dc84)
at /usr/src/web/php/php5/Zend/zend_execute.c:2763
#8  0x817e77e in execute (op_array=0x4029dc84) at
/usr/src/web/php/php5/Zend/zend_execute.c:1194
#9  0x8195dd1 in zend_do_fcall_common_helper (execute_data=0xbfffd28c,
op_array=0x4029a8b4)
at /usr/src/web/php/php5/Zend/zend_execute.c:2661
#10 0x8196128 in zend_do_fcall_by_name_handler
(execute_data=0xbfffd28c, op_array=0x4029a8b4)
at /usr/src/web/php/php5/Zend/zend_execute.c:2732
#11 0x817e77e in execute (op_array=0x4029a8b4) at
/usr/src/web/php/php5/Zend/zend_execute.c:1194
#12 0x816589f in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1017
#13 0x8133255 in php_execute_script (primary_file=0xb628) at
/usr/src/web/php/php5/main/main.c:1695
#14 0x81a1614 in main (argc=2, argv=0xb694) at
/usr/src/web/php/php5/sapi/cli/php_cli.c:910
#15 0x401b19cb in __libc_start_main (main=0x81a099c , argc=2,
argv=0xb694, init=0x806a744 <_init>, 
fini=0x81a1fe4 <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xb68c)
at ../sysdeps/generic/libc-start.c:92



Previous Comments:


[2003-07-15 01:09:40] eric at cosky dot com

Description:

The following code crashes my install of PHP from July 13, 2003.
Removing the class hint in BoomWalker eliminates the crash.

Reproduce code:
---
class SomeClass {}
class CrashClass {
function Boom()
{
$a = array( 0,1,2 );
array_walk(&$a, "BoomWalker", &$this);
}
}
function BoomWalker(SomeClass &$arrayItem, &$key, &$crashObj) {}
$c = new CrashClass;
$c->Boom();


Expected result:

Nothing.

Actual result:
--
System alert for PHP crashing.





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



#24689 [Csd->WFx]: mysql_connect() doesn't set mysql_error() to false on valid connect

2003-07-17 Thread georg
 ID:   24689
 Updated by:   [EMAIL PROTECTED]
 Reported By:  moa_hunter at yahoo dot com
-Status:   Closed
+Status:   Wont fix
 Bug Type: MySQL related
 Operating System: Linux from source, 2.4.21
 PHP Version:  4.3.2
 New Comment:

mysql_error uses the default connection and reports the error from 1st
connection. Currently there is no way to detect error from 2nd
connection.

This will be fixed in PHP5.


Previous Comments:


[2003-07-17 21:07:33] [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

Seems to be fixed in CVS.




[2003-07-17 06:16:18] moa_hunter at yahoo dot com

By the way, it's the code under //die with error
that is executed, not that the script is dying after the mysql_query
line.
Proven by changing the line 
die(mysql_error()); 
to 
die("Connection error : ".mysql_error());



[2003-07-17 06:08:14] moa_hunter at yahoo dot com

Description:

If an error is created by a mysql query, then you try to open a new
database connection, then call mysql_error(), mysql_error() returns the
error from the failed query, not false because the connection was
valid.

Having searched through the bug reports, esp 2051, 10291, and 22651, it
seems like mysql_error() should be false from version 4.0.6 onwards.

Reproduce code:
---
$connect_id = mysql_connect("localhost","auser","pass");
mysql_select_db("main_student_data");
$query = "INSERT INTO  VALUES('0012', 'Mike's place', 'false')";
mysql_query($query);
if(mysql_error())
{
  $con_id_2 = mysql_connect("localhost", "someuser", "apass");
  if(mysql_error())
  {
//abort with error
die(mysql_error());
  } else
  {
//code to write error to database
//...
  }
}

//I know one should check if mysql_connect returns false
//rather than if mysql_error() exists, but this is to show
// what happens.


Expected result:

For the code under write error to database to be run, because
mysql_error() should be false if the second connection is made.

Actual result:
--
The script dies with error: 

You have an error in your SQL syntax near 's place', 'false' at line 1





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



#24659 [Opn->Ver]: Crash due to some internal memory corruption (?)

2003-07-17 Thread sniper
 ID:   24659
 Updated by:   [EMAIL PROTECTED]
-Summary:  Segmentation fault: xml_set_*_handler with object
   reference
 Reported By:  fujimura at wakhok dot ac dot jp
-Status:   Open
+Status:   Verified
-Bug Type: XML related
+Bug Type: Zend Engine 2 problem
 Operating System: Linux kernel-2.4.21
 PHP Version:  5.0.0b2-dev
 New Comment:

The first script (that xml thing) does this after some reloads:

Warning: xml_set_default_handler(): supplied resource is not a valid
XML Parser resource in /www/apache-1.3.27/htdocs/exep.php on line 13

Warning: xml_parser_free(): supplied resource is not a valid XML Parser
resource in /www/apache-1.3.27/htdocs/exep.php on line 15

Warning: Unknown list entry type in request shutdown (135138372) in
Unknown on line 0

Given enough requests, (ab -n 1000 http://localhost/bug24658_a.php), it
crashes:


[Switching to Thread 1024 (runnable)]
0x4042e1fd in zend_objects_destroy_object (object=0x80e907c, handle=1)
at /usr/src/web/php/php5/Zend/zend_objects.c:36
36  zend_function *destructor = object->ce->destructor;
(gdb) bt
#0  0x4042e1fd in zend_objects_destroy_object (object=0x80e907c,
handle=1)
at /usr/src/web/php/php5/Zend/zend_objects.c:36
#1  0x40430855 in zend_objects_store_del_ref (zobject=0x80e0f9c) at
/usr/src/web/php/php5/Zend/zend_objects_API.c:142
#2  0x4041fccc in _zval_dtor (zvalue=0x80e0f9c) at
/usr/src/web/php/php5/Zend/zend_variables.c:61
#3  0x40417389 in _zval_ptr_dtor (zval_ptr=0x80ecff0) at
/usr/src/web/php/php5/Zend/zend_execute_API.c:344
#4  0x40426be8 in zend_hash_destroy (ht=0x404a6990) at
/usr/src/web/php/php5/Zend/zend_hash.c:509
#5  0x40416f55 in shutdown_executor () at
/usr/src/web/php/php5/Zend/zend_execute_API.c:211
#6  0x40421257 in zend_deactivate () at
/usr/src/web/php/php5/Zend/zend.c:795
#7  0x403ee8e6 in php_request_shutdown (dummy=0x0) at
/usr/src/web/php/php5/main/main.c:1174
#8  0x4045c0d5 in apache_php_module_main (r=0x81bf684,
display_source_mode=0)
at /usr/src/web/php/php5/sapi/apache/sapi_apache.c:60
#9  0x4045cd00 in send_php (r=0x81bf684, display_source_mode=0,
filename=0x0)
at /usr/src/web/php/php5/sapi/apache/mod_php5.c:621
#10 0x4045cd6a in send_parsed_php (r=0x81bf684) at
/usr/src/web/php/php5/sapi/apache/mod_php5.c:636
#11 0x8054f09 in ap_invoke_handler ()
#12 0x806b0cf in process_request_internal ()
#13 0x806b13a in ap_process_request ()
#14 0x8061916 in child_main ()
#15 0x8061af5 in make_child ()
#16 0x8061c76 in startup_children ()
#17 0x806230d in standalone_main ()
#18 0x8062b9c in main ()
#19 0x4016c9cb in __libc_start_main (main=0x80627d8 , argc=3,
argv=0xb6b4, init=0x804ed2c <_init>, 
fini=0x8082e64 <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xb6ac)
at ../sysdeps/generic/libc-start.c:92




Previous Comments:


[2003-07-16 20:56:28] fujimura at wakhok dot ac dot jp

> Backtrace is useless as long as you don't have
> --enable-debug in your configure line. 
Okay, I rebuilt PHP with --enable-debug, but this bug did not
reproduce.
And next, I did again without --enable-debug, this bug reproduced.
I have discovered that set_exception_handler() causes this one too.


I cannot understand. The debug codes of Zend causes with this?
What can I do?

> Also include the full configure line you used.
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--disable-short-tags \
--enable-versioning \
--enable-mbstring \
--enable-mbregex \
--enable-dom \
--with-iconv \
--with-xsl \
--with-openssl \
--with-zlib \
--with-bz2
...and --enable-debug



[2003-07-16 03:54:01] [EMAIL PROTECTED]

Backtrace is useless as long as you don't have
--enable-debug in your configure line. 
So add it, and put new backtrace here.

Also include the full configure line you used.




[2003-07-15 04:16:58] fujimura at wakhok dot ac dot jp

-$parser AND die;
+$parser OR die;

;-)



[2003-07-15 04:15:16] fujimura at wakhok dot ac dot jp

Description:

The following code crashes(segmentation fault, and empty output) at a
whim.
But it does not reproduce when php invoked as CLI.


Reproduce code:
---


Expected result:

Nothing.

Actual result:
--
SIGSEGV logged to error_log.






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



#24659 [Ver]: Crash due to some internal memory corruption (?)

2003-07-17 Thread sniper
 ID:   24659
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fujimura at wakhok dot ac dot jp
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: Linux kernel-2.4.21
 PHP Version:  5.0.0b2-dev
 New Comment:

The second script crashes much earlier:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (runnable)]
0x40425fde in zend_hash_add_or_update (ht=0x80ded04, arKey=0x80ded24
"\\sA@", nKeyLength=7, pData=0x0, nDataSize=4, 
pDest=0xbfffcd54, flag=1) at
/usr/src/web/php/php5/Zend/zend_hash.c:238
238 INIT_DATA(ht, p, pData, nDataSize);
(gdb) bt
#0  0x40425fde in zend_hash_add_or_update (ht=0x80ded04,
arKey=0x80ded24 "\\sA@", nKeyLength=7, pData=0x0, 
nDataSize=4, pDest=0xbfffcd54, flag=1) at
/usr/src/web/php/php5/Zend/zend_hash.c:238
#1  0x404271f4 in zend_hash_copy (target=0x80ded04, source=0x80de7e4,
pCopyConstructor=0x4041fce4 , 
tmp=0xbfffcda4, size=4) at
/usr/src/web/php/php5/Zend/zend_hash.c:750
#2  0x4041fde6 in _zval_copy_ctor (zvalue=0x80f160c) at
/usr/src/web/php/php5/Zend/zend_variables.c:124
#3  0x4042b068 in zif_set_exception_handler (ht=1,
return_value=0x80f160c, this_ptr=0x0, return_value_used=0)
at /usr/src/web/php/php5/Zend/zend_builtin_functions.c:1017
#4  0x40451d4f in zend_do_fcall_common_helper (execute_data=0xbfffcf5c,
op_array=0x80ea62c)
at /usr/src/web/php/php5/Zend/zend_execute.c:2634
#5  0x404523f4 in zend_do_fcall_handler (execute_data=0xbfffcf5c,
op_array=0x80ea62c)
at /usr/src/web/php/php5/Zend/zend_execute.c:2763
#6  0x4043a7ee in execute (op_array=0x80ea62c) at
/usr/src/web/php/php5/Zend/zend_execute.c:1194
#7  0x4042190f in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/web/php/php5/Zend/zend.c:1017
#8  0x403ef2c5 in php_execute_script (primary_file=0xb288) at
/usr/src/web/php/php5/main/main.c:1695
#9  0x4045c07e in apache_php_module_main (r=0x81bf684,
display_source_mode=0)
at /usr/src/web/php/php5/sapi/apache/sapi_apache.c:54
#10 0x4045cd00 in send_php (r=0x81bf684, display_source_mode=0,
filename=0x0)
at /usr/src/web/php/php5/sapi/apache/mod_php5.c:621
#11 0x4045cd6a in send_parsed_php (r=0x81bf684) at
/usr/src/web/php/php5/sapi/apache/mod_php5.c:636
#12 0x8054f09 in ap_invoke_handler ()
#13 0x806b0cf in process_request_internal ()
#14 0x806b13a in ap_process_request ()
#15 0x8061916 in child_main ()
#16 0x8061af5 in make_child ()
#17 0x8061c76 in startup_children ()
#18 0x806230d in standalone_main ()
#19 0x8062b9c in main ()
#20 0x4016c9cb in __libc_start_main (main=0x80627d8 , argc=3,
argv=0xb6b4, init=0x804ed2c <_init>, 
fini=0x8082e64 <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xb6ac)
at ../sysdeps/generic/libc-start.c:92



Previous Comments:


[2003-07-18 00:34:39] [EMAIL PROTECTED]

The first script (that xml thing) does this after some reloads:

Warning: xml_set_default_handler(): supplied resource is not a valid
XML Parser resource in /www/apache-1.3.27/htdocs/exep.php on line 13

Warning: xml_parser_free(): supplied resource is not a valid XML Parser
resource in /www/apache-1.3.27/htdocs/exep.php on line 15

Warning: Unknown list entry type in request shutdown (135138372) in
Unknown on line 0

Given enough requests, (ab -n 1000 http://localhost/bug24658_a.php), it
crashes:


[Switching to Thread 1024 (runnable)]
0x4042e1fd in zend_objects_destroy_object (object=0x80e907c, handle=1)
at /usr/src/web/php/php5/Zend/zend_objects.c:36
36  zend_function *destructor = object->ce->destructor;
(gdb) bt
#0  0x4042e1fd in zend_objects_destroy_object (object=0x80e907c,
handle=1)
at /usr/src/web/php/php5/Zend/zend_objects.c:36
#1  0x40430855 in zend_objects_store_del_ref (zobject=0x80e0f9c) at
/usr/src/web/php/php5/Zend/zend_objects_API.c:142
#2  0x4041fccc in _zval_dtor (zvalue=0x80e0f9c) at
/usr/src/web/php/php5/Zend/zend_variables.c:61
#3  0x40417389 in _zval_ptr_dtor (zval_ptr=0x80ecff0) at
/usr/src/web/php/php5/Zend/zend_execute_API.c:344
#4  0x40426be8 in zend_hash_destroy (ht=0x404a6990) at
/usr/src/web/php/php5/Zend/zend_hash.c:509
#5  0x40416f55 in shutdown_executor () at
/usr/src/web/php/php5/Zend/zend_execute_API.c:211
#6  0x40421257 in zend_deactivate () at
/usr/src/web/php/php5/Zend/zend.c:795
#7  0x403ee8e6 in php_request_shutdown (dummy=0x0) at
/usr/src/web/php/php5/main/main.c:1174
#8  0x4045c0d5 in apache_php_module_main (r=0x81bf684,
display_source_mode=0)
at /usr/src/web/php/php5/sapi/apache/sapi_apache.c:60
#9  0x4045cd00 in send_php (r=0x81bf684, display_source_mode=0,
filename=0x0)
at /usr/src/web/php/php5/sapi/apache/mod_php5.c:621
#10 0x4045cd6a in send_parsed_php (r=0x81bf684) at
/usr/src/web/php/php5/sapi/apache/mod_php5.c:636
#11 0x8054f09 in ap_invoke_handler ()
#12 0x806b0cf in process_request_internal ()
#13 0x806b13a in ap_process_request ()
#14 0x8061916 in child_main ()

#24664 [Fbk->Opn]: relocation error: symbol not found: ap_pass_brigade

2003-07-17 Thread a dot polli at mir dot it
 ID:   24664
 User updated by:  a dot polli at mir dot it
 Reported By:  a dot polli at mir dot it
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: OpenUnix 8
 PHP Version:  4.3.3RC2-dev
 New Comment:

# nm -g httpd |grep pass_brig
[5540]|135086056 |141   |FUNC |GLOB |0|9 
|ap_pass_brigade
[5988]|135848628 |4 |OBJT |GLOB |0|15
|ap_hack_ap_pass_brigade


Previous Comments:


[2003-07-17 22:47:49] [EMAIL PROTECTED]

What does this output:

# nm -g httpd |grep pass_brig

(for Apache2, of course :)




[2003-07-16 07:38:33] a dot polli at mir dot it

I try with apache 1.3.27 and it works (I can see a phpinfo page ...)
yes, I think it's a Apache2 related problem



[2003-07-16 04:05:28] [EMAIL PROTECTED]

Have you tried Apache 1.3.27 which might actually work?




[2003-07-16 03:15:30] a dot polli at mir dot it

I try it (php4-STABLE-200307160530),
but I have the same error when I start apache2.



[2003-07-15 13:27:51] [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/24664

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



#24033 [Com]: changed behaviour of fread() ?

2003-07-17 Thread webmaster at webtechies dot net
 ID:   24033
 Comment by:   webmaster at webtechies dot net
 Reported By:  thomas at nimstad dot com
 Status:   Bogus
 Bug Type: Sockets related
 Operating System: Win32
 PHP Version:  4.3.2
 New Comment:

I can say that some of you guys here are really life savers.

I was working on my scripts for hours and I could see that there is
something wrong with the length of the pockets it reads but couldn't
find anything in the manual. And my codes were working until my ISP
re-build the server.

Then I found the answer here.

Thanks guys. Hopefully the fix will stay working in next version too.


Previous Comments:


[2003-06-13 18:20:58] [EMAIL PROTECTED]

bob at bravenet dot com:
That is just one of the reasons why we reinstated the pre 4.3.x
behaviour.
Please check your history before complaining.




[2003-06-13 17:29:07] bob at bravenet dot com

I absolutely disagree with the conclusion on this bug. To outright
change the functionality of fread like this without any notice
whatsoever and especially in a minor revision is totally irresponsible
as a company.

To date fread has always taken a $length parameter and php handled the
buffering. And the docs still say that it will. When making a change
like this, at a minimum, update the docs so we don't waste a couple
days trying to find out that you changed the functionality of fread.



[2003-06-06 03:17:06] [EMAIL PROTECTED]

This is your loop:

  while (!feof($fp) && $length > 0) {
$size = min(1024, $length);
$reply .= fread($fp, $size);
$length -= $size;
  }

It looks wrong to me, since you are not checking the return value of
fread and are just assuming that it read the chunk you asked for.

This is a better loop:

while ($length > 0) {
   $size = min(8192, $length);
   $data = fread($fp, $size);
   if (strlen($data) == 0) {
   break; // EOF
   }
   $reply .= $data;
   $length -= strlen($data);
}

It is recommended that you fread() in chunks of 8kb from sockets, as
you will get better performance than using a smaller value.  Using a
larger value is wasteful as the streams layer will only allocate in 8KB
chunks; Win32 has a maximum internal packet size of 8KB too.

I'm marking this as bogus since it is the expected behaviour of PHP (I
actually spent a couple of days correcting and testing this for
HTTP/1.1 keep alives).




[2003-06-06 03:06:27] thomas at nimstad dot com

Ok. Since I'm was not the only having the problem I examined it some
more... here we goes again...

Problem #1: When using a chunk size >= 8192 bytes it's just to
concatenate the data and continue reading (as examplified in the
documentation). So to what I understand, this is not a bug, rather than
a timing issue that fread() returns the number of bytes available at
the moment? Anyway, in this case problem #2 doesn't occurs!!

Problem #2: The fread() still hangs until timeout if I try to read data
in chunks of <= 4096 bytes!!



[2003-06-06 01:46:52] [EMAIL PROTECTED]

>From the manual:

When reading from network streams or pipes, such as those returned when
reading remote files or from popen() and proc_open(), reading will stop
after a packet is available. This means that you should collect the
data together in chunks as shown in the example below.

A bug existed in 4.3.0-1 that made it "work", so, it's not considered
changed behavior, just a bug.  This bug, for example, did not exist in
4.2.3

Regarding Thomas "problem #2", not sure about that, will see what Wez
has to say.

Regarding the last proposed example by PJ, just use
file_get_contents().




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

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



#24700 [NEW]: small memory leaks found by valgrind

2003-07-17 Thread jan at kneschke dot de
From: jan at kneschke dot de
Operating system: Linux 2.4.x
PHP version:  4.3.3RC1
PHP Bug Type: Scripting Engine problem
Bug description:  small memory leaks found by valgrind

Description:

I just used valgrind on a simple php script and found a small 
memory leaks in the Zend Engine 
 
A patch is attached below. 
 
1. double init of auto_globals in line 473 and 499 because of 
#ifndef ZTS  
 #define GLOBAL_AUTO_GLOBALS_TABLE
CG(auto_globals) 
#endif 
 
2. a missing free 

Reproduce code:
---
$ valgrind --logfile-fd=1 -v --leak-check=yes --show-reachable=yes
~/projects/in-cvs/php4/sapi/cli/php -r "print 'a';"

Expected result:

no leaks :) 

Actual result:
--
Index: Zend/zend.c 
=== 
RCS file: /repository/Zend/Attic/zend.c,v 
retrieving revision 1.162.2.9 
diff -u -r1.162.2.9 zend.c 
--- Zend/zend.c 14 Jun 2003 09:27:34 -  1.162.2.9 
+++ Zend/zend.c 18 Jul 2003 06:47:51 - 
@@ -496,7 +496,6 @@ 
zend_startup_constants(tsrm_ls); 
GLOBAL_CONSTANTS_TABLE = EG(zend_constants); 
 #else 
-   zend_hash_init_ex(CG(auto_globals), 8, NULL, NULL, 1, 
0); 
scanner_globals_ctor(&ini_scanner_globals 
TSRMLS_CC); 
scanner_globals_ctor(&language_scanner_globals 
TSRMLS_CC); 
zend_startup_constants(); 
Index: Zend/zend_ini.c 
=== 
RCS file: /repository/Zend/Attic/zend_ini.c,v 
retrieving revision 1.23.2.2 
diff -u -r1.23.2.2 zend_ini.c 
--- Zend/zend_ini.c 24 Mar 2003 14:53:13 -  
1.23.2.2 
+++ Zend/zend_ini.c 18 Jul 2003 06:47:52 - 
@@ -78,6 +78,7 @@ 
 ZEND_API int zend_ini_shutdown(TSRMLS_D) 
 { 
zend_hash_destroy(EG(ini_directives)); 
+   free(EG(ini_directives)); 
return SUCCESS; 
 } 
 

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