#46015 [NEW]: Build fails with system gd.

2008-09-07 Thread Fedora at FamilleCollet dot com
From: Fedora at FamilleCollet dot com
Operating system: Linux (Fedora 9)
PHP version:  5.3.0alpha2
PHP Bug Type: GD related
Bug description:  Build fails with system gd.

Description:

Build fails when trying to use system GD

--with-gd=shared,/usr

This is because gdhelpers only provided by bundled library.

Trivial patch proposal :
--- ext/gd/gd.c.orig2008-09-07 08:53:38.0 +0200
+++ ext/gd/gd.c 2008-09-07 08:54:03.0 +0200
@@ -74,7 +74,9 @@
 #include gdfontmb.h /* 3 Medium bold font */
 #include gdfontl.h  /* 4 Large font */
 #include gdfontg.h  /* 5 Giant font */
+#if HAVE_GD_BUNDLED
 #include gdhelpers.h
+#endif
 
 #ifdef HAVE_GD_WBMP
 #include libgd/wbmp.h

Reproduce code:
---
make

Expected result:

Build complete.

Actual result:
--
Build failed.

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



#44729 [Com]: display_errors = Off not respected

2008-09-07 Thread php at jamesvalero dot com
 ID:   44729
 Comment by:   php at jamesvalero dot com
 Reported By:  hsbrown2 at verizon dot net
 Status:   No Feedback
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2008
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

I'm getting the same error with PHP 5.2.6 on Windows 2k3R2STD IIS
FastCGI

?php
phpinfo();
asdf
?

It shows the standard phpinfo(); output but at the very bottom it has
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 

This is what I have for display_errors:
Directive   Local Value Master Value
display_errors  Off Off


Here's my first segment
System  Windows NT CAINTDEV1 5.2 build 3790
Build Date  May 2 2008 18:01:20
Configure Command   cscript /nologo configure.js
--enable-snapshot-build --with-gd=shared
--with-extra-includes=C:\Program Files (x86)\Microsoft
SDK\Include;C:\PROGRA~2\MICROS~2\VC98\ATL\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\MFC\INCLUDE
--with-extra-libs=C:\Program Files (x86)\Microsoft
SDK\Lib;C:\PROGRA~2\MICROS~2\VC98\LIB;C:\PROGRA~2\MICROS~2\VC98\MFC\LIB
Server API  CGI/FastCGI
Virtual Directory Support   enabled
Configuration File (php.ini) Path   C:\WINDOWS
Loaded Configuration File   C:\WINDOWS\php.ini
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Debug Build no
Thread Safety   enabled
Zend Memory Manager enabled
IPv6 Supportenabled
Registered PHP Streams  php, file, data, http, ftp, compress.zlib, zip
Registered Stream Socket Transports tcp, udp
Registered Stream Filters   convert.iconv.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
zlib.*


Previous Comments:


[2008-05-02 01:00:01] 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.



[2008-04-24 10:44:21] [EMAIL PROTECTED]

That phpinfo() page is not accessible. Also, put something to cause a
notice to appear in the same script..



[2008-04-22 02:40:18] hsbrown2 at verizon dot net

