#36458 [Fbk-Opn]: function sleep accept negative value

2006-02-21 Thread quick_defect at yahoo dot com
 ID:   36458
 User updated by:  quick_defect at yahoo dot com
 Reported By:  quick_defect at yahoo dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: redhat
 PHP Version:  5.1.2
 New Comment:

Nothing diffrent...the same as before


Previous Comments:


[2006-02-20 08:20:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2006-02-20 04:24:46] quick_defect at yahoo dot com

Description:

First,if given negative value, I have to interrupt the execution of
scripts because it sleep for very long time.(I did not exactly know how
long)
Second,if given a int which cause overflow, it also do not work very
well.

Reproduce code:
---
sleep(-1);
$max=mt_getrandmax();
$of=-$max-2;
sleep($of);

Expected result:

exception or turn it to a legal value

Actual result:
--
sleep for a very long time






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


#36470 [NEW]: levenshtein with 3 parameters does not work as expected

2006-02-21 Thread chen dot daqi at gmail dot com
From: chen dot daqi at gmail dot com
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: Strings related
Bug description:  levenshtein with 3 parameters does not work as expected

Description:

Hi, levenshtein(abc, abbc, 2) is valid according to PHP manual, but in
fact it issues a warning and return -1.

Reproduce code:
---
?php
var_dump(levenshtein(abc, abbc, 2));
?


Expected result:

int(2)

Actual result:
--
Warning: levenshtein(): The general Levenshtein support is not there yet
in lev.php on line 2

Warning: levenshtein(): Argument string(s) too long in lev.php on line 2
int(-1)


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


#36458 [Opn]: function sleep accept negative value

2006-02-21 Thread quick_defect at yahoo dot com
 ID:   36458
 User updated by:  quick_defect at yahoo dot com
 Reported By:  quick_defect at yahoo dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: redhat
 PHP Version:  5.1.2
 New Comment:

But I see that the behavior of function usleep reasonable this time:
warning messages are given and exit endless sleep.But why function
sleep remains? PLS fix it.


Previous Comments:


[2006-02-21 09:14:04] quick_defect at yahoo dot com

Nothing diffrent...the same as before



[2006-02-20 08:20:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2006-02-20 04:24:46] quick_defect at yahoo dot com

Description:

First,if given negative value, I have to interrupt the execution of
scripts because it sleep for very long time.(I did not exactly know how
long)
Second,if given a int which cause overflow, it also do not work very
well.

Reproduce code:
---
sleep(-1);
$max=mt_getrandmax();
$of=-$max-2;
sleep($of);

Expected result:

exception or turn it to a legal value

Actual result:
--
sleep for a very long time






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


#36459 [Fbk-Opn]: Incorrect adding PHPSESSID to links, which contains \r\n

2006-02-21 Thread muhtarov at oviont dot ru
 ID:   36459
 User updated by:  muhtarov at oviont dot ru
 Reported By:  muhtarov at oviont dot ru
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Windows 2000 SP4
 PHP Version:  5.1.2
 New Comment:

?php

/**
 * Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n
 *
 * @linkhttp://bugs.php.net/bug.php?id=36459
 * @charset ANSI
 */

error_reporting(E_ALL);
ini_set('session.use_trans_sid', 1);
ini_set('session.use_cookies', 0);
ini_set('session.name', 'sid');
session_start();

?
html
  head
titleBug #36459 Incorrect adding PHPSESSID to links, which
contains \r\n/title
  /head
  body
pSee source html code/p
a href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2
   style=font: normal 11pt Times New Romanincorrect link/abr
/
br /
a href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2
style=font: normal 11pt Times New Romancorrect link/a
  /body
/html


Previous Comments:


[2006-02-20 15:25:28] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-02-20 10:39:30] muhtarov at oviont dot ru

Description:

There is problem while adding PHPSESSID to links, which contain \r\n
after some attribute.

Part of my .htaccess file:

php_value session.use_trans_sid 1
php_value session.name sid


Reproduce code:
---
a href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2
sid=brvsemsd03-ynw9wn4
style=font: normal 9pt Times New Romantest/a

Expected result:

a
href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2sid=brvsemsd03-ynw9wn4
style=font: normal 9pt Times New Romantest/a






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


#36471 [NEW]: iconv_mime_encode segmentation fault

2006-02-21 Thread chen dot daqi at gmail dot com
From: chen dot daqi at gmail dot com
Operating system: linux
PHP version:  5.1.2
PHP Bug Type: Unknown/Other Function
Bug description:  iconv_mime_encode segmentation fault

Description:

Hi, when I set $preferences['line-length'] = -1, 
iconv_mime_encode will get segmentation fault on linux.

Reproduce code:
---
?php
$preferences = array(
scheme = B,
input-charset = ISO8859-1,
output-charset = UTF-8,
line-length = 76,
line-break-chars = \n
);

$preferences[line-length] = -1;
var_dump(iconv_mime_encode(Subject, This is encode test ,
$preferences));
?


Expected result:

Just a warning of line-length can't be less than 0

Actual result:
--
Segmentation fault

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


#36468 [Opn-Bgs]: problem with 127.0.0.1 and localhost

2006-02-21 Thread bjori
 ID:   36468
 Updated by:   [EMAIL PROTECTED]
 Reported By:  imo at popular dot lv
-Status:   Open
+Status:   Bogus
 Bug Type: *Network Functions
 Operating System: Linux
 PHP Version:  5.1.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Configure your OS/httpd correctly (/etc/hosts for instance)


Previous Comments:


[2006-02-20 22:47:07] imo at popular dot lv

Description:

problem with file_get_contents, fread an stream_get_content
on windows all works fine, but on linux not work :(



Reproduce code:
---
?
echo file_get_contents(http://127.0.0.1/somedir/somefile.php;);
// result: blank or fatall error 0

echo file_get_contents(http://mydomain.lv/somedir/somefile.php;);
//all works fine

echo file_get_contents(http://localhost/somedir/somefile.php;);
//all works fine
?







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


#36464 [Bgs]: imagepng empty second param shows error

2006-02-21 Thread mdhp at gmx dot de
 ID:   36464
 User updated by:  mdhp at gmx dot de
 Reported By:  mdhp at gmx dot de
 Status:   Bogus
 Bug Type: GD related
 Operating System: debian 3.1
 PHP Version:  5.1.2
 New Comment:

Yes thats right, so i wrote ... snip... code for sending header is
done and works fine for gifs and jpgs.

But the second parameter for imagepng must set in 5.1.2.
In old versions an empty parameter could be transmitted.

Normaly you can put an empty parameter or no parameter, the result is
the same, but not in 5.1.2.


Previous Comments:


[2006-02-20 17:16:47] [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

You'll need to send correct header



[2006-02-20 16:27:10] mdhp at gmx dot de

Description:

Empty second param for imagepng shows trashcode but not the png.

Not a real bug, but Versions before 5.1.2 are ok.
Function imagegif with second empty param works.

Reproduce code:
---
// ... snip ... imagecreate code from png file...
// At version  5.1.2 png will shown on browser

$output_filename = '';
imagepng($src, $output_filename);

// on 5.1.2 you have to check if output_filename empty
// imagegif works fine with two params







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


#36460 [Bgs]: schemaValidateSource fail when called in a web service method

2006-02-21 Thread samuel at zallocco dot net
 ID:   36460
 User updated by:  samuel at zallocco dot net
 Reported By:  samuel at zallocco dot net
 Status:   Bogus
 Bug Type: DOM XML related
 Operating System: Windows XP SP2
 PHP Version:  5.1.2
 New Comment:

If I've posted this message in the wrong category I apologise, but this
is the first time I use the error reporting form and I haven't found a
best matching category.  I can't submit a non dependent script because
I'm sure the DOMDocument-schemaValidateSource works fine in a standard
class environment or regular script. But I say that in conjunction with
PEAR:SOAP on a MSWindowsXP platform it will cause the error. I've
installed the latest version of libxml2 lib but the error will persist.
 The next step for me is to migrate all on a linux platformhoping it
will run.


Previous Comments:


[2006-02-20 19:31:09] [EMAIL PROTECTED]

I get

Validated: TRUE - 1 
Validated: TRUE - 1

(on mac osx)

If you really think, this is a dom fault (the Error suggests
otherwise), please provide a simple, non-dependent script. 
Your script is dependent on just too many things to debug... 

It works for me, so it's your turn, to prove that it's DOMs fault (and
not one of the PEAR components)

Furthermore, please upgrade to one of the latest libxml2 versions (if
not already done), as the XML Schema support has much improved lately




[2006-02-20 13:21:37] samuel at zallocco dot net

Description:

The DOMDocument::schemaValidateSource function fail with an unspecified
error when called in a PEAR:SOAP web service method.
This bug was also posted on news.php.net with this title: PEAR:SOAP
remote invocation of DOMDocument schemaValidateSource function  BUG

Reproduce code:
---
The source code is longer than 20 lines so please dowload from:
http://www.scienze.univaq.it/Zallocco.Samuel/pear-soap-test.zip

Expected result:

Validated: TRUE - 1

Validated: TRUE - 1



Actual result:
--
Validated: TRUE - 1

Error: invalid HTTP response








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


#36472 [NEW]: Memory fault

2006-02-21 Thread Eskil dot Swahn at LDC dot lu dot se
From: Eskil dot Swahn at LDC dot lu dot se
Operating system: Tru64 UNIX V5.1B
PHP version:  4.4.2
PHP Bug Type: Apache related
Bug description:  Memory fault

Description:

I have failed to upgrade our PHP-installation on Tru64 UNIX to 4.4.1 or
4.4.2 (successful on Linux and Solaris).

When I try to restart Apache after copying a new libphp4.so I get a crash
which only lists the following:

bin/apachectl: 814341 Memory fault
bin/apachectl startssl: httpd could not be started

This setup has worked flawlessly upto 4.4.0 but both 4.4.1 and 4.4.2
triggers this behaviour.

Config:

./configure  --with-apache=../apache_1.3.33 --with-prefix=/usr/local/php
--with-oci8=/usr/users/dba/oracle/product/9.2.0 --with-openssl

I can find no further information in any of Apache's logfiles.

This is a setup with Apache 1.3.33 and mod_ssl 2.8.22.


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


#36473 [NEW]: Foreign Images w/getimagesize() crash Apache2

2006-02-21 Thread punkpuke at terraimpetus dot com
From: punkpuke at terraimpetus dot com
Operating system: Windows XP Pro
PHP version:  4.4.2
PHP Bug Type: Apache2 related
Bug description:  Foreign Images w/getimagesize() crash Apache2

Description:

When accessing foreign URLs with getimagesize(), apache server crashes
with:

szAppName : Apache.exe szAppVer : 2.0.55.0 szModName : php4ts.dll 
   
szModVer : 4.4.2.2 offset : 000c5fca

-
The only changes made to the PHP.ini file were the enabling/removing the
comment in front of the GD2 and the ZIP, DLL extensions.

Server is running as a test environment on localhost.

Reproduce code:
---
?php
getimagesize('images/example.gif');  //Works Fine (Local)
getimagesize('example.jpg'); //Works Fine
//The following crash the Entire Apache server, no matter where they're
used
getimagesize('http://example.com/example/example.jpg');//Crashes 
getimagesize('http://example.com/example.jpg'); //Crashes 
getimagesize('http://example.com/example.gif'); //Crashes
@getimagesize('http://example.com/example.gif'); //Crashes
?

Expected result:

Apache 2 Servers lags for a slight moment, then crashes 100% of the time
that a page using a foreign URL call to getimagesize() is run.


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


#36472 [Opn-Fbk]: Memory fault

2006-02-21 Thread derick
 ID:   36472
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Eskil dot Swahn at LDC dot lu dot se
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Tru64 UNIX V5.1B
 PHP Version:  4.4.2
 New Comment:

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

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


Previous Comments:


[2006-02-21 10:44:34] Eskil dot Swahn at LDC dot lu dot se

Description:

I have failed to upgrade our PHP-installation on Tru64 UNIX to 4.4.1 or
4.4.2 (successful on Linux and Solaris).

When I try to restart Apache after copying a new libphp4.so I get a
crash which only lists the following:

bin/apachectl: 814341 Memory fault
bin/apachectl startssl: httpd could not be started

This setup has worked flawlessly upto 4.4.0 but both 4.4.1 and 4.4.2
triggers this behaviour.

Config:

./configure  --with-apache=../apache_1.3.33
--with-prefix=/usr/local/php
--with-oci8=/usr/users/dba/oracle/product/9.2.0 --with-openssl

I can find no further information in any of Apache's logfiles.

This is a setup with Apache 1.3.33 and mod_ssl 2.8.22.






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


#36472 [Fbk-Opn]: Memory fault

2006-02-21 Thread Eskil dot Swahn at LDC dot lu dot se
 ID:   36472
 User updated by:  Eskil dot Swahn at LDC dot lu dot se
 Reported By:  Eskil dot Swahn at LDC dot lu dot se
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Tru64 UNIX V5.1B
 PHP Version:  4.4.2
 New Comment:

Checked the instructions for generating a backtrace.

Any chance of instructions for T64's dbx instead of gdb?


Previous Comments:


[2006-02-21 10:51:03] [EMAIL PROTECTED]

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

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



[2006-02-21 10:44:34] Eskil dot Swahn at LDC dot lu dot se

Description:

I have failed to upgrade our PHP-installation on Tru64 UNIX to 4.4.1 or
4.4.2 (successful on Linux and Solaris).

When I try to restart Apache after copying a new libphp4.so I get a
crash which only lists the following:

bin/apachectl: 814341 Memory fault
bin/apachectl startssl: httpd could not be started

This setup has worked flawlessly upto 4.4.0 but both 4.4.1 and 4.4.2
triggers this behaviour.

Config:

./configure  --with-apache=../apache_1.3.33
--with-prefix=/usr/local/php
--with-oci8=/usr/users/dba/oracle/product/9.2.0 --with-openssl

I can find no further information in any of Apache's logfiles.

This is a setup with Apache 1.3.33 and mod_ssl 2.8.22.






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


#36472 [Opn-Fbk]: Memory fault

2006-02-21 Thread derick
 ID:   36472
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Eskil dot Swahn at LDC dot lu dot se
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Tru64 UNIX V5.1B
 PHP Version:  4.4.2
 New Comment:

No, you're on your own for that... but your best bet would be to start
apache in single process mode (-X) in the debugger and then request
your script. The debugging should capture it when it segfaults and i
guess there is a command to make a backtrace then.


Previous Comments:


[2006-02-21 11:12:28] Eskil dot Swahn at LDC dot lu dot se

Checked the instructions for generating a backtrace.

Any chance of instructions for T64's dbx instead of gdb?



[2006-02-21 10:51:03] [EMAIL PROTECTED]

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

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



[2006-02-21 10:44:34] Eskil dot Swahn at LDC dot lu dot se

Description:

I have failed to upgrade our PHP-installation on Tru64 UNIX to 4.4.1 or
4.4.2 (successful on Linux and Solaris).

When I try to restart Apache after copying a new libphp4.so I get a
crash which only lists the following:

bin/apachectl: 814341 Memory fault
bin/apachectl startssl: httpd could not be started

This setup has worked flawlessly upto 4.4.0 but both 4.4.1 and 4.4.2
triggers this behaviour.

Config:

./configure  --with-apache=../apache_1.3.33
--with-prefix=/usr/local/php
--with-oci8=/usr/users/dba/oracle/product/9.2.0 --with-openssl

I can find no further information in any of Apache's logfiles.

This is a setup with Apache 1.3.33 and mod_ssl 2.8.22.






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


#36475 [NEW]: Call by reference fails for objects

2006-02-21 Thread elmar dot hinz at team-red dot net
From: elmar dot hinz at team-red dot net
Operating system: Linux/Debian
PHP version:  5.1.2
PHP Bug Type: Class/Object related
Bug description:  Call by reference fails for objects

Description:

Cannot access original objects by call by reference.

function tryCallback($ref){
  $ref = $this-object;  
}


Only a copies work:

function tryCallback($ref){
  $ref = $this-object;  
}


Reproduce code:
---
?php
class myObject{ var $value = 'The original value'; }
function tryCallback($ref){
  global $object;
  $ref = $object;  // in a class it would be: $ref = $this-object;
  dump($ref, 'Before the proplem: The object is still here but will fail
from outside.');
}
function dump($var, $name){
  print 'p  style=background:#ee;' . $name . '/p';
  if($var){ print 'pre style=color:green'; print_r($var); print
'/pre'; }
  else{ print 'p style=color:redstrong$var is
empty!!!/strong/p'; }
}
$object = new myObject();
tryCallback($callback);
dump($callback, 'Here the object is missing in my test.');
$callback-value = 'Try to set a value.';
dump($callback, 'Ooops, what a funny object now.');
dump($object, 'This is the original object. Unaltered. No reference was
created.');
?

Expected result:

Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

myObject Object
(
[value] = The original value
)

[...]

Actual result:
--
Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

$var is empty!!!

[...]

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


#34537 [Ver]: Last-Modified header + Status: 200 results in 200 OK without body

2006-02-21 Thread mike
 ID:   34537
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alisencer at gmail dot com
 Status:   Verified
 Bug Type: HTTP related
 Operating System: *
 PHP Version:  5CVS-2005-09-22
 New Comment:

Most probably related to this Apache bug/behaviour:
http://issues.apache.org/bugzilla/show_bug.cgi?id=38070



Previous Comments:


[2005-09-19 08:58:30] [EMAIL PROTECTED]

Using Apache2 and apache2handler module I get the same results as with
Apache1.




[2005-09-19 02:50:01] alisencer at gmail dot com

I was only able to test with Apache1.3 and mod_php (instead of CGI).
There it does not happen, I get a regular 200 with body.



[2005-09-19 02:40:09] [EMAIL PROTECTED]

Does the same thing happen under Apache1?



[2005-09-19 01:58:36] alisencer at gmail dot com

Hi Sniper,

thanks for your quick reply. I think there's a misunderstatement. I
know HTTP headers and how they work.

Please re-read the bug-report.

I am setting 200 OK and sending a body.

Something along the way decides it should be a 304, but does NOT change
the status-code. Instead it silently drops the body of the response.

I don't know what this something along the way is - it might be PHP or
it might be Apache2. But I doubt that this would be expected
behaviour.


Thanks for your reconsideration and effort.



[2005-09-18 22:25:07] [EMAIL PROTECTED]

Expected behaviour. Please read more about the headers at:
 
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html





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

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


#36475 [Opn-Bgs]: Call by reference fails for objects

2006-02-21 Thread mike
 ID:   36475
 Updated by:   [EMAIL PROTECTED]
 Reported By:  elmar dot hinz at team-red dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Linux/Debian
 PHP Version:  5.1.2
 New Comment:

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

Think again about your code.



Previous Comments:


[2006-02-21 13:12:14] elmar dot hinz at team-red dot net

Description:

Cannot access original objects by call by reference.

function tryCallback($ref){
  $ref = $this-object;  
}


Only a copies work:

function tryCallback($ref){
  $ref = $this-object;  
}


Reproduce code:
---
?php
class myObject{ var $value = 'The original value'; }
function tryCallback($ref){
  global $object;
  $ref = $object;  // in a class it would be: $ref = $this-object;
  dump($ref, 'Before the proplem: The object is still here but will
fail from outside.');
}
function dump($var, $name){
  print 'p  style=background:#ee;' . $name . '/p';
  if($var){ print 'pre style=color:green'; print_r($var); print
'/pre'; }
  else{ print 'p style=color:redstrong$var is
empty!!!/strong/p'; }
}
$object = new myObject();
tryCallback($callback);
dump($callback, 'Here the object is missing in my test.');
$callback-value = 'Try to set a value.';
dump($callback, 'Ooops, what a funny object now.');
dump($object, 'This is the original object. Unaltered. No reference was
created.');
?

Expected result:

Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

myObject Object
(
[value] = The original value
)

[...]

Actual result:
--
Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

$var is empty!!!

[...]





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


#36473 [Opn-Fbk]: Foreign Images w/getimagesize() crash Apache2

2006-02-21 Thread mike
 ID:   36473
 Updated by:   [EMAIL PROTECTED]
 Reported By:  punkpuke at terraimpetus dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP Pro
 PHP Version:  4.4.2
 New Comment:

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

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

Works fine here.


Previous Comments:


[2006-02-21 10:50:07] punkpuke at terraimpetus dot com

Description:

When accessing foreign URLs with getimagesize(), apache server crashes
with:

szAppName : Apache.exe szAppVer : 2.0.55.0 szModName :
php4ts.dll 
szModVer : 4.4.2.2 offset : 000c5fca

-
The only changes made to the PHP.ini file were the enabling/removing
the comment in front of the GD2 and the ZIP, DLL extensions.

Server is running as a test environment on localhost.

Reproduce code:
---
?php
getimagesize('images/example.gif');  //Works Fine (Local)
getimagesize('example.jpg'); //Works Fine
//The following crash the Entire Apache server, no matter where they're
used
getimagesize('http://example.com/example/example.jpg');//Crashes 
getimagesize('http://example.com/example.jpg'); //Crashes 
getimagesize('http://example.com/example.gif'); //Crashes
@getimagesize('http://example.com/example.gif'); //Crashes
?

Expected result:

Apache 2 Servers lags for a slight moment, then crashes 100% of the
time that a page using a foreign URL call to getimagesize() is run.






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


#36459 [Opn-Fbk]: Incorrect adding PHPSESSID to links, which contains \r\n

2006-02-21 Thread mike
 ID:   36459
 Updated by:   [EMAIL PROTECTED]
 Reported By:  muhtarov at oviont dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Windows 2000 SP4
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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

Works as expected for me.


Previous Comments:


[2006-02-21 09:27:18] muhtarov at oviont dot ru

?php

/**
 * Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n
 *
 * @linkhttp://bugs.php.net/bug.php?id=36459
 * @charset ANSI
 */

error_reporting(E_ALL);
ini_set('session.use_trans_sid', 1);
ini_set('session.use_cookies', 0);
ini_set('session.name', 'sid');
session_start();

?
html
  head
titleBug #36459 Incorrect adding PHPSESSID to links, which
contains \r\n/title
  /head
  body
pSee source html code/p
a href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2
   style=font: normal 11pt Times New Romanincorrect link/abr
/
br /
a href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2
style=font: normal 11pt Times New Romancorrect link/a
  /body
/html



[2006-02-20 15:25:28] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2006-02-20 10:39:30] muhtarov at oviont dot ru

Description:

There is problem while adding PHPSESSID to links, which contain \r\n
after some attribute.

Part of my .htaccess file:

php_value session.use_trans_sid 1
php_value session.name sid


Reproduce code:
---
a href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2
sid=brvsemsd03-ynw9wn4
style=font: normal 9pt Times New Romantest/a

Expected result:

a
href=/b2w/www/ru/adm/pages/?action=prevrec_id=8pid=2sid=brvsemsd03-ynw9wn4
style=font: normal 9pt Times New Romantest/a






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


#36471 [Opn-Fbk]: iconv_mime_encode segmentation fault

2006-02-21 Thread mike
 ID:   36471
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chen dot daqi at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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

Works fine here (tm):
string(49) Subject: =?UTF-8?B?VGhpcyBpcyBlbmNvZGUgdBCyjQg=?=


Previous Comments:


[2006-02-21 09:37:41] chen dot daqi at gmail dot com

Description:

Hi, when I set $preferences['line-length'] = -1, 
iconv_mime_encode will get segmentation fault on linux.

Reproduce code:
---
?php
$preferences = array(
scheme = B,
input-charset = ISO8859-1,
output-charset = UTF-8,
line-length = 76,
line-break-chars = \n
);

$preferences[line-length] = -1;
var_dump(iconv_mime_encode(Subject, This is encode test ,
$preferences));
?


Expected result:

Just a warning of line-length can't be less than 0

Actual result:
--
Segmentation fault





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


#36472 [Fbk-Opn]: Memory fault

2006-02-21 Thread Eskil dot Swahn at LDC dot lu dot se
 ID:   36472
 User updated by:  Eskil dot Swahn at LDC dot lu dot se
 Reported By:  Eskil dot Swahn at LDC dot lu dot se
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Tru64 UNIX V5.1B
 PHP Version:  4.4.2
 New Comment:

I have generated a core file and I am waiting on help from HP on how to
handle the debugger. My session so far:

dbx version 5.1
Type 'help' for help.
Core file created by program httpd

thread 0x4 signal Segmentation fault at *[strcmp, 0x3ff800d8334]  
ldq_u   t1, 0(a1)
(dbx) help
  Command syntax:  help keyword,  keyword is one of the following
list:

most_used, quit, alias, record, playback, history, lineedit, run, 
rerun, stop, step, next, trace, delete, catch, ignore, 
cont, return, when, goto, print, printx, printo, printd, 
printf, printregs, where, status, whatis, which, whereis, assign, 
tag, up, down, func, dump, display, list, search, 
edit, file, use, set, setenv, sh, stopi, conti, 
stepi, nexti, tracei, listobj, enable, disable, kernel, tlist, 
tset, tstack, call, attach, detach, plist, switch, variable, 
register, builtin, expression

(dbx) trace
trace
 ^ syntax error
(dbx) help trace
trace exp- print exp when it changes
trace exp at line  - print exp when line is reached
trace exp in proc  - print exp when call proc
trace exp at line if exp - print exp when line is reached and
exp
trace exp in proc if exp - print exp when call proc and
exp
(dbx) quit


Does this help in any way so far?


Previous Comments:


[2006-02-21 11:17:43] [EMAIL PROTECTED]

No, you're on your own for that... but your best bet would be to start
apache in single process mode (-X) in the debugger and then request
your script. The debugging should capture it when it segfaults and i
guess there is a command to make a backtrace then.



[2006-02-21 11:12:28] Eskil dot Swahn at LDC dot lu dot se

Checked the instructions for generating a backtrace.

Any chance of instructions for T64's dbx instead of gdb?



[2006-02-21 10:51:03] [EMAIL PROTECTED]

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

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



[2006-02-21 10:44:34] Eskil dot Swahn at LDC dot lu dot se

Description:

I have failed to upgrade our PHP-installation on Tru64 UNIX to 4.4.1 or
4.4.2 (successful on Linux and Solaris).

When I try to restart Apache after copying a new libphp4.so I get a
crash which only lists the following:

bin/apachectl: 814341 Memory fault
bin/apachectl startssl: httpd could not be started

This setup has worked flawlessly upto 4.4.0 but both 4.4.1 and 4.4.2
triggers this behaviour.

Config:

./configure  --with-apache=../apache_1.3.33
--with-prefix=/usr/local/php
--with-oci8=/usr/users/dba/oracle/product/9.2.0 --with-openssl

I can find no further information in any of Apache's logfiles.

This is a setup with Apache 1.3.33 and mod_ssl 2.8.22.






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


#36472 [Opn]: Memory fault

2006-02-21 Thread Eskil dot Swahn at LDC dot lu dot se
 ID:   36472
 User updated by:  Eskil dot Swahn at LDC dot lu dot se
 Reported By:  Eskil dot Swahn at LDC dot lu dot se
 Status:   Open
 Bug Type: Apache related
 Operating System: Tru64 UNIX V5.1B
 PHP Version:  4.4.2
 New Comment:

Something that was interesting as well was that 'httpd -X' doesn't
coredump, it's not until I run 'apachectl startssl' that I trigger the
memory fault..


Previous Comments:


[2006-02-21 15:05:52] Eskil dot Swahn at LDC dot lu dot se

I have generated a core file and I am waiting on help from HP on how to
handle the debugger. My session so far:

dbx version 5.1
Type 'help' for help.
Core file created by program httpd

thread 0x4 signal Segmentation fault at *[strcmp, 0x3ff800d8334]  
ldq_u   t1, 0(a1)
(dbx) help
  Command syntax:  help keyword,  keyword is one of the following
list:

most_used, quit, alias, record, playback, history, lineedit, run, 
rerun, stop, step, next, trace, delete, catch, ignore, 
cont, return, when, goto, print, printx, printo, printd, 
printf, printregs, where, status, whatis, which, whereis, assign, 
tag, up, down, func, dump, display, list, search, 
edit, file, use, set, setenv, sh, stopi, conti, 
stepi, nexti, tracei, listobj, enable, disable, kernel, tlist, 
tset, tstack, call, attach, detach, plist, switch, variable, 
register, builtin, expression

(dbx) trace
trace
 ^ syntax error
(dbx) help trace
trace exp- print exp when it changes
trace exp at line  - print exp when line is reached
trace exp in proc  - print exp when call proc
trace exp at line if exp - print exp when line is reached and
exp
trace exp in proc if exp - print exp when call proc and
exp
(dbx) quit


Does this help in any way so far?



[2006-02-21 11:17:43] [EMAIL PROTECTED]

No, you're on your own for that... but your best bet would be to start
apache in single process mode (-X) in the debugger and then request
your script. The debugging should capture it when it segfaults and i
guess there is a command to make a backtrace then.



[2006-02-21 11:12:28] Eskil dot Swahn at LDC dot lu dot se

Checked the instructions for generating a backtrace.

Any chance of instructions for T64's dbx instead of gdb?



[2006-02-21 10:51:03] [EMAIL PROTECTED]

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

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



[2006-02-21 10:44:34] Eskil dot Swahn at LDC dot lu dot se

Description:

I have failed to upgrade our PHP-installation on Tru64 UNIX to 4.4.1 or
4.4.2 (successful on Linux and Solaris).

When I try to restart Apache after copying a new libphp4.so I get a
crash which only lists the following:

bin/apachectl: 814341 Memory fault
bin/apachectl startssl: httpd could not be started

This setup has worked flawlessly upto 4.4.0 but both 4.4.1 and 4.4.2
triggers this behaviour.

Config:

./configure  --with-apache=../apache_1.3.33
--with-prefix=/usr/local/php
--with-oci8=/usr/users/dba/oracle/product/9.2.0 --with-openssl

I can find no further information in any of Apache's logfiles.

This is a setup with Apache 1.3.33 and mod_ssl 2.8.22.






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


#36476 [NEW]: fwrite count by 2 with img src=

2006-02-21 Thread mdulay at millersville dot edu
From: mdulay at millersville dot edu
Operating system: Solaris 10/ HPUX 11
PHP version:  5.1.2
PHP Bug Type: Filesystem function related
Bug description:  fwrite count by 2 with img src=

Description:

The issue occurs on both PHP4 and PHP5 and on 2 different OS, HPUX 11 and
Solaris 10. I have a simple counter that reads a file adds 1 and rewrites
the file. After a good bit of frustration I found that there was a missing
img src= in the HTML. It didn't matter where the PHP was whether it
preceeded the HTML or was inline, the counter still added 2 each time it
was called upon. Of course I have fixed the HTML, however the tie between
a missing image and the PHP has me perplexed. The code I have attached has
been simplified the situation however the initial code was using includes
and the missing image was not easily detected.

Reproduce code:
---
?
$counterfile=count.txt;
$conn=fopen($counterfile,'r');
$count=trim(fgets($conn));
echo :.$count.:;
++$count;
fclose($conn);
$conn=fopen($counterfile,'w');
fwrite($conn,$count);
fclose($conn);
echo :.$count.:;

?
html
body
img src= 
/body
/html


Expected result:

A missing image with a counter that increments by 1.

Actual result:
--
Counter that has incremented by 2 and a missing image.

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


#36477 [NEW]: Exceptions break debug_backtrace()

2006-02-21 Thread ch at westend dot com
From: ch at westend dot com
Operating system: Linux
PHP version:  5.1.2
PHP Bug Type: Scripting Engine problem
Bug description:  Exceptions break debug_backtrace()

Description:

After calling throw new Exception(..) and entering the
function registered with set_exception_handler() the 
debug_backtrace() output is empty.

This is very inconvinient for self written error handling functions as
trigger_error() for example works fine for debug_backtrace.

I'm aware that the exception itself contains a stack trace
but is there really a reason to empty debug_backtrace()?


Reproduce code:
---
?php

function exception_handler($e) { debug_print_backtrace(); }

function c() { throw new Exception(Problem!); }
function b() { c(); }
function a() { b(); }

set_exception_handler('exception_handler');
a();

?


Expected result:

Backtrace with
#1 exception_handler from c()
#2 c() from b()
#3 b() from a()
#4 a() from main



Actual result:
--
#0  exception_handler(Exception Object ([] = Problem!,[] = ,[] = 0,[]
= /home/ch/tt.php,[] = 5,[] = Array ([0] = Array ([file] =
/home/ch/tt.php,[line] = 6,[function] = c,[args] = Array ()),[1] =
Array ([file] = /home/ch/tt.php,[line] = 7,[function] = b,[args] =
Array ()),[2] = Array ([file] = /home/ch/tt.php,[line] = 10,[function]
= a,[args] = Array () called at [(null):0]


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


#36458 [Opn-Csd]: function sleep accept negative value

2006-02-21 Thread iliaa
 ID:   36458
 Updated by:   [EMAIL PROTECTED]
 Reported By:  quick_defect at yahoo dot com
-Status:   Open
+Status:   Closed
 Bug Type: Unknown/Other Function
 Operating System: redhat
 PHP Version:  5.1.2
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2006-02-21 09:19:00] quick_defect at yahoo dot com

But I see that the behavior of function usleep reasonable this time:
warning messages are given and exit endless sleep.But why function
sleep remains? PLS fix it.



[2006-02-21 09:14:04] quick_defect at yahoo dot com

Nothing diffrent...the same as before



[2006-02-20 08:20:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2006-02-20 04:24:46] quick_defect at yahoo dot com

Description:

First,if given negative value, I have to interrupt the execution of
scripts because it sleep for very long time.(I did not exactly know how
long)
Second,if given a int which cause overflow, it also do not work very
well.

Reproduce code:
---
sleep(-1);
$max=mt_getrandmax();
$of=-$max-2;
sleep($of);

Expected result:

exception or turn it to a legal value

Actual result:
--
sleep for a very long time






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


#36478 [NEW]: error_log( ), cannot log to file when reaches 2GB. PHP give no responce.

2006-02-21 Thread uzair at infinilogic dot com
From: uzair at infinilogic dot com
Operating system: Linux 2.4.x
PHP version:  4.4.2
PHP Bug Type: Reproducible crash
Bug description:  error_log( ), cannot log to file when reaches 2GB. PHP give 
no responce.

Description:

Get a 2GB file in any of your file system say ./iolog-default

then execute the script with php commandline ...

?
error_log(this is a test message,3,./iolog-default);
?

I am using XFS, and checked creating larger files from other programs.

Reproduce code:
---
?
error_log(this is a test message,3,./iolog-default);
?


Expected result:

It should log more then 2GB file .. the OS supports it. I am using XFS,
and checked creating larger files from other programs.

Actual result:
--
It doesnot log any byte after 2GB file size.

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


#36479 [NEW]: fread using 99% CPU in Windows with SSL Connection

2006-02-21 Thread joel dot washburn at gmail dot com
From: joel dot washburn at gmail dot com
Operating system: Windows (Any)
PHP version:  5.1.2
PHP Bug Type: Sockets related
Bug description:  fread using 99% CPU in Windows with SSL Connection

Description:

php.exe uses 99% CPU while polling SSL sockets for data.  I can reproduce
this issue in IIS and Apache using php5isapi.dll and php5apache2.dll.

This is a nightmare for php scripts using third party API calls via SSL
sockets.  If the API call takes a few seconds to run, the CPU is maxed out
waiting on a response.

This is not an issue on linux systems.

This is not an issue on Windows using clean sockets (only SSL).



Reproduce code:
---
Below is a simple way to reproduce the problem with fgets():

Create two files, one (timer.php) has to be accessable from the web
(HTTP and HTTPS) and the other can be ran from the command prompt
(pingtimer.php).  When you run pingtimer.php using SSL, php.exe will
stick at 99% CPU in Task Manager.  When you run it using clean sockets,
its idle while waiting for a response.

timer.php :
?php
sleep(10);
print htmlbody10 sec. are up!/body/html;
?

pingtimer.php:
?php
//$sock = fsockopen(localhost, 80);
$sock = fsockopen(ssl://localhost, 443);

$query = GET /timer.php HTTP/1.1\r\n;
$query .= Host: localhost\r\n;
$query .= Connection: Close\r\n\r\n;

fwrite($sock, $query);
while (!feof($sock)) {
echo fgets($sock, 128);
}
fclose($sock);
? 

Expected result:

CPU usage should be very little or zero while waiting for a response.

Actual result:
--
99% CPU usage in Windows Task Manager from php.exe while waiting on a
response.

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


#36480 [NEW]: OpenSSL Memory Leaks

2006-02-21 Thread polone at townnews dot com
From: polone at townnews dot com
Operating system: RedHat FC4
PHP version:  4.4.2
PHP Bug Type: OpenSSL related
Bug description:  OpenSSL Memory Leaks

Description:

The OpenSSL extension in PHP leaks memory. Using valgrind, I was able to
determine that there is a consistent leak of about 20K. There are two
leaks, one is the result of calling SSL_get_ex_new_index() during MINIT
which doesn't supply any mechanism for free_func (according to the
prototype). The other leak, which accounts for about 19K, is from loading
error strings but not calling the relevant free() function.

Another problem was noticed in network.c. There is a call to
SSL_CTX_new(), but no corresponding SSL_CTX_free() when the socket is
closed. Because the pointer for ctx is localized, the original pointer is
lost - using SSL_get_SSL_CTX() allows you to retrieve the context and free
it properly before call SSL_free() during socket close.

I've included a patch which corrects two of the issues:

diff -Naur php-4.4.2/ext/openssl/openssl.c
php-fixed/ext/openssl/openssl.c
--- php-4.4.2/ext/openssl/openssl.c 2006-01-01 07:46:55.0
-0600
+++ php-4.4.2/ext/openssl/openssl.c 2006-02-21 10:45:32.0
-0600
@@ -651,6 +651,7 @@
  */
 PHP_MSHUTDOWN_FUNCTION(openssl)
 {
+ ERR_free_strings();
  EVP_cleanup();
  return SUCCESS;
 }
diff -Naur php-4.4.2/main/network.c php-fixed/main/network.c
--- php-4.4.2/main/network.c  2006-01-01 07:46:59.0 -0600
+++ php-4.4.2/main/network.c  2006-02-21 10:45:27.0 -0600
@@ -1091,11 +1091,14 @@

  if (close_handle) {
 #ifdef HAVE_OPENSSL_EXT
+
 if (sock-ssl_active) {
SSL_shutdown(sock-ssl_handle);
sock-ssl_active = 0;
 }
 if (sock-ssl_handle) {
+   SSL_CTX *ctx = SSL_get_SSL_CTX(sock-ssl_handle);
+   SSL_CTX_free(ctx);
SSL_free(sock-ssl_handle);
sock-ssl_handle = NULL;
 }


Reproduce code:
---
?php

readfile(https://secure.townnews.com/;);

?

Expected result:

No memory leaks.

Actual result:
--
==2610==
==2610== ERROR SUMMARY: 8076 errors from 411 contexts (suppressed: 0 from
0)
==2610== malloc/free: in use at exit: 25,224 bytes in 1,608 blocks.
==2610== malloc/free: 7,727 allocs, 6,119 frees, 555,906 bytes allocated.
==2610== For counts of detected errors, rerun with: -v
==2610== searching for pointers to 1,608 not-freed blocks.
==2610== checked 607,512 bytes.
==2610==
==2610==
==2610== 28 bytes in 1 blocks are possibly lost in loss record 1 of 6
==2610==at 0x40211F9: malloc (vg_replace_malloc.c:149)
==2610==by 0x441DED4: strdup (in /lib/libc-2.3.5.so)
==2610==by 0x8153FD5: (within /usr/bin/php)
==2610==by 0x8155BB5: php_module_startup (in /usr/bin/php)
==2610==by 0x819F4A9: main (in /usr/bin/php)
==2610==
==2610==
==2610== 1,220 (248 direct, 972 indirect) bytes in 1 blocks are definitely
lost in loss record 2 of 6
==2610==at 0x40211F9: malloc (vg_replace_malloc.c:149)
==2610==by 0x4221B69: (within /lib/libcrypto.so.0.9.7f)
==2610==by 0x4222110: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7f)
==2610==by 0x41DF1D9: SSL_CTX_new (in /lib/libssl.so.0.9.7f)
==2610==by 0x81668C3: php_stream_sock_ssl_activate_with_method (in
/usr/bin/php)
==2610==by 0x8119CDD: php_stream_url_wrap_http_ex (in /usr/bin/php)
==2610==by 0x811B51F: php_stream_url_wrap_http (in /usr/bin/php)
==2610==by 0x81656FB: _php_stream_open_wrapper_ex (in /usr/bin/php)
==2610==by 0x80E0FF0: zif_readfile (in /usr/bin/php)
==2610==by 0x8198E71: execute (in /usr/bin/php)
==2610==by 0x8186581: zend_execute_scripts (in /usr/bin/php)
==2610==by 0x8156BE1: php_execute_script (in /usr/bin/php)
==2610==
==2610==
==2610== 460 bytes in 12 blocks are indirectly lost in loss record 3 of 6
==2610==at 0x40211F9: malloc (vg_replace_malloc.c:149)
==2610==by 0x4221B69: (within /lib/libcrypto.so.0.9.7f)
==2610==by 0x4222110: CRYPTO_malloc (in /lib/libcrypto.so.0.9.7f)
==2610==by 0x41E0172: ssl_cert_new (in /lib/libssl.so.0.9.7f)
==2610==by 0x41DF2D0: SSL_CTX_new (in /lib/libssl.so.0.9.7f)
==2610==by 0x81668C3: php_stream_sock_ssl_activate_with_method (in
/usr/bin/php)
==2610==by 0x8119CDD: php_stream_url_wrap_http_ex (in /usr/bin/php)
==2610==by 0x811B51F: php_stream_url_wrap_http (in /usr/bin/php)
==2610==by 0x81656FB: _php_stream_open_wrapper_ex (in /usr/bin/php)
==2610==by 0x80E0FF0: zif_readfile (in /usr/bin/php)
==2610==by 0x8198E71: execute (in /usr/bin/php)
==2610==by 0x8186581: zend_execute_scripts (in /usr/bin/php)
==2610==
==2610==
==2610== 512 bytes in 2 blocks are indirectly lost in loss record 4 of 6
==2610==at 0x40212ED: realloc (vg_replace_malloc.c:306)
==2610==by 0x4221B94: (within /lib/libcrypto.so.0.9.7f)
==2610==by 0x42221E3: CRYPTO_realloc (in /lib/libcrypto.so.0.9.7f)
==2610==by 0x426C6AF: sk_insert (in /lib/libcrypto.so.0.9.7f)
==2610==by 0x426C7B9: sk_push (in 

#36475 [Bgs-Csd]: Call by reference fails for objects

2006-02-21 Thread elmar dot hinz at team-red dot net
 ID:   36475
 User updated by:  elmar dot hinz at team-red dot net
 Reported By:  elmar dot hinz at team-red dot net
-Status:   Bogus
+Status:   Closed
 Bug Type: Class/Object related
 Operating System: Linux/Debian
 PHP Version:  5.1.2
 New Comment:

It is not the behaviour what I would expect, but indeed no bug. So what
happens in detail? Short analysis of the 2 steps:

1.) On function call $ref get's an alias to the outside variable
$callback. 

2.) Before any alterations on this double named variable happen, $ref
is made an alias to a second variable $object (and gives up the fist
variable in the same moment).

Result: $callback and $object are not aliased to each other this way.


Previous Comments:


[2006-02-21 13:50:32] [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

Think again about your code.




[2006-02-21 13:12:14] elmar dot hinz at team-red dot net

Description:

Cannot access original objects by call by reference.

function tryCallback($ref){
  $ref = $this-object;  
}


Only a copies work:

function tryCallback($ref){
  $ref = $this-object;  
}


Reproduce code:
---
?php
class myObject{ var $value = 'The original value'; }
function tryCallback($ref){
  global $object;
  $ref = $object;  // in a class it would be: $ref = $this-object;
  dump($ref, 'Before the proplem: The object is still here but will
fail from outside.');
}
function dump($var, $name){
  print 'p  style=background:#ee;' . $name . '/p';
  if($var){ print 'pre style=color:green'; print_r($var); print
'/pre'; }
  else{ print 'p style=color:redstrong$var is
empty!!!/strong/p'; }
}
$object = new myObject();
tryCallback($callback);
dump($callback, 'Here the object is missing in my test.');
$callback-value = 'Try to set a value.';
dump($callback, 'Ooops, what a funny object now.');
dump($object, 'This is the original object. Unaltered. No reference was
created.');
?

Expected result:

Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

myObject Object
(
[value] = The original value
)

[...]

Actual result:
--
Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

$var is empty!!!

[...]





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


#36427 [Ver]: proc_open() / proc_close() leak handles on Windows XP

2006-02-21 Thread pgj at ds-fr dot com
 ID:   36427
 User updated by:  pgj at ds-fr dot com
 Reported By:  pgj at ds-fr dot com
 Status:   Verified
 Bug Type: Program Execution
 Operating System: windows XP SP2 Windows 2000 SP4
-PHP Version:  4.4.2
+PHP Version:  4.4.2/5.1.2
 New Comment:

Same problem with php 5.1.2


Previous Comments:


[2006-02-19 01:38:59] [EMAIL PROTECTED]

While I can reproduce the problem, I couldn't spot the error at first
sight, because the code is very complex (and without valgrind even
worst..)



[2006-02-17 15:35:06] pgj at ds-fr dot com

Description:

I launch processes in a script and put stout in file
after more than 2000 processes and can't open a new one and have this
message.
It's similar with 30743 bit it uses 2 pipes for $fileDescriptors and in
this case it's a pipe and a file 


Reproduce code:
---
?
set_time_limit(6000);
$i=0;
mkdir(test);
while(1)
{
  $i++;
echo(-$i--\n);
invoke($i);
}
function invoke($i)
{
$commandLine = echo hello;
$fileDescriptors = array(
1 = array(pipe, r),
2 = array(file, test/$i.txt,w)
);
$pipes = array();
$processHandle  = proc_open($commandLine,$fileDescriptors, $pipes);
if (is_resource($processHandle))
{
fclose($pipes[1]);
proc_close($processHandle);
}
}



Expected result:

Open a new one

Actual result:
--
bWarning/b:  proc_open(test/2587.txt): failed to open stream: Too
many open files in bE:\cotcot\leak.php/b on line b24/bbr /





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


#36481 [NEW]: POST Method not allowed

2006-02-21 Thread whey2shy_xx at yahoo dot com
From: whey2shy_xx at yahoo dot com
Operating system: Windows XP
PHP version:  5.1.2
PHP Bug Type: *General Issues
Bug description:  POST Method not allowed

Description:

all of my php files with the method= POST wont run, when i click submit on
a form, this is the result:

Method Not Allowed
The requested method POST is not allowed for the URL
/magDemos/magazineDemo3/calcInvoice.php.

even if i create a new file with very simple code, it says the same.. all
my files with the method post wont allow it to post. is there something
wrong when i installed php?

Expected result:

i want the method post to be allowed


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


#36481 [Opn-Fbk]: POST Method not allowed

2006-02-21 Thread bjori
 ID:   36481
 Updated by:   [EMAIL PROTECTED]
 Reported By:  whey2shy_xx at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows XP
 PHP Version:  5.1.2
 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:


[2006-02-21 19:33:50] whey2shy_xx at yahoo dot com

Description:

all of my php files with the method= POST wont run, when i click submit
on a form, this is the result:

Method Not Allowed
The requested method POST is not allowed for the URL
/magDemos/magazineDemo3/calcInvoice.php.

even if i create a new file with very simple code, it says the same..
all my files with the method post wont allow it to post. is there
something wrong when i installed php?

Expected result:

i want the method post to be allowed






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


#36473 [Fbk-Opn]: Foreign Images w/getimagesize() crash Apache2

2006-02-21 Thread punkpuke at terraimpetus dot com
 ID:   36473
 User updated by:  punkpuke at terraimpetus dot com
 Reported By:  punkpuke at terraimpetus dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows XP Pro
 PHP Version:  4.4.2
 New Comment:

I would love to help, however those instructions aren't detailed enough
for me to do anything.  I need to know the exact files I need and where
to put them.  I'm sorry, I'm not that smart. :(


Previous Comments:


[2006-02-21 13:52:32] [EMAIL PROTECTED]

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

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

Works fine here.



[2006-02-21 10:50:07] punkpuke at terraimpetus dot com

Description:

When accessing foreign URLs with getimagesize(), apache server crashes
with:

szAppName : Apache.exe szAppVer : 2.0.55.0 szModName :
php4ts.dll 
szModVer : 4.4.2.2 offset : 000c5fca

-
The only changes made to the PHP.ini file were the enabling/removing
the comment in front of the GD2 and the ZIP, DLL extensions.

Server is running as a test environment on localhost.

Reproduce code:
---
?php
getimagesize('images/example.gif');  //Works Fine (Local)
getimagesize('example.jpg'); //Works Fine
//The following crash the Entire Apache server, no matter where they're
used
getimagesize('http://example.com/example/example.jpg');//Crashes 
getimagesize('http://example.com/example.jpg'); //Crashes 
getimagesize('http://example.com/example.gif'); //Crashes
@getimagesize('http://example.com/example.gif'); //Crashes
?

Expected result:

Apache 2 Servers lags for a slight moment, then crashes 100% of the
time that a page using a foreign URL call to getimagesize() is run.






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


#36482 [NEW]: Garbage Collector - bug with circular references.

2006-02-21 Thread K dot Londenberg at librics dot de
From: K dot Londenberg at librics dot de
Operating system: Linux 2.6.12-1-386
PHP version:  5.1.2
PHP Bug Type: Scripting Engine problem
Bug description:  Garbage Collector - bug with circular references.

Description:

The PHP Garbage Collector fails to free objects which are unreachable if
they contain circular references to each other.

The example script does not provoke an out of memory error, but I have
some cases where a script hits the memory limit, even if there are loads
of unreachable objects to be finalized. 

Sorry, but the example code has 32 lines. I guess it won't break your big
repository anyway.

Compare what happens if you run the example script as it is, and what
happens if you uncomment the line containing
$bigd-subdata-subdata = $bigd;

If you want to test this script in a PHP Engine without large memory
limits, just lower the numbers.

BTW - this is a real problem and does happen quite frequently. All you
need is some kind of circular reference between some objects, and
everything referenced by those objects won't be cleared by the Garbage
Collector until script termination.

Reproduce code:
---
?php
// This Test case demonstrates a bug where the PHP Garbage Collector
fails
// to release objects which are unreachable but contain circular
references.

  class bigdata {
private $data;
public $subdata;
public function __construct($entries) {
$this-data = array();
echo Creating BIGDATA with $entries entries\n;
if ($entries=1000) {
$this-subdata = new bigdata($entries/2);
}
for ($i=0;$i$entries;$i++) { $this-data[] = $i; }
}
public function __destruct() {
echo Destroyed BIGDATA with .count($this-data).
entries\n;
}
}
  echo PRE;
  echo Creating bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Removing reference to bigdata\n;flush();
  $bigd = null;
  echo Creating new bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Creating circular reference. \n;flush();
  //$bigd-subdata-subdata = $bigd; // If you omit this statement, the
Gargabe collector will destroy everything as it should. 
  echo Removing all global references to bigdata\n;flush();
  $bigd = null;
  echo Now, exiting\n;flush();
  exit; 
?

Expected result:

PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Now, exiting

Actual result:
--
PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Now, exiting
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries

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


#36482 [Opn]: Garbage Collector - bug with circular references.

2006-02-21 Thread K dot Londenberg at librics dot de
 ID:   36482
 User updated by:  K dot Londenberg at librics dot de
 Reported By:  K dot Londenberg at librics dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.6.12-1-386
 PHP Version:  5.1.2
 New Comment:

By accident, I posted the *working* version as example code. To provoke
the bug, you need to uncomment the line containing
$bigd-subdata-subdata = $bigd;


Previous Comments:


[2006-02-21 20:30:18] K dot Londenberg at librics dot de

Description:

The PHP Garbage Collector fails to free objects which are unreachable
if they contain circular references to each other.

The example script does not provoke an out of memory error, but I have
some cases where a script hits the memory limit, even if there are
loads of unreachable objects to be finalized. 

Sorry, but the example code has 32 lines. I guess it won't break your
big repository anyway.

Compare what happens if you run the example script as it is, and what
happens if you uncomment the line containing
$bigd-subdata-subdata = $bigd;

If you want to test this script in a PHP Engine without large memory
limits, just lower the numbers.

BTW - this is a real problem and does happen quite frequently. All you
need is some kind of circular reference between some objects, and
everything referenced by those objects won't be cleared by the Garbage
Collector until script termination.

Reproduce code:
---
?php
// This Test case demonstrates a bug where the PHP Garbage
Collector fails
// to release objects which are unreachable but contain circular
references.

  class bigdata {
private $data;
public $subdata;
public function __construct($entries) {
$this-data = array();
echo Creating BIGDATA with $entries entries\n;
if ($entries=1000) {
$this-subdata = new bigdata($entries/2);
}
for ($i=0;$i$entries;$i++) { $this-data[] = $i; }
}
public function __destruct() {
echo Destroyed BIGDATA with .count($this-data).
entries\n;
}
}
  echo PRE;
  echo Creating bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Removing reference to bigdata\n;flush();
  $bigd = null;
  echo Creating new bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Creating circular reference. \n;flush();
  //$bigd-subdata-subdata = $bigd; // If you omit this statement, the
Gargabe collector will destroy everything as it should. 
  echo Removing all global references to bigdata\n;flush();
  $bigd = null;
  echo Now, exiting\n;flush();
  exit; 
?

Expected result:

PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Now, exiting

Actual result:
--
PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Now, exiting
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries





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


#31850 [Com]: ftp+ssl isn't working

2006-02-21 Thread pmorton at cobizinc dot com
 ID:   31850
 Comment by:   pmorton at cobizinc dot com
 Reported By:  speedy444 at hotmail dot com
 Status:   No Feedback
 Bug Type: FTP related
 Operating System: win2k
 PHP Version:  5.0.3
 New Comment:

This issue is not fixed. I have recently recompiled snapshot
php5.1-200602211930.tar.gz for win32. I would be happy to help
troubleshoot this issue


Previous Comments:


[2005-03-20 18:08:39] [EMAIL PROTECTED]

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





[2005-02-28 20:47:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-02-05 02:02:26] speedy444 at hotmail dot com

Description:

short example script:

?
$fp = ftp_ssl_connect(some.ftp.server);
ftp_login($fp,blaat,test);
ftp_close($fp);
?

I compiled php with vc++ 6 using the latest openssl. But when I try to
use ftp_ssl_connect + ftp_login I get this error:
PHP Warning:  ftp_login(): SSL/TLS handshake failed in justascript.php
on line 204
PHP Warning:  ftp_login(): AUTH TLS successful in justascript.php on
line 204

And after that the connection is still open but the ssl layer isn't
active. 









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


#36482 [Opn]: Garbage Collector - bug with circular references.

2006-02-21 Thread K dot Londenberg at librics dot de
 ID:   36482
 User updated by:  K dot Londenberg at librics dot de
 Reported By:  K dot Londenberg at librics dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.6.12-1-386
 PHP Version:  5.1.2
 New Comment:

Verified with latest CVS Source Snapshot (5.1-200602211930)
of the 5.1x series:
http://snaps.php.net/php5.1-200602211930.tar.gz
Built On: Feb 21, 2006 19:30 GMT

Built with these options:
./configure --prefix=/opt/test --without-apache --disable-pdo
--without-sqlite  --without-pear

php --version returns the following:

PHP 5.1.3-dev (cgi) (built: Feb 21 2006 21:14:14)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


Previous Comments:


[2006-02-21 20:32:59] K dot Londenberg at librics dot de

By accident, I posted the *working* version as example code. To provoke
the bug, you need to uncomment the line containing
$bigd-subdata-subdata = $bigd;



[2006-02-21 20:30:18] K dot Londenberg at librics dot de

Description:

The PHP Garbage Collector fails to free objects which are unreachable
if they contain circular references to each other.

The example script does not provoke an out of memory error, but I have
some cases where a script hits the memory limit, even if there are
loads of unreachable objects to be finalized. 

Sorry, but the example code has 32 lines. I guess it won't break your
big repository anyway.

Compare what happens if you run the example script as it is, and what
happens if you uncomment the line containing
$bigd-subdata-subdata = $bigd;

If you want to test this script in a PHP Engine without large memory
limits, just lower the numbers.

BTW - this is a real problem and does happen quite frequently. All you
need is some kind of circular reference between some objects, and
everything referenced by those objects won't be cleared by the Garbage
Collector until script termination.

Reproduce code:
---
?php
// This Test case demonstrates a bug where the PHP Garbage
Collector fails
// to release objects which are unreachable but contain circular
references.

  class bigdata {
private $data;
public $subdata;
public function __construct($entries) {
$this-data = array();
echo Creating BIGDATA with $entries entries\n;
if ($entries=1000) {
$this-subdata = new bigdata($entries/2);
}
for ($i=0;$i$entries;$i++) { $this-data[] = $i; }
}
public function __destruct() {
echo Destroyed BIGDATA with .count($this-data).
entries\n;
}
}
  echo PRE;
  echo Creating bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Removing reference to bigdata\n;flush();
  $bigd = null;
  echo Creating new bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Creating circular reference. \n;flush();
  //$bigd-subdata-subdata = $bigd; // If you omit this statement, the
Gargabe collector will destroy everything as it should. 
  echo Removing all global references to bigdata\n;flush();
  $bigd = null;
  echo Now, exiting\n;flush();
  exit; 
?

Expected result:

PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Now, exiting

Actual result:
--
PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Now, exiting
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries





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


#36103 [Com]: ftp ssl connection fails during login

2006-02-21 Thread pmorton at cobizinc dot com
 ID:   36103
 Comment by:   pmorton at cobizinc dot com
 Reported By:  rebe at unit01 dot net
 Status:   No Feedback
 Bug Type: FTP related
 Operating System: linux
 PHP Version:  5.1.2
 Assigned To:  tony2001
 New Comment:

This is still an issue. I would be willing to work with a developer to
resolve this issue.


Previous Comments:


[2006-02-07 01:00:04] php-bugs at lists dot php dot net

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



[2006-01-30 08:52:20] [EMAIL PROTECTED]

OK, so looks like your patch is also working properly.
Sorry, I didn't get that.
Does my patch work without any modifications?



[2006-01-29 16:27:01] [EMAIL PROTECTED]

Tony, don't forget this. :)



[2006-01-27 22:03:06] rebe at unit01 dot net

OK, so looks like your patch is also working properly. Just give me a
couple of days - maybe 'till the middle of the next week to check
everything again because I am a little bit busy now doing different
work. 

I want to really confirm that this is a final sollution, so you could
apply that patch into official PHP release.

It is my first subbmission and I am glad to have really active and
collaborating PHP development team :)



[2006-01-24 10:50:40] [EMAIL PROTECTED]

Frankly - your patch is doing 99% percent the same thing
Yes, it does.

}while(errcode == 0  !SSL_is_init_finished(ftp-ssl_handle));
we didn't use that in our fix.
So does it work without that check?



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

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


#36472 [Opn-Fbk]: Memory fault

2006-02-21 Thread mike
 ID:   36472
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Eskil dot Swahn at LDC dot lu dot se
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Tru64 UNIX V5.1B
 PHP Version:  4.4.2


Previous Comments:


[2006-02-21 15:07:02] Eskil dot Swahn at LDC dot lu dot se

Something that was interesting as well was that 'httpd -X' doesn't
coredump, it's not until I run 'apachectl startssl' that I trigger the
memory fault..



[2006-02-21 15:05:52] Eskil dot Swahn at LDC dot lu dot se

I have generated a core file and I am waiting on help from HP on how to
handle the debugger. My session so far:

dbx version 5.1
Type 'help' for help.
Core file created by program httpd

thread 0x4 signal Segmentation fault at *[strcmp, 0x3ff800d8334]  
ldq_u   t1, 0(a1)
(dbx) help
  Command syntax:  help keyword,  keyword is one of the following
list:

most_used, quit, alias, record, playback, history, lineedit, run, 
rerun, stop, step, next, trace, delete, catch, ignore, 
cont, return, when, goto, print, printx, printo, printd, 
printf, printregs, where, status, whatis, which, whereis, assign, 
tag, up, down, func, dump, display, list, search, 
edit, file, use, set, setenv, sh, stopi, conti, 
stepi, nexti, tracei, listobj, enable, disable, kernel, tlist, 
tset, tstack, call, attach, detach, plist, switch, variable, 
register, builtin, expression

(dbx) trace
trace
 ^ syntax error
(dbx) help trace
trace exp- print exp when it changes
trace exp at line  - print exp when line is reached
trace exp in proc  - print exp when call proc
trace exp at line if exp - print exp when line is reached and
exp
trace exp in proc if exp - print exp when call proc and
exp
(dbx) quit


Does this help in any way so far?



[2006-02-21 11:17:43] [EMAIL PROTECTED]

No, you're on your own for that... but your best bet would be to start
apache in single process mode (-X) in the debugger and then request
your script. The debugging should capture it when it segfaults and i
guess there is a command to make a backtrace then.



[2006-02-21 11:12:28] Eskil dot Swahn at LDC dot lu dot se

Checked the instructions for generating a backtrace.

Any chance of instructions for T64's dbx instead of gdb?



[2006-02-21 10:51:03] [EMAIL PROTECTED]

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

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



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

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


#36473 [Opn-Fbk]: Foreign Images w/getimagesize() crash Apache2

2006-02-21 Thread mike
 ID:   36473
 Updated by:   [EMAIL PROTECTED]
 Reported By:  punkpuke at terraimpetus dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP Pro
 PHP Version:  4.4.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-02-21 20:04:02] punkpuke at terraimpetus dot com

I would love to help, however those instructions aren't detailed enough
for me to do anything.  I need to know the exact files I need and where
to put them.  I'm sorry, I'm not that smart. :(



[2006-02-21 13:52:32] [EMAIL PROTECTED]

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

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

Works fine here.



[2006-02-21 10:50:07] punkpuke at terraimpetus dot com

Description:

When accessing foreign URLs with getimagesize(), apache server crashes
with:

szAppName : Apache.exe szAppVer : 2.0.55.0 szModName :
php4ts.dll 
szModVer : 4.4.2.2 offset : 000c5fca

-
The only changes made to the PHP.ini file were the enabling/removing
the comment in front of the GD2 and the ZIP, DLL extensions.

Server is running as a test environment on localhost.

Reproduce code:
---
?php
getimagesize('images/example.gif');  //Works Fine (Local)
getimagesize('example.jpg'); //Works Fine
//The following crash the Entire Apache server, no matter where they're
used
getimagesize('http://example.com/example/example.jpg');//Crashes 
getimagesize('http://example.com/example.jpg'); //Crashes 
getimagesize('http://example.com/example.gif'); //Crashes
@getimagesize('http://example.com/example.gif'); //Crashes
?

Expected result:

Apache 2 Servers lags for a slight moment, then crashes 100% of the
time that a page using a foreign URL call to getimagesize() is run.






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


#36476 [Opn-Bgs]: fwrite count by 2 with img src=

2006-02-21 Thread mike
 ID:   36476
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mdulay at millersville dot edu
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Solaris 10/ HPUX 11
 PHP Version:  5.1.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2006-02-21 15:22:09] mdulay at millersville dot edu

Description:

The issue occurs on both PHP4 and PHP5 and on 2 different OS, HPUX 11
and Solaris 10. I have a simple counter that reads a file adds 1 and
rewrites the file. After a good bit of frustration I found that there
was a missing img src= in the HTML. It didn't matter where the PHP
was whether it preceeded the HTML or was inline, the counter still
added 2 each time it was called upon. Of course I have fixed the HTML,
however the tie between a missing image and the PHP has me perplexed.
The code I have attached has been simplified the situation however the
initial code was using includes and the missing image was not easily
detected.

Reproduce code:
---
?
$counterfile=count.txt;
$conn=fopen($counterfile,'r');
$count=trim(fgets($conn));
echo :.$count.:;
++$count;
fclose($conn);
$conn=fopen($counterfile,'w');
fwrite($conn,$count);
fclose($conn);
echo :.$count.:;

?
html
body
img src= 
/body
/html


Expected result:

A missing image with a counter that increments by 1.

Actual result:
--
Counter that has incremented by 2 and a missing image.





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


#36475 [Csd-Bgs]: Call by reference fails for objects

2006-02-21 Thread mike
 ID:   36475
 Updated by:   [EMAIL PROTECTED]
 Reported By:  elmar dot hinz at team-red dot net
-Status:   Closed
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Linux/Debian
 PHP Version:  5.1.2
 New Comment:

Not a bug - Bogus.


Previous Comments:


[2006-02-21 18:10:57] elmar dot hinz at team-red dot net

It is not the behaviour what I would expect, but indeed no bug. So what
happens in detail? Short analysis of the 2 steps:

1.) On function call $ref get's an alias to the outside variable
$callback. 

2.) Before any alterations on this double named variable happen, $ref
is made an alias to a second variable $object (and gives up the fist
variable in the same moment).

Result: $callback and $object are not aliased to each other this way.



[2006-02-21 13:50:32] [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

Think again about your code.




[2006-02-21 13:12:14] elmar dot hinz at team-red dot net

Description:

Cannot access original objects by call by reference.

function tryCallback($ref){
  $ref = $this-object;  
}


Only a copies work:

function tryCallback($ref){
  $ref = $this-object;  
}


Reproduce code:
---
?php
class myObject{ var $value = 'The original value'; }
function tryCallback($ref){
  global $object;
  $ref = $object;  // in a class it would be: $ref = $this-object;
  dump($ref, 'Before the proplem: The object is still here but will
fail from outside.');
}
function dump($var, $name){
  print 'p  style=background:#ee;' . $name . '/p';
  if($var){ print 'pre style=color:green'; print_r($var); print
'/pre'; }
  else{ print 'p style=color:redstrong$var is
empty!!!/strong/p'; }
}
$object = new myObject();
tryCallback($callback);
dump($callback, 'Here the object is missing in my test.');
$callback-value = 'Try to set a value.';
dump($callback, 'Ooops, what a funny object now.');
dump($object, 'This is the original object. Unaltered. No reference was
created.');
?

Expected result:

Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

myObject Object
(
[value] = The original value
)

[...]

Actual result:
--
Dump 1:

myObject Object
(
[value] = The original value
)

Dump 2:

$var is empty!!!

[...]





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


#36483 [NEW]: phpize php_autoconf security fix

2006-02-21 Thread david at davidfavor dot com
From: david at davidfavor dot com
Operating system: RedHat EL-4
PHP version:  5.1.2
PHP Bug Type: Feature/Change Request
Bug description:  phpize php_autoconf security fix

Description:

Since I've only installed PHP the first time, please
route this the the correct place.

There are many reports that resemble this:

   /usr/local/bin/phpize:
   /tmp/tmpEcSnL3/apd-1.0.1/build/shtool:
   /bin/sh: bad interpreter: Permission denied
   Cannot find autoconf. Please check your autoconf
   installation and the $PHP_AUTOCONF environment
   variable is set correctly and then rerun this script.

   ERROR: `phpize' failed

The problem is the pear command seems to be be violate
usual security precautions.

That is mounting /tmp with the noexec option disallows
the execution of /tmp/*/shtool. The fix seems to be
maybe checking the executability of scripts on /tmp
first and prompting the user for an alternative
directory first.

The ugly work around is to change /etc/fstab to allow
/tmp files to be executed... Shudder...

Reproduce code:
---
1) In /etc/fstab:

   /dev/hda3 /tmp ext3 defaults,noexec 1 0

2) reboot

3) pear install pecl/pdflib


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


#36103 [NoF-Opn]: ftp ssl connection fails during login

2006-02-21 Thread rebe at unit01 dot net
 ID:   36103
 User updated by:  rebe at unit01 dot net
 Reported By:  rebe at unit01 dot net
-Status:   No Feedback
+Status:   Open
 Bug Type: FTP related
 Operating System: linux
 PHP Version:  5.1.2
 Assigned To:  tony2001
 New Comment:

OK, so while i am little but less busy i checked everything again and
it looks like both of patches solving problem while connecting to some
ftp servers but not everywhere. I am not very clever with that network
knowledge but i guess it is still something about blocking/nonblocking
sockets.

Whole mess i produced before, that one patch is working and second not
was about different ftp servers i checked.

Now i have my own ftp server configured and TLS is required on it
connect. I checked again with lftp client and it's working.

Started again from scratch to compile PHP 5.1.2 
(./configure --with-apxs --enable-ftp --enable-pcntl --with-mysql
--enable-sockets --with-openssl)

With Tony's patch and got that:
--
Warning: ftp_login(): SSL/TLS handshake failed in /root/ftptest.php on
line 5

Warning: ftp_login(): AUTH TLS successful in /root/ftptest.php on line
5
login failed 
--


With my patch:
--
Segmentation fault
--

So, if i can help anyhow to give you more info (i.e. strace or
something) let me know. I still really need to get this work.


Previous Comments:


[2006-02-21 22:43:10] pmorton at cobizinc dot com

This is still an issue. I would be willing to work with a developer to
resolve this issue.



[2006-02-07 01:00:04] php-bugs at lists dot php dot net

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



[2006-01-30 08:52:20] [EMAIL PROTECTED]

OK, so looks like your patch is also working properly.
Sorry, I didn't get that.
Does my patch work without any modifications?



[2006-01-29 16:27:01] [EMAIL PROTECTED]

Tony, don't forget this. :)



[2006-01-27 22:03:06] rebe at unit01 dot net

OK, so looks like your patch is also working properly. Just give me a
couple of days - maybe 'till the middle of the next week to check
everything again because I am a little bit busy now doing different
work. 

I want to really confirm that this is a final sollution, so you could
apply that patch into official PHP release.

It is my first subbmission and I am glad to have really active and
collaborating PHP development team :)



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

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


#36484 [NEW]: Overloading bug

2006-02-21 Thread dave at dgx dot cz
From: dave at dgx dot cz
Operating system: Windows XP
PHP version:  5.1.2
PHP Bug Type: Class/Object related
Bug description:  Overloading bug

Description:

Overloading results in unexpectable behaviour when using two arrays in
overloaded object.

Reproduce code:
---
// basic overloading usage

class Test {
private 
$vars = array(),
$vars2 = array();

function __get($name)
{
   return $this-vars[$name]; 
}


function __set($name, $value)
{
$this-vars[$name] = $value;
}

// initialize new variable
function add($name, $value)
{
$this-vars[$name] = $value;

// this second array is not used anymore - but it causes error
$this-vars2[$name] = $value;
}
}


$obj = new Test();   
$obj-add('order', array(0, 1, 2));

// first test
$obj-order[2] = $obj-order[1]; 
print_r($obj); 

// second test
$obj-order[0] = 99;
print_r($obj); 

Expected result:

// first test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 1
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)

// second test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 99
[1] = 1
[2] = 1
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)



Actual result:
--
// first test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)

)

// second test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 99
[1] = 1
[2] = 2
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 99
[1] = 1
[2] = 2
)

)

)



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


#36471 [Fbk-Opn]: iconv_mime_encode segmentation fault

2006-02-21 Thread chen dot daqi at gmail dot com
 ID:   36471
 User updated by:  chen dot daqi at gmail dot com
 Reported By:  chen dot daqi at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

Hi, I have tried php5.1-latest.tar.gz on linux, but it also got
segmentation fault. You may need to check it on linux.


Previous Comments:


[2006-02-21 14:01:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Works fine here (tm):
string(49) Subject: =?UTF-8?B?VGhpcyBpcyBlbmNvZGUgdBCyjQg=?=



[2006-02-21 09:37:41] chen dot daqi at gmail dot com

Description:

Hi, when I set $preferences['line-length'] = -1, 
iconv_mime_encode will get segmentation fault on linux.

Reproduce code:
---
?php
$preferences = array(
scheme = B,
input-charset = ISO8859-1,
output-charset = UTF-8,
line-length = 76,
line-break-chars = \n
);

$preferences[line-length] = -1;
var_dump(iconv_mime_encode(Subject, This is encode test ,
$preferences));
?


Expected result:

Just a warning of line-length can't be less than 0

Actual result:
--
Segmentation fault





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


#36481 [Com]: POST Method not allowed

2006-02-21 Thread judas dot iscariote at gmail dot com
 ID:   36481
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  whey2shy_xx at yahoo dot com
 Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows XP
 PHP Version:  5.1.2
 New Comment:

this is most likely a webserver misconfuguration, not a PHP bug...


Previous Comments:


[2006-02-21 19:39:17] [EMAIL PROTECTED]

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.






[2006-02-21 19:33:50] whey2shy_xx at yahoo dot com

Description:

all of my php files with the method= POST wont run, when i click submit
on a form, this is the result:

Method Not Allowed
The requested method POST is not allowed for the URL
/magDemos/magazineDemo3/calcInvoice.php.

even if i create a new file with very simple code, it says the same..
all my files with the method post wont allow it to post. is there
something wrong when i installed php?

Expected result:

i want the method post to be allowed






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


#36478 [Com]: error_log( ), cannot log to file when reaches 2GB. PHP give no responce.

2006-02-21 Thread judas dot iscariote at gmail dot com
 ID:   36478
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  uzair at infinilogic dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux 2.4.x
 PHP Version:  4.4.2
 New Comment:

did you recompile PHP with large File support ??

http://php.net/filesystem


Previous Comments:


[2006-02-21 17:40:41] uzair at infinilogic dot com

Description:

Get a 2GB file in any of your file system say ./iolog-default

then execute the script with php commandline ...

?
error_log(this is a test message,3,./iolog-default);
?

I am using XFS, and checked creating larger files from other programs.

Reproduce code:
---
?
error_log(this is a test message,3,./iolog-default);
?


Expected result:

It should log more then 2GB file .. the OS supports it. I am using XFS,
and checked creating larger files from other programs.

Actual result:
--
It doesnot log any byte after 2GB file size.





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


#36482 [Opn-Bgs]: Garbage Collector - bug with circular references.

2006-02-21 Thread tony2001
 ID:   36482
 Updated by:   [EMAIL PROTECTED]
 Reported By:  K dot Londenberg at librics dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.6.12-1-386
 PHP Version:  5.1.2
 New Comment:

See bug #33595.


Previous Comments:


[2006-02-21 21:26:16] K dot Londenberg at librics dot de

Verified with latest CVS Source Snapshot (5.1-200602211930)
of the 5.1x series:
http://snaps.php.net/php5.1-200602211930.tar.gz
Built On: Feb 21, 2006 19:30 GMT

Built with these options:
./configure --prefix=/opt/test --without-apache --disable-pdo
--without-sqlite  --without-pear

php --version returns the following:

PHP 5.1.3-dev (cgi) (built: Feb 21 2006 21:14:14)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies



[2006-02-21 20:32:59] K dot Londenberg at librics dot de

By accident, I posted the *working* version as example code. To provoke
the bug, you need to uncomment the line containing
$bigd-subdata-subdata = $bigd;



[2006-02-21 20:30:18] K dot Londenberg at librics dot de

Description:

The PHP Garbage Collector fails to free objects which are unreachable
if they contain circular references to each other.

The example script does not provoke an out of memory error, but I have
some cases where a script hits the memory limit, even if there are
loads of unreachable objects to be finalized. 

Sorry, but the example code has 32 lines. I guess it won't break your
big repository anyway.

Compare what happens if you run the example script as it is, and what
happens if you uncomment the line containing
$bigd-subdata-subdata = $bigd;

If you want to test this script in a PHP Engine without large memory
limits, just lower the numbers.

BTW - this is a real problem and does happen quite frequently. All you
need is some kind of circular reference between some objects, and
everything referenced by those objects won't be cleared by the Garbage
Collector until script termination.

Reproduce code:
---
?php
// This Test case demonstrates a bug where the PHP Garbage
Collector fails
// to release objects which are unreachable but contain circular
references.

  class bigdata {
private $data;
public $subdata;
public function __construct($entries) {
$this-data = array();
echo Creating BIGDATA with $entries entries\n;
if ($entries=1000) {
$this-subdata = new bigdata($entries/2);
}
for ($i=0;$i$entries;$i++) { $this-data[] = $i; }
}
public function __destruct() {
echo Destroyed BIGDATA with .count($this-data).
entries\n;
}
}
  echo PRE;
  echo Creating bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Removing reference to bigdata\n;flush();
  $bigd = null;
  echo Creating new bigdata\n;flush();
  $bigd = new bigdata(1000);
  echo Creating circular reference. \n;flush();
  //$bigd-subdata-subdata = $bigd; // If you omit this statement, the
Gargabe collector will destroy everything as it should. 
  echo Removing all global references to bigdata\n;flush();
  $bigd = null;
  echo Now, exiting\n;flush();
  exit; 
?

Expected result:

PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Now, exiting

Actual result:
--
PRECreating bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Removing reference to bigdata
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries
Creating new bigdata
Creating BIGDATA with 1000 entries
Creating BIGDATA with 500 entries
Creating circular reference. 
Removing all global references to bigdata
Now, exiting
Destroyed BIGDATA with 1000 entries
Destroyed BIGDATA with 500 entries





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


#36479 [Opn-Fbk]: fread using 99% CPU in Windows with SSL Connection

2006-02-21 Thread tony2001
 ID:   36479
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joel dot washburn at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows (Any)
 PHP Version:  5.1.2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2006-02-21 18:03:09] joel dot washburn at gmail dot com

Description:

php.exe uses 99% CPU while polling SSL sockets for data.  I can
reproduce this issue in IIS and Apache using php5isapi.dll and
php5apache2.dll.

This is a nightmare for php scripts using third party API calls via SSL
sockets.  If the API call takes a few seconds to run, the CPU is maxed
out waiting on a response.

This is not an issue on linux systems.

This is not an issue on Windows using clean sockets (only SSL).



Reproduce code:
---
Below is a simple way to reproduce the problem with fgets():

Create two files, one (timer.php) has to be accessable from the web
(HTTP and HTTPS) and the other can be ran from the command prompt
(pingtimer.php).  When you run pingtimer.php using SSL, php.exe will
stick at 99% CPU in Task Manager.  When you run it using clean
sockets,
its idle while waiting for a response.

timer.php :
?php
sleep(10);
print htmlbody10 sec. are up!/body/html;
?

pingtimer.php:
?php
//$sock = fsockopen(localhost, 80);
$sock = fsockopen(ssl://localhost, 443);

$query = GET /timer.php HTTP/1.1\r\n;
$query .= Host: localhost\r\n;
$query .= Connection: Close\r\n\r\n;

fwrite($sock, $query);
while (!feof($sock)) {
echo fgets($sock, 128);
}
fclose($sock);
? 

Expected result:

CPU usage should be very little or zero while waiting for a response.

Actual result:
--
99% CPU usage in Windows Task Manager from php.exe while waiting on a
response.





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


#36471 [Opn-Fbk]: iconv_mime_encode segmentation fault

2006-02-21 Thread tony2001
 ID:   36471
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chen dot daqi at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: linux
 PHP Version:  5.1.2
 New Comment:

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

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




Previous Comments:


[2006-02-22 02:36:42] chen dot daqi at gmail dot com

Hi, I have tried php5.1-latest.tar.gz on linux, but it also got
segmentation fault. You may need to check it on linux.



[2006-02-21 14:01:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Works fine here (tm):
string(49) Subject: =?UTF-8?B?VGhpcyBpcyBlbmNvZGUgdBCyjQg=?=



[2006-02-21 09:37:41] chen dot daqi at gmail dot com

Description:

Hi, when I set $preferences['line-length'] = -1, 
iconv_mime_encode will get segmentation fault on linux.

Reproduce code:
---
?php
$preferences = array(
scheme = B,
input-charset = ISO8859-1,
output-charset = UTF-8,
line-length = 76,
line-break-chars = \n
);

$preferences[line-length] = -1;
var_dump(iconv_mime_encode(Subject, This is encode test ,
$preferences));
?


Expected result:

Just a warning of line-length can't be less than 0

Actual result:
--
Segmentation fault





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


#36452 [Opn-Bgs]: cannot load php_mysql.dll or php_gd2.dll libraries after upgrading from 5.0.2

2006-02-21 Thread tony2001
 ID:   36452
 Updated by:   [EMAIL PROTECTED]
 Reported By:  redscourge at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: windows xp sp2
 PHP Version:  5.1.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2006-02-21 07:22:47] redscourge at gmail dot com

EDIT: my current PHP version is actually 5.0.4, now 5.0.2, not that it
matters.

if someone thinks it may be a good idea to check what other versions
above my current one i can use, then ill try it tomorrow, and get back
to you on what versions i can successfully install.



[2006-02-21 07:14:50] redscourge at gmail dot com

i tried this again today.

i moved all 5.0.2 files in c:\php5\ to a subfolder, and extracted the
new 5.1.2 files in their place. i then copied php5apache2.dll and
php5ts.dll to the apache folder, overwriting the older ones from php
5.0.2

i verified my configuration of the php.ini file, and although the
extension_dir, open_basedir, and extension=php_mysql.dll lines were set
up properly, and system environment variables were already in place due
to the previous version of php, WHICH WORKED, by the way, yet when i
load my front page, nothing happens, because the content is built after
some mysql queries are attempted.

i then kept the php 5.1.2 config file, and replaced only the php5ts.dll
and php5apache2.dll files in the apache config, and all files in the
c:\php5\ folder, with the original files, and poof! everything worked
once again.

so, i know the php.ini file works then, since it worked on one version
and not with the other, and the older version works perfectly fine in
every single way (even works with the php.ini file of a higher up
version too), which leads me to the inescapable conclusion that the
combination of the extracted files from the php 5.1.2 archive do not
work on my system, whereas the php 5.0.2 files do. this means it is not
my system to blame, not my config to blame, not php 5.0.2 to blame.

something has been changed between versions that makes it impossible to
access my mysql server thru my apache server.

environment:

-Microsoft Windows XP [Version 5.1.2600] (Professional)
-MySQL Server 4.18
-Apache HTTP Server 2.0.55
-php 5.0.2 / php 5.1.2

the only php-addon i install is PEAR, the version that comes with 5.0.2
i install on 5.0.2, and the version that comes with 5.1.2 i install with
5.1.2

i dont even use PEAR really, all i use is what ive stated above,
everything else i run is php scripts made by me that in no way affect
the settings of php, apache, or mysql, they just use them.

i would really, really, really like to know how to get around this
issue, because id like access to all the latest bugfixes and all that
good stuff.



[2006-02-21 02:49:47] redscourge at gmail dot com

here is the exact thing i did when i tried to upgrade:

stopped server, moved all php files that were in c:\php5\ into
c:\php5\old\, extracted all files from the zip file to c:\php5\.
renamed the php-dist.ini to php.ini and configured each setting as
needed, including open_basedir, extension_dir, uncommented the
php_mysql.dll and php_gd2.dll files, and other non important things
which i know for a fact are not causing an error.

copie php5apache2.dll and php5ts.dll to c:\program files\apache
group\apache2\, as well as the new php.ini file. no files relating to
php are/were in c:\windows\system32 folder, so there wasnt a problem
there.

started server, and i got these errors in the error.log:

PHP Warning:  PHP Startup: Unable to load dynamic library
'C:\\php5\\ext\\php_gd2.dll' - The specified module could not be
found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'C:\\php5\\ext\\php_mysql.dll' - The specified module could not be
found.\r\n in Unknown on line 0

although i verified that these files were infact there, and i made
certain that i reapplied all file permissions oh subfolders and files,
so apache infact should have had access to them.

all mysql related pages failed to load, and all non related ones
worked.

tried replacing the two previously mentioned dll files with the older
versions, didnt work. overwrote all old files ontop of all new files
including the ones in the apache folder, worked. tried overwriting the
new dll's overtop of the old 

#36455 [Opn-Fbk]: php_apache_shutdown_wrapper calls itself until segfault

2006-02-21 Thread tony2001
 ID:   36455
 Updated by:   [EMAIL PROTECTED]
 Reported By:  haleden at colorado dot edu
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: redhat 7
 PHP Version:  5.1.2
 New Comment:

Works perfectly fine for me and N millions of PHP users.
Apache 1.3.27 is very old, try to upgrade it first.
And decribe in details what exactly did you do to reproduce it.


Previous Comments:


[2006-02-19 21:03:48] haleden at colorado dot edu

oops, forgot to say that the changes go in:

sapi/apache/mod_php5.c

...
int php_apache_shutdown_wrapper(void)
{
apache_php_initialized = 0;
/*  apache_sapi_module.shutdown(apache_sapi_module);*/
php_apache_request_shutdown(apache_sapi_module);
...



[2006-02-19 20:54:47] haleden at colorado dot edu

Description:

there are a bunch of reports out there that have been 
labeled bogus that i bet were not.

i began to have problems starting apache 1.3.27 reliably 
after installing the php module.

i found that if i commented out the php module, apache would 
start. then, if i went in and uncommented the php module, 
and did a apachectl restart, things were fine.

i finally got some time to dig deeper, and ran it under gdb 
and found that it was crashing in a deep stack of nested 
calls to php_apache_shutdown_wrapper.

looking at the source, i see that 
php_apache_shutdown_wrapper calls 
apache_sapi_module.shutdown which is defined to be 
php_apache_shutdown_wrapper. i suspect that at one time 
apache_sapi_module.shutdown pointed to 
php_apache_request_shutdown and things worked until someone 
decided that the wrapper should be called but forgot to 
change the wrapper to call php_apache_request_shutdown.

as to why it was happening at startup, i conjecture that 
apache keeps track of modules in some way and if a module 
didn't shutdown cleanly before, it calls the shutdown hook 
to clean up before starting again. by starting it without 
the module, that check was cleared, and it would not run the 
shutdown hook the next time.

i'm not an expert at all of this stuff, but i made the 
change to the wrapper and it seems to work--further testing 
and sanity checking advised.

thanks,

hal


Reproduce code:
---
see above description for apache config changes

Expected result:

apache starts sucessfully each time when php module defined

Actual result:
--
apache doesn't always start successfully when php module 
defined





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


#36467 [Opn-Bgs]: odd safe_mode restriction and possible security concern

2006-02-21 Thread tony2001
 ID:   36467
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mike at silverservers dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: CentOS 4.2
 PHP Version:  4.4.2
 New Comment:

the script is NOT run as the user that calls the script (ie UID 502). 

The script is run as the linux file owner which is root (UID 0).
And you know that because  ?

safe_mode does NOT allow script.php (UID 0) to 
access files owned by user1 (UID 502).

Read about safe_mode, that's the whole point - to restrict access
between different virtual hosts owned by different users.


Previous Comments:


[2006-02-20 18:16:19] mike at silverservers dot com

Description:

I believe this is a bug in safe_mode.  I have posted this to newsgroups
but no one would touch it.

Scenario:
safe_mode On
safe_mode_gid = On
safe_mode_include_dir = /usr/local/custom/phpincludes/
safe_mode_exec_dir = /usr/local/custom/phpexec/

Notes:
1) phpexec contains .php scripts that are being access through an
apache alias:
 Alias /CustomScripts /usr/local/custom/phpexec/

2) for the example, all files in phpexec and phpincludes are owned by
root (0)

3) there are multiple apache process running under different UID's, for
example, as user1:user1 (502:502), as user2:user2 (505:505) etc.

Situation:
If a visitor to the website accesses the PHP script via
http://www.domainname.com/CustomScripts/script.php - even though the
permissions of the script are 755 (IE, world executable), the script is
NOT run as the user that calls the script (ie UID 502).  The script is
run as the linux file owner which is root (UID 0).  For whatever
reason this may be desired, but the problem is, that script.php is
supposed to access files owned by user1 (UID 502) -- however
safe_modedoes NOT allow script.php (UID 0) to access files owned by
user1 (UID 502).

To me, this seems ridiculous.  The reason the executables are even
placed in the /usr/local/custom/phpexec directory is to allow all
apache processes on the server to run the same scripts, without having
to install them individually in every instance.  They are owned by a
non-webserver user to prevent them from being modified via the web.

Now, since they are being forcibly executed as the non-web user, they
cannot access the actual webusers content.

It's like borrowing your neighbors lawnmower, but for some reason, it
won't cut your lawn.  It will let you cut his lawn.  It will let him
cut his lawn, but for some unknown reason, it won't work when you try
to use his lawnmower to cut your own lawn.

QUESTION:  Aside from some possible security concerns that come up with
this behavior, does this also qualify as a bug?






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


#36428 [Opn]: Incorrect error message for PDO::fetchAll

2006-02-21 Thread tony2001
 ID:   36428
 Updated by:   [EMAIL PROTECTED]
 Reported By:  stochnagara at hotmail dot com
 Status:   Open
-Bug Type: PDO related
+Bug Type: SimpleXML related
 Operating System: win xp
 PHP Version:  5CVS-2006-02-17 (snap)
 New Comment:

This error message comes from SimpleXML.
Reclassified.


Previous Comments:


[2006-02-17 16:35:27] stochnagara at hotmail dot com

Description:

Trying to fetch DB result into a SimpleXMLElement instance produces an
incorrect error message.

Reproduce code:
---
$q = new PDO('sqlite::memory:');
$q-exec (CREATE TABLE test (a));
$q-exec (INSERT INTO test (a) VALUES (1));
var_dump ($q-query (SELECT a FROM test)-fetchAll(PDO::FETCH_CLASS,
'SimpleXMLElement', array ('root/')));


Expected result:

Some consistent error message.

Actual result:
--

Warning:  PDOStatement::fetchAll() [function.fetchAll]: Node no longer
exists in c:\program files\apache
group\Apache\htdocs\standart\index.php on line 6

array(1) {
  [0]=
  object(SimpleXMLElement)#3 (0) {
  }
}






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


#36478 [Opn-Fbk]: error_log( ), cannot log to file when reaches 2GB. PHP give no responce.

2006-02-21 Thread tony2001
 ID:   36478
 Updated by:   [EMAIL PROTECTED]
 Reported By:  uzair at infinilogic dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Reproducible crash
+Bug Type: Unknown/Other Function
 Operating System: Linux 2.4.x
 PHP Version:  4.4.2


Previous Comments:


[2006-02-22 05:00:56] judas dot iscariote at gmail dot com

did you recompile PHP with large File support ??

http://php.net/filesystem



[2006-02-21 17:40:41] uzair at infinilogic dot com

Description:

Get a 2GB file in any of your file system say ./iolog-default

then execute the script with php commandline ...

?
error_log(this is a test message,3,./iolog-default);
?

I am using XFS, and checked creating larger files from other programs.

Reproduce code:
---
?
error_log(this is a test message,3,./iolog-default);
?


Expected result:

It should log more then 2GB file .. the OS supports it. I am using XFS,
and checked creating larger files from other programs.

Actual result:
--
It doesnot log any byte after 2GB file size.





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


#36477 [Opn-Asn]: Exceptions break debug_backtrace()

2006-02-21 Thread tony2001
 ID:   36477
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ch at westend dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2006-02-21 16:02:04] ch at westend dot com

Description:

After calling throw new Exception(..) and entering the
function registered with set_exception_handler() the 
debug_backtrace() output is empty.

This is very inconvinient for self written error handling functions as
trigger_error() for example works fine for debug_backtrace.

I'm aware that the exception itself contains a stack trace
but is there really a reason to empty debug_backtrace()?


Reproduce code:
---
?php

function exception_handler($e) { debug_print_backtrace(); }

function c() { throw new Exception(Problem!); }
function b() { c(); }
function a() { b(); }

set_exception_handler('exception_handler');
a();

?


Expected result:

Backtrace with
#1 exception_handler from c()
#2 c() from b()
#3 b() from a()
#4 a() from main



Actual result:
--
#0  exception_handler(Exception Object ([] = Problem!,[] = ,[] =
0,[] = /home/ch/tt.php,[] = 5,[] = Array ([0] = Array ([file] =
/home/ch/tt.php,[line] = 6,[function] = c,[args] = Array ()),[1] =
Array ([file] = /home/ch/tt.php,[line] = 7,[function] = b,[args] =
Array ()),[2] = Array ([file] = /home/ch/tt.php,[line] =
10,[function] = a,[args] = Array () called at [(null):0]






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


#36484 [Opn-Asn]: Overloading bug

2006-02-21 Thread tony2001
 ID:   36484
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dave at dgx dot cz
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows XP
 PHP Version:  5.1.2
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2006-02-22 02:06:00] dave at dgx dot cz

Description:

Overloading results in unexpectable behaviour when using two arrays in
overloaded object.

Reproduce code:
---
// basic overloading usage

class Test {
private 
$vars = array(),
$vars2 = array();

function __get($name)
{
   return $this-vars[$name]; 
}


function __set($name, $value)
{
$this-vars[$name] = $value;
}

// initialize new variable
function add($name, $value)
{
$this-vars[$name] = $value;

// this second array is not used anymore - but it causes error
$this-vars2[$name] = $value;
}
}


$obj = new Test();   
$obj-add('order', array(0, 1, 2));

// first test
$obj-order[2] = $obj-order[1]; 
print_r($obj); 

// second test
$obj-order[0] = 99;
print_r($obj); 

Expected result:

// first test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 1
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)

// second test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 99
[1] = 1
[2] = 1
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)



Actual result:
--
// first test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 0
[1] = 1
[2] = 2
)

)

)

// second test
Test Object
(
[vars:private] = Array
(
[order] = Array
(
[0] = 99
[1] = 1
[2] = 2
)

)

[vars2:private] = Array
(
[order] = Array
(
[0] = 99
[1] = 1
[2] = 2
)

)

)







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