After applying the latest snap
(http://snaps.php.net/win32/php5.2-win32-latest.zip) the issue
persists.

Here is the actual text from the log file:
[21-Apr-2008 19:22:06] PHP Warning:  Invalid argument supplied for
foreach() in
E:\wwwroot\components\com_comprofiler\plugin\user\plug_cbcore\cb.core.php
on line 240

You should be able to reach the phpinfo() via this link:
http://71.164.9.37/test.php

Please let me know directly via email if the link does not work, as it
is possible my ISP is blocking this. This is a test development server
and was never intended to be exposed to the Internet, however I have
unblocked port 80 for the purposes of investigating this issue.

Please note also that I would like to use an NTS build. Thread safety
is enabled on this snap.

Thank you



[2008-04-17 21:10:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

And please, use the binary distro instead of compiling yourself.
If the problem persists, please provide a live URL to the phpinfo().
Also provide the actual output in the log file.



[2008-04-16 02:26:23] hsbrown2 at verizon dot net

PHP Version 5.2.5 

System  Windows NT WINWEB1 6.0 build 6001  
Build Date  Nov 8 2007 23:32:05  
Configure Command  cscript /nologo configure.js
--enable-snapshot-build --with-gd=shared --disable-zts
--disable-isapi --disable-activescript  
Server API  CGI/FastCGI  
Virtual Directory Support  disabled  
Configuration File (php.ini) Path  C:\Windows  
Loaded Configuration File  C:\Windows\php.ini  
PHP API  20041225  
PHP Extension  20060613  
Zend Extension  220060519  
Debug Build  no  
Thread Safety  disabled  
Zend Memory Manager  enabled  
IPv6 Support  enabled  
Registered PHP Streams  php, file, data, http, ftp, compress.zlib,
compress.bzip2  
Registered Stream Socket Transports  tcp, udp  
Registered Stream Filters  convert.iconv.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
zlib.*, bzip2.*  

 This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
 

#44729 [Com]: display_errors = Off not respected

2008-09-07 Thread php at jamesvalero dot com
 ID:   44729
 Comment by:   php at jamesvalero dot com
 Reported By:  hsbrown2 at verizon dot net
 Status:   No Feedback
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2008
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

I also tried the latest version (PHP Version 5.2.7-dev) with the same
results.

It seems this is an error specific to FastCGI. When changing to
php5isapi.dll, display_errors works as expected. When switching to
php5-cgi.exe, display_errors still shows errors even when set to Off.

Both versions (5.2.7-dev and 5.2.6) have this problem.


Previous Comments:


[2008-09-07 08:28:06] php at jamesvalero dot com

I'm getting the same error with PHP 5.2.6 on Windows 2k3R2STD IIS
FastCGI

?php
phpinfo();
asdf
?

It shows the standard phpinfo(); output but at the very bottom it has
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 

This is what I have for display_errors:
Directive   Local Value Master Value
display_errors  Off Off


Here's my first segment
System  Windows NT CAINTDEV1 5.2 build 3790
Build Date  May 2 2008 18:01:20
Configure Command   cscript /nologo configure.js
--enable-snapshot-build --with-gd=shared
--with-extra-includes=C:\Program Files (x86)\Microsoft
SDK\Include;C:\PROGRA~2\MICROS~2\VC98\ATL\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\INCLUDE;C:\PROGRA~2\MICROS~2\VC98\MFC\INCLUDE
--with-extra-libs=C:\Program Files (x86)\Microsoft
SDK\Lib;C:\PROGRA~2\MICROS~2\VC98\LIB;C:\PROGRA~2\MICROS~2\VC98\MFC\LIB
Server API  CGI/FastCGI
Virtual Directory Support   enabled
Configuration File (php.ini) Path   C:\WINDOWS
Loaded Configuration File   C:\WINDOWS\php.ini
PHP API 20041225
PHP Extension   20060613
Zend Extension  220060519
Debug Build no
Thread Safety   enabled
Zend Memory Manager enabled
IPv6 Supportenabled
Registered PHP Streams  php, file, data, http, ftp, compress.zlib, zip
Registered Stream Socket Transports tcp, udp
Registered Stream Filters   convert.iconv.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
zlib.*



[2008-05-02 01:00:01] 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.



[2008-04-24 10:44:21] [EMAIL PROTECTED]

That phpinfo() page is not accessible. Also, put something to cause a
notice to appear in the same script..



[2008-04-22 02:40:18] hsbrown2 at verizon dot net

After applying the latest snap
(http://snaps.php.net/win32/php5.2-win32-latest.zip) the issue
persists.

Here is the actual text from the log file:
[21-Apr-2008 19:22:06] PHP Warning:  Invalid argument supplied for
foreach() in
E:\wwwroot\components\com_comprofiler\plugin\user\plug_cbcore\cb.core.php
on line 240

You should be able to reach the phpinfo() via this link:
http://71.164.9.37/test.php

Please let me know directly via email if the link does not work, as it
is possible my ISP is blocking this. This is a test development server
and was never intended to be exposed to the Internet, however I have
unblocked port 80 for the purposes of investigating this issue.

Please note also that I would like to use an NTS build. Thread safety
is enabled on this snap.

Thank you



[2008-04-17 21:10:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

And please, use the binary distro instead of compiling yourself.
If the problem persists, please provide a live URL to the phpinfo().
Also provide the actual output in the log file.



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

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



#28038 [Com]: Sent incorrect RCPT TO commands to SMTP server

2008-09-07 Thread renouard_roch at hotmail dot fr
 ID:   28038
 Comment by:   renouard_roch at hotmail dot fr
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32 only
 PHP Version:  5CVS, 6CVS (2008-08-27)
 New Comment:

cool


Previous Comments:


[2008-09-01 12:11:00] anon at anon dot com

Workaround is:

Set the following before calling the mail function:

ini_set('sendmail_from', '[EMAIL PROTECTED]);



[2008-04-17 16:04:39] kmax at live dot com

Issalys, you fix dont work and make no sense.
My suggestion is get some free email class (like XPertMailer) and use
it instead of mail() native function.



[2008-01-13 17:31:36] issalys at hotmail dot com

hi i have de same problem and i fix it in that way:

$headers = From:  . $fm_snd['from'] . ( Some guy)\n; 


it work perfect :p by



Hola tuve el mismo problema y lo solucione asi 

$headers = From:  . $fm_snd['from'] . ( quiern sea)\n; 


funcionoo :p by



[2007-06-28 00:38:36] [EMAIL PROTECTED]

It's propably not complicated to fix but there just isn't anyone with
enough interest to do it. Feel free to provide a patch and perhaps
someone might catch on it. Or pay someone serious cash to fix it..



[2007-02-23 14:24:43] business at ziu dot de

This bug is now open since THREE YEARS. And still the version of today
(5.2.1) can not talk to SMTP servers as it should do.
This can not be so complicated to fix.



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

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



#46016 [NEW]: display_errors = Off doesn't work

2008-09-07 Thread php at jamesvalero dot com
From: php at jamesvalero dot com
Operating system: Windows 2003 R2 STD
PHP version:  5.2.6
PHP Bug Type: PHP options/info functions
Bug description:  display_errors = Off doesn't work

Description:

The box is a W2k3 R2 STD using IIS. The error seems to be related to
FastCGI as display_errors works when using php5isapi.dll.

phpinfo(); shows that c:\windows\php.ini is being loaded and
display_errors is off in both Local  Master under PHP Core.

Again, this occurs when using php-cgi.exe

Reproduce code:
---
?php
phpinfo();
asdf
?

Expected result:

Show only normal phpinfo(); output

Actual result:
--
The normal phpinfo(); output and 

PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.domain.com\public_html\phpinfo.php on line 4 


FWIW, when enabling display_errors, I get more errors


Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 

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



#46016 [Opn]: display_errors = Off doesn't work

2008-09-07 Thread php at jamesvalero dot com
 ID:   46016
 User updated by:  php at jamesvalero dot com
 Reported By:  php at jamesvalero dot com
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 2003 R2 STD
 PHP Version:  5.2.6
 New Comment:

I replied in another similar bug report but it looked like it was
already closed. Does replying in closed bugs, where I am not the owner,
re-open stale bug reports?

Thanks


Previous Comments:


[2008-09-07 09:30:07] php at jamesvalero dot com

note on the differences in the domain name: I forgot to edit the name
in the error output. Is it possible to modify the original post?



[2008-09-07 09:28:49] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.





[2008-09-07 09:18:02] php at jamesvalero dot com

Description:

The box is a W2k3 R2 STD using IIS. The error seems to be related to
FastCGI as display_errors works when using php5isapi.dll.

phpinfo(); shows that c:\windows\php.ini is being loaded and
display_errors is off in both Local  Master under PHP Core.

Again, this occurs when using php-cgi.exe

Reproduce code:
---
?php
phpinfo();
asdf
?

Expected result:

Show only normal phpinfo(); output

Actual result:
--
The normal phpinfo(); output and 

PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.domain.com\public_html\phpinfo.php on line 4 


FWIW, when enabling display_errors, I get more errors


Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 





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



#46016 [Opn]: display_errors = Off doesn't work

2008-09-07 Thread php at jamesvalero dot com
 ID:   46016
 User updated by:  php at jamesvalero dot com
 Reported By:  php at jamesvalero dot com
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 2003 R2 STD
 PHP Version:  5.2.6
 New Comment:

http://bugs.php.net/bug.php?id=44729 is the report in question. Is this
the same submission you were referring to?


Previous Comments:


[2008-09-07 09:32:28] php at jamesvalero dot com

I replied in another similar bug report but it looked like it was
already closed. Does replying in closed bugs, where I am not the owner,
re-open stale bug reports?

Thanks



[2008-09-07 09:30:07] php at jamesvalero dot com

note on the differences in the domain name: I forgot to edit the name
in the error output. Is it possible to modify the original post?



[2008-09-07 09:28:49] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.





[2008-09-07 09:18:02] php at jamesvalero dot com

Description:

The box is a W2k3 R2 STD using IIS. The error seems to be related to
FastCGI as display_errors works when using php5isapi.dll.

phpinfo(); shows that c:\windows\php.ini is being loaded and
display_errors is off in both Local  Master under PHP Core.

Again, this occurs when using php-cgi.exe

Reproduce code:
---
?php
phpinfo();
asdf
?

Expected result:

Show only normal phpinfo(); output

Actual result:
--
The normal phpinfo(); output and 

PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.domain.com\public_html\phpinfo.php on line 4 


FWIW, when enabling display_errors, I get more errors


Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 





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



#46015 [Opn-Asn]: Build fails with system gd.

2008-09-07 Thread pajoye
 ID:   46015
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Fedora at FamilleCollet dot com
-Status:   Open
+Status:   Assigned
 Bug Type: GD related
 Operating System: Linux (Fedora 9)
 PHP Version:  5.3.0alpha2
-Assigned To:  
+Assigned To:  pajoye


Previous Comments:


[2008-09-07 07:21:45] Fedora at FamilleCollet dot com

Description:

Build fails when trying to use system GD

--with-gd=shared,/usr

This is because gdhelpers only provided by bundled library.

Trivial patch proposal :
--- ext/gd/gd.c.orig2008-09-07 08:53:38.0 +0200
+++ ext/gd/gd.c 2008-09-07 08:54:03.0 +0200
@@ -74,7 +74,9 @@
 #include gdfontmb.h /* 3 Medium bold font */
 #include gdfontl.h  /* 4 Large font */
 #include gdfontg.h  /* 5 Giant font */
+#if HAVE_GD_BUNDLED
 #include gdhelpers.h
+#endif
 
 #ifdef HAVE_GD_WBMP
 #include libgd/wbmp.h

Reproduce code:
---
make

Expected result:

Build complete.

Actual result:
--
Build failed.





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



#46013 [Opn-Sus]: problem with zip php functions and symbolic links

2008-09-07 Thread pajoye
 ID:   46013
 Updated by:   [EMAIL PROTECTED]
 Reported By:  black-cod3 at live dot com
-Status:   Open
+Status:   Suspended
 Bug Type: Output Control
 Operating System: linux
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Symbolic links are not yet supported (extra flags/fields).


Previous Comments:


[2008-09-06 20:56:29] black-cod3 at live dot com

Also note that when zipping the symbolic link using php code as:

?php
$zip = new ZipArchive;
$res = $zip-open('indx.zip', ZipArchive::CREATE);
if ($res === TRUE) {
$zip-addFile('indx');
$zip-close();
echo 'ok';
} else {
echo 'failed';
}
?

also the result after extracting indx.zip with the above php extracting
code:

indx



[2008-09-06 20:43:13] black-cod3 at live dot com

Description:

When using the zip php functions to extract or read a zip file
containing a symbolic link (ex: indx -
/home/myuser/public_html/index.html) it fails to extract the original
symbolic link it only returned the link name and it's contents is the
symbolic link path.


ln -s /home/myuser/public_html/index.html indx;ls -la 
28672300 lrwxrwxrwx  1 myuser mygroup   35 Sep  6 13:41 indx -
/home/myuser/public_html/index.html

zip -y indx.zip indx;ls -la 
28672300 lrwxrwxrwx  1 myuser mygroup   35 Sep  6 13:41 indx -
/home/myuser/public_html/index.html
28672304 -rw-r--r--  1 myuser mygroup  175 Sep  6 14:50 indx.zip

extracting php code to the indx.zip as following: 


Reproduce code:
---
?php
$zip = new ZipArchive;
if ($zip-open('indx.zip') === TRUE) {
$zip-extractTo('/home/myuser/public_html/');
$zip-close();
echo 'done';
} else {
echo 'failed';
}
?

Expected result:

expected to be extracted as :

indx - /home/myuser/public_html/index.html

Actual result:
--
but actual reslult is :

indx

and the contents of indx is :

/home/myuser/public_html/index.html


Thx for your attention and hope to know if there is a different coding
method to zip a symbolic link by php zip functions or the above code was
expected to works well?





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



#46016 [Bgs-Opn]: display_errors = Off doesn't work

2008-09-07 Thread php at jamesvalero dot com
 ID:   46016
 User updated by:  php at jamesvalero dot com
 Reported By:  php at jamesvalero dot com
-Status:   Bogus
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 2003 R2 STD
 PHP Version:  5.2.6
 New Comment:

note on the differences in the domain name: I forgot to edit the name
in the error output. Is it possible to modify the original post?


Previous Comments:


[2008-09-07 09:28:49] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.





[2008-09-07 09:18:02] php at jamesvalero dot com

Description:

The box is a W2k3 R2 STD using IIS. The error seems to be related to
FastCGI as display_errors works when using php5isapi.dll.

phpinfo(); shows that c:\windows\php.ini is being loaded and
display_errors is off in both Local  Master under PHP Core.

Again, this occurs when using php-cgi.exe

Reproduce code:
---
?php
phpinfo();
asdf
?

Expected result:

Show only normal phpinfo(); output

Actual result:
--
The normal phpinfo(); output and 

PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.domain.com\public_html\phpinfo.php on line 4 


FWIW, when enabling display_errors, I get more errors


Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 





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



#46016 [Opn]: display_errors = Off doesn't work

2008-09-07 Thread php at jamesvalero dot com
 ID:   46016
 User updated by:  php at jamesvalero dot com
 Reported By:  php at jamesvalero dot com
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 2003 R2 STD
 PHP Version:  5.2.6
 New Comment:

Correction: Calling the linked report closed may have been
misleading. A better way of asking should have been: Are reports tagged
with No Feedback still looked at when new comments are submitted by
other members of the community?


Previous Comments:


[2008-09-07 09:34:48] php at jamesvalero dot com

http://bugs.php.net/bug.php?id=44729 is the report in question. Is this
the same submission you were referring to?



[2008-09-07 09:32:28] php at jamesvalero dot com

I replied in another similar bug report but it looked like it was
already closed. Does replying in closed bugs, where I am not the owner,
re-open stale bug reports?

Thanks



[2008-09-07 09:30:07] php at jamesvalero dot com

note on the differences in the domain name: I forgot to edit the name
in the error output. Is it possible to modify the original post?



[2008-09-07 09:28:49] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.





[2008-09-07 09:18:02] php at jamesvalero dot com

Description:

The box is a W2k3 R2 STD using IIS. The error seems to be related to
FastCGI as display_errors works when using php5isapi.dll.

phpinfo(); shows that c:\windows\php.ini is being loaded and
display_errors is off in both Local  Master under PHP Core.

Again, this occurs when using php-cgi.exe

Reproduce code:
---
?php
phpinfo();
asdf
?

Expected result:

Show only normal phpinfo(); output

Actual result:
--
The normal phpinfo(); output and 

PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.domain.com\public_html\phpinfo.php on line 4 


FWIW, when enabling display_errors, I get more errors


Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 





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



#46016 [Opn-Bgs]: display_errors = Off doesn't work

2008-09-07 Thread dsp
 ID:   46016
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at jamesvalero dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Windows 2003 R2 STD
 PHP Version:  5.2.6
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.




Previous Comments:


[2008-09-07 09:43:10] php at jamesvalero dot com

Correction: Calling the linked report closed may have been
misleading. A better way of asking should have been: Are reports tagged
with No Feedback still looked at when new comments are submitted by
other members of the community?



[2008-09-07 09:34:48] php at jamesvalero dot com

http://bugs.php.net/bug.php?id=44729 is the report in question. Is this
the same submission you were referring to?



[2008-09-07 09:32:28] php at jamesvalero dot com

I replied in another similar bug report but it looked like it was
already closed. Does replying in closed bugs, where I am not the owner,
re-open stale bug reports?

Thanks



[2008-09-07 09:30:07] php at jamesvalero dot com

note on the differences in the domain name: I forgot to edit the name
in the error output. Is it possible to modify the original post?



[2008-09-07 09:28:49] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.





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

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



#46014 [Opn-Bgs]: Unable to change Configuration File Path

2008-09-07 Thread jani
 ID:   46014
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at perfectory dot com dot au
-Status:   Open
+Status:   Bogus
 Bug Type: *Configuration Issues
 Operating System: Windows 2003 R2 x64
 PHP Version:  5.2.6
 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:


[2008-09-07 03:43:15] php at perfectory dot com dot au

Description:

I have manually installed PHP 5.2.6 on my Win2k3 box at C:\PHP and can
not seem to change the Configuration Path File variable. I have added
the registry key IniFilePath = C:\PHP at HKLM\SOFTWARE\PHP and
HKLM\SOFTWARE\PHP\5.2.6 and added C:\PHP to the PATH variable.

Setup: IIS6 with ISAPI. As I have a 64 bit OS, I have enabled IIS to
run both 32bit and 64bit applications. If I move the php.ini and all
non-php dlls to C:\WINDOWS it works, but I want to store this in my PHP
directory.

Reproduce code:
---
?php
phpinfo();
?

Expected result:

Configuration File (php.ini) Path to be set to C:\PHP and Loaded
Configuration File to be C:\PHP\php.ini

Actual result:
--
Configuration File (php.ini) Path is set to C:\WINDOWS and Loaded
Configuration File is set to (none).





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



#45124 [Opn-Fbk]: $_FILES['upload']['size'] sometimes return zero and sometimes the filesize

2008-09-07 Thread jani
 ID:   45124
 Updated by:   [EMAIL PROTECTED]
 Reported By:  klas dot wirholm at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Arch Linux
 PHP Version:  5.2.6
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

A fix was just committed which might fix this one too.


Previous Comments:


[2008-05-29 09:11:53] klas dot wirholm at gmail dot com

Description:

Sometimes when the uploaded file is bigger then MAX_FILE_SIZE (in
script)the return from $_FILES['uploadedfile']['size'] is zero and
sometimes it returns the right value of the file.

I have only tried whith MAX_FILE_SIZE far under what I have set in
php.ini(upload_max_filesize = 2M).

Looks like it depends on how much bigger the file is then
MAX_FILE_SIZE. Cant figure out the exact difference.

(the script I post is also my temporary solution for the problem)


Reproduce code:
---
define('MAX_FILE_SIZE', 1048);
...
elseif ($_FILES['uploadedfile']['size']  MAX_FILE_SIZE or
$_FILES['uploadedfile']['size'] = 0) {
$filesize = number_format($_FILES['uploadedfile']['size']/1024,
1).'KB';
$uploadinfo = bThe image/file is proberly to bigg/b (and maybee
then returned zero)!br /br/  We got this filesize from the upload
file:  . $filesize .br / Max acceptable size is  . $maxfs;
}
...

Expected result:

The exact filesize of the uploaded file (at least if its smaller then
upload_max_filesize set in php.ini).

Actual result:
--
Sometimes the exact filesize of the uploaded file, sometimes zero.





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



#46016 [Opn-Bgs]: display_errors = Off doesn't work

2008-09-07 Thread tularis
 ID:   46016
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at jamesvalero dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Windows 2003 R2 STD
 PHP Version:  5.2.6
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.




Previous Comments:


[2008-09-07 09:18:02] php at jamesvalero dot com

Description:

The box is a W2k3 R2 STD using IIS. The error seems to be related to
FastCGI as display_errors works when using php5isapi.dll.

phpinfo(); shows that c:\windows\php.ini is being loaded and
display_errors is off in both Local  Master under PHP Core.

Again, this occurs when using php-cgi.exe

Reproduce code:
---
?php
phpinfo();
asdf
?

Expected result:

Show only normal phpinfo(); output

Actual result:
--
The normal phpinfo(); output and 

PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.domain.com\public_html\phpinfo.php on line 4 


FWIW, when enabling display_errors, I get more errors


Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4
PHP Notice: Use of undefined constant asdf - assumed 'asdf' in
D:\Domains\itgstats-dev.hottopic.com\public_html\phpinfo.php on line 4 





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



#45911 [Ctl-Csd]: Cannot disable ext/hash

2008-09-07 Thread lbarnaud
 ID:   45911
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hannes dot magnusson at gmail dot com
-Status:   Critical
+Status:   Closed
 Bug Type: hash related
 Operating System: Linux
 PHP Version:  5.3.0alpha1
 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:


[2008-08-25 18:39:39] [EMAIL PROTECTED]

Yes, it's a mess. ext/hash should be enabled if ext/mhash is (or not?)
and it's not really possible since m comes after h.. :)

IMO: Make ext/mhash RIP. Providing an extension JUST that someone can
do 'if extension mhash exists..' is simply ridiculous..

Is renaming some functions that hard in scripts..?!



[2008-08-25 18:27:18] hannes dot magnusson at gmail dot com

Description:

--disable-all doesn't disable ext/hash

Reproduce code:
---
./configure --disable-all

Actual result:
--
[EMAIL PROTECTED]:/usr/src/php/5.3$ sapi/cli/php -m
[PHP Modules]
date
ereg
hash
pcre
Reflection
SPL
standard






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



#41736 [Com]: Mixed up characters in UTF-8 database with Hebrew via FreeTDS

2008-09-07 Thread www dot php dot net at landrovez dot com
 ID:   41736
 Comment by:   www dot php dot net at landrovez dot com
 Reported By:  www dot php dot net at landrovez dot com
 Status:   Assigned
 Bug Type: MSSQL related
 Operating System: Fedora Core 6, Kernel: 2.6.20
 PHP Version:  5.2.3
 Assigned To:  fmk
 New Comment:

wadap?


Previous Comments:


[2007-07-03 17:41:16] www dot php dot net at landroverz dot com

screenshot example:
http://landroverz.com/pics/php5-mssql-bad-output-demo.jpg

The red color shows the jumping char.
The blue color shows the missing char.. which is gone somewhere.



[2007-06-19 10:19:36] www dot php dot net at landrovez dot com

Description:

I'm running FreeTDS version 0.64 ( latest + stable ) connecting to
mssql  2000 database.

At the FreeTDS config located at: /etc/freetds.conf I've specified 
tds version = 8.0 
client charset = UTF-8

at the related connection, so far so good. it works.

The problem starts printing the data from the database.

When the last char of the selected array that I get from the DB query
is a hebrew char it moves it to the next position in the array for some
reason.

It only happens when the last char is hebrew, if the last char is .
for example it works just fine.

I think its something to do with UTF-8.



Reproduce code:
---
$mssql = mssql_connect(SQLSERVER, root, PASSWORD);
$mssql_db = mssql_select_db(devel_table, $mssql);

$download_id = 1;

$download_res = mssql_query(SELECT ID, Title, Description, URL FROM
tblDemo WHERE Download_ID = '$download_id');

$download = mssql_fetch_array($download_res);

echo pre
  print_r($download[Title]);
echo /pre;

Expected result:

Array
(
[0] = 1
[ID] = 1

[1] = THE BEST GAME IN THE WORLD
[Title] = THE BEST GAME IN THE WORLD

[2] = DOWNLOADS THIS GREAT GAME NOW
[Description] = DOWNLOADS THIS GREAT GAME NOW

[3] = http://sample.com/download.zip
[URL] = http://sample.com/download.zip
)


Actual result:
--
Array
(
[0] = 1
[ID] = 1

[1] = THE BEST GAME IN THE WORL
[Title] = THE BEST GAME IN THE WORL

[2] = DDOWNLOADS THIS GREAT GAME NO
[Description] = DDOWNLOADS THIS GREAT GAME NO

[3] = Whttp://sample.com/download.zip
[URL] = Whttp://sample.com/download.zip
)

*** the title should have been at hebrew for this bug to happen, for
your continence the title and description are set to English just to
show the example. 

As you can see it took the LAST hebrew letter from the END of the vchar
and moved it to the NEXT one by the select order.





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



#46013 [Sus]: problem with zip php functions and symbolic links

2008-09-07 Thread black-cod3 at live dot com
 ID:   46013
 User updated by:  black-cod3 at live dot com
 Reported By:  black-cod3 at live dot com
 Status:   Suspended
 Bug Type: Output Control
 Operating System: linux
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

yes i see, thanks pajoye..


Previous Comments:


[2008-09-07 11:01:37] [EMAIL PROTECTED]

Symbolic links are not yet supported (extra flags/fields).



[2008-09-06 20:56:29] black-cod3 at live dot com

Also note that when zipping the symbolic link using php code as:

?php
$zip = new ZipArchive;
$res = $zip-open('indx.zip', ZipArchive::CREATE);
if ($res === TRUE) {
$zip-addFile('indx');
$zip-close();
echo 'ok';
} else {
echo 'failed';
}
?

also the result after extracting indx.zip with the above php extracting
code:

indx



[2008-09-06 20:43:13] black-cod3 at live dot com

Description:

When using the zip php functions to extract or read a zip file
containing a symbolic link (ex: indx -
/home/myuser/public_html/index.html) it fails to extract the original
symbolic link it only returned the link name and it's contents is the
symbolic link path.


ln -s /home/myuser/public_html/index.html indx;ls -la 
28672300 lrwxrwxrwx  1 myuser mygroup   35 Sep  6 13:41 indx -
/home/myuser/public_html/index.html

zip -y indx.zip indx;ls -la 
28672300 lrwxrwxrwx  1 myuser mygroup   35 Sep  6 13:41 indx -
/home/myuser/public_html/index.html
28672304 -rw-r--r--  1 myuser mygroup  175 Sep  6 14:50 indx.zip

extracting php code to the indx.zip as following: 


Reproduce code:
---
?php
$zip = new ZipArchive;
if ($zip-open('indx.zip') === TRUE) {
$zip-extractTo('/home/myuser/public_html/');
$zip-close();
echo 'done';
} else {
echo 'failed';
}
?

Expected result:

expected to be extracted as :

indx - /home/myuser/public_html/index.html

Actual result:
--
but actual reslult is :

indx

and the contents of indx is :

/home/myuser/public_html/index.html


Thx for your attention and hope to know if there is a different coding
method to zip a symbolic link by php zip functions or the above code was
expected to works well?





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



#46017 [NEW]: Make C-Like Macros for PHP

2008-09-07 Thread ben at umingo dot de
From: ben at umingo dot de
Operating system: Windows
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  Make C-Like Macros for PHP

Description:

Hello people, i want to ask you for macros for PHP. 
Main purpose is to switch projects between testing, developing and
production state without performance penalties.

All these runtime if's could be skipped and that is jsut one example. 

It just gives you some more options
I really miss macros from C and C++ days ...

another useful example is for logging, 
I dont want to write a __LINE__ and __FILE__ everytime i log something. 
It would be much nicer to use a macro that will expand my logfunction with
these parameters before compiling ... you know what i mean

The bigger the project the bigger the effect of compiling times and
execution times ... This could really be a speedup and at all nobody is
forced to use macros.

(in case php scripts are cached and precompiled)




Reproduce code:
---
//projectstate 
//0 testing
//1 developing
//2 production
#define projectstate = 0

//some code ...

#if projectstate == 0
 //write some log, some output or whatever
}
#endif

//some other code

Expected result:

With macros, the code would be just 

//some code ...
//some other code...

Actual result:
--
Without macros, the code would be 

//some code
//an if-querry for projectstate
//some hundred lines of code to parse and evaluate
//endif
//some other code

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



#45124 [Fbk-Csd]: $_FILES['upload']['size'] sometimes return zero and sometimes the filesize

2008-09-07 Thread lbarnaud
 ID:   45124
 Updated by:   [EMAIL PROTECTED]
 Reported By:  klas dot wirholm at gmail dot com
-Status:   Feedback
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Arch Linux
 PHP Version:  5.2.6
 Assigned To:  fb-req-jani
 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:


[2008-09-07 11:26:09] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

A fix was just committed which might fix this one too.



[2008-05-29 09:11:53] klas dot wirholm at gmail dot com

Description:

Sometimes when the uploaded file is bigger then MAX_FILE_SIZE (in
script)the return from $_FILES['uploadedfile']['size'] is zero and
sometimes it returns the right value of the file.

I have only tried whith MAX_FILE_SIZE far under what I have set in
php.ini(upload_max_filesize = 2M).

Looks like it depends on how much bigger the file is then
MAX_FILE_SIZE. Cant figure out the exact difference.

(the script I post is also my temporary solution for the problem)


Reproduce code:
---
define('MAX_FILE_SIZE', 1048);
...
elseif ($_FILES['uploadedfile']['size']  MAX_FILE_SIZE or
$_FILES['uploadedfile']['size'] = 0) {
$filesize = number_format($_FILES['uploadedfile']['size']/1024,
1).'KB';
$uploadinfo = bThe image/file is proberly to bigg/b (and maybee
then returned zero)!br /br/  We got this filesize from the upload
file:  . $filesize .br / Max acceptable size is  . $maxfs;
}
...

Expected result:

The exact filesize of the uploaded file (at least if its smaller then
upload_max_filesize set in php.ini).

Actual result:
--
Sometimes the exact filesize of the uploaded file, sometimes zero.





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



#46018 [NEW]: Memory leak in unserialize of nested arrays

2008-09-07 Thread jimmycnw at gmail dot com
From: jimmycnw at gmail dot com
Operating system: Linux
PHP version:  5.2.6
PHP Bug Type: Performance problem
Bug description:  Memory leak in unserialize of nested arrays

Description:

The code is attached. Try executing 'SAVING' first. It will create a file
'temp.txt' approximately 450Kb in size. Then execute 'LOADING'. You will
see, that over 3.5Mb (!!) of memory used in unserialize() function, while
there are just 450Kb of data.

Is it a bug in PHP? Any suggestions on how to fix it?

(When I do the same with string, not array, everything works fine. The
problem appears only when I use nested arrays)



Reproduce code:
---
define ('FILENAME', 'temp.txt');
define ('SIZE', 10 * 1024);

// SAVING
$array = array ();
for ($i = 0; $iSIZE; $i++)
$array[] = array (uniqid ($i) = array ());
$data = serialize ($array);
file_put_contents (FILENAME, $data);

// LOADING
$before = memory_get_usage ();
$array = unserialize (file_get_contents (FILENAME));
$after = memory_get_usage ();
echo 'Memory used: '.($after-$before).' bytes, while size of data:
'.strlen (serialize ($array));


Expected result:

Memory used should be around 450Kb, while I see 3.5Mb.

Actual result:
--
Memory used: 3.5Mb

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



#46018 [Opn]: Memory leak in unserialize of nested arrays

2008-09-07 Thread jimmycnw at gmail dot com
 ID:   46018
 User updated by:  jimmycnw at gmail dot com
 Reported By:  jimmycnw at gmail dot com
 Status:   Open
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Execute SAVING part first, in separate script. Then execute LOADING in
another script. DO it separately, not in one script.


Previous Comments:


[2008-09-07 15:31:07] jimmycnw at gmail dot com

Description:

The code is attached. Try executing 'SAVING' first. It will create a
file 'temp.txt' approximately 450Kb in size. Then execute 'LOADING'. You
will see, that over 3.5Mb (!!) of memory used in unserialize() function,
while there are just 450Kb of data.

Is it a bug in PHP? Any suggestions on how to fix it?

(When I do the same with string, not array, everything works fine. The
problem appears only when I use nested arrays)



Reproduce code:
---
define ('FILENAME', 'temp.txt');
define ('SIZE', 10 * 1024);

// SAVING
$array = array ();
for ($i = 0; $iSIZE; $i++)
$array[] = array (uniqid ($i) = array ());
$data = serialize ($array);
file_put_contents (FILENAME, $data);

// LOADING
$before = memory_get_usage ();
$array = unserialize (file_get_contents (FILENAME));
$after = memory_get_usage ();
echo 'Memory used: '.($after-$before).' bytes, while size of data:
'.strlen (serialize ($array));


Expected result:

Memory used should be around 450Kb, while I see 3.5Mb.

Actual result:
--
Memory used: 3.5Mb





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



#46018 [Opn-Fbk]: Memory leak in unserialize of nested arrays

2008-09-07 Thread jani
 ID:   46018
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jimmycnw at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Exactly where do you get the idea that memory usage should be same as
the file size is?? Arrays just take more memory, that's not any bug..


Previous Comments:


[2008-09-07 15:50:54] jimmycnw at gmail dot com

Execute SAVING part first, in separate script. Then execute LOADING in
another script. DO it separately, not in one script.



[2008-09-07 15:31:07] jimmycnw at gmail dot com

Description:

The code is attached. Try executing 'SAVING' first. It will create a
file 'temp.txt' approximately 450Kb in size. Then execute 'LOADING'. You
will see, that over 3.5Mb (!!) of memory used in unserialize() function,
while there are just 450Kb of data.

Is it a bug in PHP? Any suggestions on how to fix it?

(When I do the same with string, not array, everything works fine. The
problem appears only when I use nested arrays)



Reproduce code:
---
define ('FILENAME', 'temp.txt');
define ('SIZE', 10 * 1024);

// SAVING
$array = array ();
for ($i = 0; $iSIZE; $i++)
$array[] = array (uniqid ($i) = array ());
$data = serialize ($array);
file_put_contents (FILENAME, $data);

// LOADING
$before = memory_get_usage ();
$array = unserialize (file_get_contents (FILENAME));
$after = memory_get_usage ();
echo 'Memory used: '.($after-$before).' bytes, while size of data:
'.strlen (serialize ($array));


Expected result:

Memory used should be around 450Kb, while I see 3.5Mb.

Actual result:
--
Memory used: 3.5Mb





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



#46010 [Opn-Csd]: warnings incorrectly generated for iv in ecb mode

2008-09-07 Thread felipe
 ID:   46010
 Updated by:   [EMAIL PROTECTED]
 Reported By:  d_kelsey at uk dot ibm dot com
-Status:   Open
+Status:   Closed
 Bug Type: mcrypt related
 Operating System: Windows XP
 PHP Version:  5.2.6
 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:


[2008-09-06 15:36:45] d_kelsey at uk dot ibm dot com

Description:

With the functions 
mcrypt_encrypt, mcrypt_decrypt with MCRYPT_MODE_ECB and mcrypt_ecb, by
not providing an initial vector or providing one that isn't at the
correct block size results in a warning being generated. 

ECB mode never uses the initial vector, so a warning is irrelevant. 

Reproduce code:
---
?php
// the same type of results can also be seen with mcrypt_ecb,
mcrypt_decrypt
var_dump(bin2hex(mcrypt_encrypt(MCRYPT_TRIPLEDES, key, data,
MCRYPT_MODE_ECB)));
var_dump(bin2hex(mcrypt_encrypt(MCRYPT_TRIPLEDES, key, data,
MCRYPT_MODE_ECB, a)));
var_dump(bin2hex(mcrypt_encrypt(MCRYPT_TRIPLEDES, key, data,
MCRYPT_MODE_ECB, 12345678)));
? 

Expected result:

string(16) 372eeb4a524b8d31
string(16) 372eeb4a524b8d31
string(16) 372eeb4a524b8d31

Actual result:
--
Warning: mcrypt_encrypt(): Attempt to use an empty IV, which is NOT
recommend in C:\udata-eclipse\p8\a.phpcode\mcrypt_ecb.php on line 2
string(16) 372eeb4a524b8d31

Warning: mcrypt_encrypt(): The IV parameter must be as long as the
blocksize in C:\udata-eclipse\p8\a.phpcode\mcrypt_ecb.php on line 3
string(16) 372eeb4a524b8d31
string(16) 372eeb4a524b8d31





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



Hmmm .. Newly Married Sexiest Babe Super Hot Exposing .. Dont Miss Unseen Nude Pics

2008-09-07 Thread good masala14
I'm pretty sure it is scheduled for release in an upcoming uthe flags to
stream_socket_server() then it works fine.


Tested on all the PHP versions I had installed (using the CLI
interface):
6.0.0-dev (Windows): crashes
5.2.6 (Windows): crashes
5.2.5 (Windows): crashes
5.2.3 (Windows): crashes
5.2.4-2ubuntu5.3 (Linux): no crash (typicial of Linux to be different
huh? :)


Backtrace what-cha-ma-call-it:
--

(This was generated with PHP 5.2.6.)

Thread 0 - System ID 2864
Entry point php!mainCRTStartup 
Create time 2008-09-13 23:00:03 
Time spent in user mode 0 Days 0:0:0.46 
Time spent in kernel mode   0 Days 0:0:0.31 

FunctionArg 1Arg 2 
  Arg 3   Source 
php5ts!xbuf_format_converter+68a00c0f978 102c178d  
  00c0fa04
php5ts!vspprintf+29 00c0f9b0   
  102c178c
php5ts!php_verror+4d 102c169c  
  0002
php5ts!php_error_docref0+23  00f11d10  
  0002
php5ts!php_set_sock_blocking+45  0001  
  00f11d10
php5ts!php_sockop_set_option+121011ee248 0001  
  
php5ts!php_tcp_sockop_set_option+56e011ee248 0001  
  
php5ts!_php_stream_set_option+2c011ee248 0001  
  
php5ts!zif_stream_set_blocking+10c  011e28f8 011ee1a0  
  
php5ts!zend_do_fcall_common_helper_SPEC+7d9 00c0fbd0 00f11d10  
  011ed67f
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+e5   00f11d10  
  00f11d10
php5ts!execute+1c5  011ed6e0 00f11d10  
  
php5ts!zend_execute_scripts+107 0008 00f11d10  
  
php5ts!php_execute_script+20d   00c0fec8 00f11d10  
  
php!main+c070003 00f11d80  
  00f10c10
php!mainCRTStartup+e3      
  7ffde000
kernel32!IsProcessorFeaturePresent+9e   00402fc2   
  00c1

PHP5TS!XBUF_FORMAT_CONVERTER+68AIn
php__PID__2860__Date__09_13_2008__Time_11_00_07PM__202__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!xbuf_format_converter+68a in
c:\Server\php\php5ts.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x2736 on thread 0



(Actually, all I wanted to do was use SSL with the sockets extension.
But it doesn't seem to support that so I switched my program to the
stream_socket functions instead. But that doesn't seem to support raw
sockets, except under stream_socket_pair() (What's the point of that
function anyway? It doesn't let you connect to anything!). So I tried to
use the context/options/params thing to set up a notification function
so I could let stream_sockets notifications be sent directly to the
handler functions while socket_select handles ordinary Berkeley sockets
events, because I need them both, but I couldn't get the notification
thing working at all, so I tried specifying the context directly when
the listener socket was created, and that requires specifying the errno,
errstr, and flags values as well, so I tried that. Well it was a real
rollercoaster. It still didn't call the notifier, but it did crash, and
that's how I found this muddle. If I was clever I would have tried to
fix it myself but I couldn't find out where the actual the problem was.
/end of rant)


Anyway, I figured even though the problem only happens with incorrect
values for the flags parameter, that I should report it anyway, just in
case it's exploitable. I would have reported it yesterday but the bug
reporting page seemed to be broken for hours, even though I kept trying
again. Then I discovered that actually you just need cookies enabled for
it to work. Ah well. Hope this stuff makes sense to someone.

Bye!~








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