#50268 [NEW]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread ben dot arnold dot spam at hotmail dot com
From: ben dot arnold dot spam at hotmail dot com
Operating system: Windows Vista
PHP version:  5.3.1
PHP Bug Type: Windows Installer
Bug description:  PHP doesn't start: ntwdblib.dll not found

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering "php" in a command window.


What happened:

1. Apache failed to start. A dialogue box says "The requested operation
has failed" and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled "php.exe -
Unable To Locate Component". The text of the box is:

This application has failed to start because ntwdblib.dll was not found.
Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it through
Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that it
is connected to a database misconfiguration. I currently do not have a
database installed and have done nothing to configure one in PHP. All my
configuration steps are listed above.

I am unable to "copy ntwdblib.dll from MSSQL 2000" as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to a
database I am just trying to launch PHP).



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



#50268 [Opn]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread ben dot arnold dot spam at hotmail dot com
 ID:   50268
 User updated by:  ben dot arnold dot spam at hotmail dot com
 Reported By:  ben dot arnold dot spam at hotmail dot com
 Status:   Open
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.3.1
 New Comment:

Any suggestions for a workaround would be much appreciated.

As it stands I am not able to install PHP at all!


Previous Comments:


[2009-11-23 08:40:41] ben dot arnold dot spam at hotmail dot com

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering "php" in a command window.


What happened:

1. Apache failed to start. A dialogue box says "The requested operation
has failed" and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled
"php.exe - Unable To Locate Component". The text of the box is:

This application has failed to start because ntwdblib.dll was not
found. Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it
through Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that
it is connected to a database misconfiguration. I currently do not have
a database installed and have done nothing to configure one in PHP. All
my configuration steps are listed above.

I am unable to "copy ntwdblib.dll from MSSQL 2000" as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to
a database I am just trying to launch PHP).







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



#50268 [Opn->Asn]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread pajoye
 ID:   50268
 Updated by:   paj...@php.net
 Reported By:  ben dot arnold dot spam at hotmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.3.1
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Do you need the mssql extension? If not simply comment out the mssql
lines in your php.ini.

I'll look into this problem (not sure why it did not install it).


Previous Comments:


[2009-11-23 08:47:13] ben dot arnold dot spam at hotmail dot com

Any suggestions for a workaround would be much appreciated.

As it stands I am not able to install PHP at all!



[2009-11-23 08:40:41] ben dot arnold dot spam at hotmail dot com

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering "php" in a command window.


What happened:

1. Apache failed to start. A dialogue box says "The requested operation
has failed" and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled
"php.exe - Unable To Locate Component". The text of the box is:

This application has failed to start because ntwdblib.dll was not
found. Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it
through Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that
it is connected to a database misconfiguration. I currently do not have
a database installed and have done nothing to configure one in PHP. All
my configuration steps are listed above.

I am unable to "copy ntwdblib.dll from MSSQL 2000" as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to
a database I am just trying to launch PHP).







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



#50268 [Asn]: PHP doesn't start: ntwdblib.dll not found

2009-11-23 Thread ben dot arnold dot spam at hotmail dot com
 ID:   50268
 User updated by:  ben dot arnold dot spam at hotmail dot com
 Reported By:  ben dot arnold dot spam at hotmail dot com
 Status:   Assigned
 Bug Type: Windows Installer
 Operating System: Windows Vista
 PHP Version:  5.3.1
 Assigned To:  pajoye
 New Comment:

Thanks for the speedy response!

I just commented out "extension=php_mssql.dll" and it all works
perfectly now. Apache starts and I have "hello world" up and running.


Previous Comments:


[2009-11-23 09:08:27] paj...@php.net

Do you need the mssql extension? If not simply comment out the mssql
lines in your php.ini.

I'll look into this problem (not sure why it did not install it).



[2009-11-23 08:47:13] ben dot arnold dot spam at hotmail dot com

Any suggestions for a workaround would be much appreciated.

As it stands I am not able to install PHP at all!



[2009-11-23 08:40:41] ben dot arnold dot spam at hotmail dot com

Description:

I am running Apache 2.2.14. I do not have a database installed.


What I did:

1. Downloaded latest version of PHP (php-5.3.1-Win32-VC6-x86.msi)
2. Ran the installer using default values except:
* Web server: Apache 2.2.x Module
* Apache configuration directory: C:\Program Files\Apache Software
Foundation\Apache2.2\conf\
3. Tried to start Apache.
4. Tried to run PHP by entering "php" in a command window.


What happened:

1. Apache failed to start. A dialogue box says "The requested operation
has failed" and Windows error reporting kicked in. There is no error in
Apache's error.log.
2. When I tried to start php I get an error dialogue box titled
"php.exe - Unable To Locate Component". The text of the box is:

This application has failed to start because ntwdblib.dll was not
found. Re-installing the application may fix this problem.


What I expected to happen:

1. I expected that Apache would start with PHP loaded as a module. I
expected to be able to put a php file in my htdocs directory and that I
could get it to display a Hello World message when I requested it
through Apache.

2. I expected PHP to display usage information when run from the
commandline.


I have tried uninstalling PHP, downloading the installer again and
reinstalling but I have the same problem.

When I uninstall PHP Apache works normally again.

I have Googled this error message and seen various people report that
it is connected to a database misconfiguration. I currently do not have
a database installed and have done nothing to configure one in PHP. All
my configuration steps are listed above.

I am unable to "copy ntwdblib.dll from MSSQL 2000" as suggested in bug
#38849 because I do not have MSSQL installed. In any case that bug looks
like it is related to a different problem (I am not trying to connect to
a database I am just trying to launch PHP).







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



#50267 [Opn->Fbk]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread jani
 ID:   50267
 Updated by:   j...@php.net
 Reported By:  nachumk at gmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Unknown/Other Function
+Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

And what browscap.ini are you using..? 


Previous Comments:


[2009-11-23 05:20:35] nachumk at gmail dot com

I am running Apache 2.2.14
(apache_2.2.14-win32-x86-openssl-0.9.8k.msi), 
PHP 5.3.1 (php-5.3.1-Win32-VC9-x86.msi (both as module and cgi), and 
php-5.3.1-nts-Win32-VC9-x86.msi), on Windows XP 32 bit.

It works when I run PHP 5.2.11.



[2009-11-23 05:18:19] nachumk at gmail dot com

Description:

get_browser should work with null string and doesn't when using 5.3.1.

5.2.11 works fine.

Reproduce code:
---
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>


Expected result:

That both get_browser calls should produce identical results.

Actual result:
--
The first call with $_SERVER['HTTP_USER_AGENT'] returns proper results

and the call with null returns a default response (same as what it
would 
return with a completely empty user agent string).





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



#50266 [Opn->Asn]: conflicting types for llabs

2009-11-23 Thread jani
 ID:   50266
 Updated by:   j...@php.net
 Reported By:  selsky at columbia dot edu
-Status:   Open
+Status:   Assigned
-Bug Type: Compile Failure
+Bug Type: Date/time related
 Operating System: Solaris 9
 PHP Version:  5.2SVN-2009-11-23 (snap)
-Assigned To:  
+Assigned To:  derick


Previous Comments:


[2009-11-23 02:55:44] selsky at columbia dot edu

Description:

llabs() is defined in both /usr/include/stdlib.h and
ext/date/php_date.c

#if defined(__GNUC__) && __GNUC__ < 3
static __inline __int64_t llabs( __int64_t i ) { return i >= 0 ? i :
-i; 
}
#endif

I'm using gcc 2 so this inline function is defined, but it's also 
defined by the system.  Perhaps it would be better to test for the 
function in configure and set something in php_config.h?

Reproduce code:
---
$ uname -a
SunOS cumin 5.9 Generic_122300-45 sun4u sparc SUNW,UltraAX-i2 Solaris
$ gcc --version
2.95.3
$ ./configure
$ make
/bin/sh /tmp/php5.2-200911230130/libtool --silent --preserve-dup-deps
--mode=compile gcc -Iext/date/lib -Iext/date/
-I/tmp/php5.2-200911230130/ext/date/ -DPHP_ATOM_INC
-I/tmp/php5.2-200911230130/include -I/tmp/php5.2-200911230130/main
-I/tmp/php5.2-200911230130 -I/tmp/php5.2-200911230130/ext/date/lib
-I/opt/libxml2-2.6.32/include/libxml2 -I/tmp/php5.2-200911230130/TSRM
-I/tmp/php5.2-200911230130/Zend  -D_POSIX_PTHREAD_SEMANTICS 
-I/usr/include -g -O2  -c /tmp/php5.2-200911230130/ext/date/php_date.c
-o ext/date/php_date.lo 
/tmp/php5.2-200911230130/ext/date/php_date.c:38: parse error before
`llabs'
/tmp/php5.2-200911230130/ext/date/php_date.c:38: parse error before
`i'
/tmp/php5.2-200911230130/ext/date/php_date.c:38: conflicting types for
`llabs'
/usr/include/stdlib.h:203: previous declaration of `llabs'
/tmp/php5.2-200911230130/ext/date/php_date.c: In function `llabs':
/tmp/php5.2-200911230130/ext/date/php_date.c:38: `i' undeclared (first
use in this function)
/tmp/php5.2-200911230130/ext/date/php_date.c:38: (Each undeclared
identifier is reported only once
/tmp/php5.2-200911230130/ext/date/php_date.c:38: for each function it
appears in.)






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



#50265 [Opn->Fbk]: endless loop wating for child process

2009-11-23 Thread jani
 ID:   50265
 Updated by:   j...@php.net
 Reported By:  mg at fork dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  5.2.11
 New Comment:

Try enable fastcgi debugging with DEBUG_FASTCGI when you compile PHP
and provide the log of the failing run.


Previous Comments:


[2009-11-23 02:24:21] mg at fork dot pl

Description:

fast-cgi php process loops forever during wait()ing for child process
while there's no more child processes. 

Actual result:
--
in cgi_main.c there's loop:

1631 while (1) {
1632 if (wait(&status) >= 0) {
1633 running--;
1634 break;
1635 } else if (exit_signal) {
1636 break;
1637 }
1638 }

wait returns -1 as strace shows:

wait4(-1, 0xbff2d2a4, 0, NULL)  = -1 ECHILD (No child
processes)

and loop never breaks (as apparently exit_signal is set to 0).





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



#50269 [Opn->Bgs]: getting and setting (new) transparant color error

2009-11-23 Thread pajoye
 ID:   50269
 Updated by:   paj...@php.net
 Reported By:  ericbruggema at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: GD related
 Operating System: WinXP Sp3 dutch
 PHP Version:  5.3SVN-2009-11-23 (SVN)
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

if the image is a palette image and has only 10 colors, trying to use
the color 11 will obviously fail.


Previous Comments:


[2009-11-23 10:39:51] ericbruggema at hotmail dot com

Description:

The problem is that when reading a transparant color from an existing
image in some cases can't be used to set the transparant color for new
images.

Reproduce code:
---
$im = imagecreatefromgif("image.gif");

$trnprt_indx  = imagecolortransparent($im); 
$trnprt_color = @imagecolorsforindex($im, $trnprt_indx); // error line


Expected result:

imagecolorsforindex() [function.imagecolorsforindex]:
Color index 251 out of range







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



#50269 [Bgs]: getting and setting (new) transparant color error

2009-11-23 Thread ericbruggema at hotmail dot com
 ID:   50269
 User updated by:  ericbruggema at hotmail dot com
 Reported By:  ericbruggema at hotmail dot com
 Status:   Bogus
 Bug Type: GD related
 Operating System: WinXP Sp3 dutch
 PHP Version:  5.3SVN-2009-11-23 (SVN)
 Assigned To:  pajoye
 New Comment:

er?? the current image will be copied to a new image (thumb) but i'd
like to keep the current 'transparant' color, but this gives an error...
looks like the index for the transparant color (current image) doesn't
exists in the color palette... (current image)


Previous Comments:


[2009-11-23 10:55:06] paj...@php.net

if the image is a palette image and has only 10 colors, trying to use
the color 11 will obviously fail.



[2009-11-23 10:39:51] ericbruggema at hotmail dot com

Description:

The problem is that when reading a transparant color from an existing
image in some cases can't be used to set the transparant color for new
images.

Reproduce code:
---
$im = imagecreatefromgif("image.gif");

$trnprt_indx  = imagecolortransparent($im); 
$trnprt_color = @imagecolorsforindex($im, $trnprt_indx); // error line


Expected result:

imagecolorsforindex() [function.imagecolorsforindex]:
Color index 251 out of range







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



#50270 [NEW]: ldap_start_tls problem

2009-11-23 Thread jcarlos at dsi dot uclm dot es
From: jcarlos at dsi dot uclm dot es
Operating system: windows
PHP version:  5.3.1
PHP Bug Type: LDAP related
Bug description:  ldap_start_tls problem

Description:

My configuration (works perfect):
Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.11

When i upgrade to:
Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.3.1

ldap_start_tls problem





Reproduce code:
---
Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS:
Connect error in 


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



#50270 [Opn]: ldap_start_tls problem

2009-11-23 Thread jcarlos at dsi dot uclm dot es
 ID:   50270
 User updated by:  jcarlos at dsi dot uclm dot es
 Reported By:  jcarlos at dsi dot uclm dot es
 Status:   Open
 Bug Type: LDAP related
 Operating System: windows
 PHP Version:  5.3.1
 New Comment:

$ds=ldap_connect($ldaphost);  
   if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)){
  print "No puedo establecer LDAPv3";
   }else if (!ldap_set_option($ds, LDAP_OPT_REFERRALS, 0)){
  print "No puedo establecer LDAP_OPT_REFERRALS";
   }else if (!ldap_start_tls($ds)) { // <- FAIL --
  print "No puedo iniciar TLS ";
   }else {
  printf "OK";
  } 
   }


Previous Comments:


[2009-11-23 11:27:21] jcarlos at dsi dot uclm dot es

Description:

My configuration (works perfect):
Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.11

When i upgrade to:
Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.3.1

ldap_start_tls problem





Reproduce code:
---
Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start
TLS: Connect error in 






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



#50250 [Opn]: Exceptions can be thrown and caught in an autoload function

2009-11-23 Thread rquadling
 ID:   50250
 Updated by:   rquadl...@php.net
 Reported By:  bran...@php.net
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Irrelevent
 PHP Version:  5.3.1
 New Comment:

One instance where the documentation does hold true is attempting to 
throw an exception of a type which is not available.

Changing ...

throw new Exception('test');

to ...

throw new MissingException('test');

results in ...

Fatal error: Class 'MissingException' not found in Z:\testauto.php on 
line 6


I wonder if this is what the documentation is relating to.


Previous Comments:


[2009-11-20 20:14:30] bj...@php.net

This is also true for __autoload(), not only spl_register_autoload().

Bug or expected behavior as of PHP 5.3.0?




[2009-11-20 19:50:03] bran...@php.net

Description:

According to the PHP documentation, exceptions cannot be thrown inside
__autoload() functions, and prior to PHP 5.3, exceptions thrown resulted
in fatal errors. Since PHP 5.3, it has been possible to throw and catch
exceptions from __autoload() functions.

I'm happy to chalk this up to a documentation bug, and if it is I will
gladly fix it myself; however, I want to make sure this is intended
functionality and not an accidental inclusion that might be fixed in
future versions of PHP.

Reproduce code:
---
http://bugs.php.net/?id=50250&edit=1



#50250 [Opn]: Exceptions can be thrown and caught in an autoload function

2009-11-23 Thread rquadling
 ID:   50250
 Updated by:   rquadl...@php.net
 Reported By:  bran...@php.net
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Irrelevent
 PHP Version:  5.3.1
 New Comment:

Amendeded the code slightly ...

http://bugs.php.net/?id=50250&edit=1



#50249 [Opn]: ordinal month days don't work

2009-11-23 Thread sjoerd
 ID:   50249
 Updated by:   sjo...@php.net
 Reported By:  jennifer dot kimball at nrc dot ca
 Status:   Open
 Bug Type: Date/time related
 Operating System: Solaris 10
 PHP Version:  5.3.1
 New Comment:

Thank you for your bug report.

Here is a piece of code which may do what you want:



Previous Comments:


[2009-11-20 18:18:22] jennifer dot kimball at nrc dot ca

Description:

It appears impossible to write an expression that will generate the Nth
day of any month (except for first or last days).

Expressions like "third day of next month" fail in date_create().
Expressions like "next month +3 days" increment the month number and
add 3 days to the current day number.
Expressions like "first day of next month +2 days" give just the first
day of the month.



Reproduce code:
---
//today is Nov 20, 2009

$d1=date_create('third day of next month');
print_r(DateTime::getLastErrors()); //errors
echo 'd1: ',$d1->format('Y-m-d'); //nothing output

$d2=date_create('first day of next month');
echo 'd2: ',$d2->format('Y-m-d'); //2009-12-01, works as expected

$d3=date_create('first day of next month +2 days');
echo 'd3: ',$d3->format('Y-m-d'); //2009-12-01, not 2009-12-03

$d4=date_create('next month +3 days');
echo 'd4: ',$d4->format('Y-m-d'); //2009-12-23, also not 2009-12-03
though I can understand why



Expected result:

Array
(
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 0
[errors] => Array
(
)

)
d1: 2009-12-03

d2: 2009-12-01

d3: 2009-12-03

d4: 2009-12-23

Actual result:
--
Array
(
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 1
[errors] => Array
(
[10] => The timezone could not be found in the database
)

)
d1: 

d2: 2009-12-01

d3: 2009-12-01 //still the 1st, 2 days not added

d4: 2009-12-23





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



#50271 [NEW]: Windows hard coding of CMD / COMMAND.COM rather than envvar(COMSPEC)

2009-11-23 Thread RQuadling at GMail dot com
From: RQuadling at GMail dot com
Operating system: Windows XP SP3
PHP version:  5.3SVN-2009-11-23 (SVN)
PHP Bug Type: Unknown/Other Function
Bug description:  Windows hard coding of CMD / COMMAND.COM rather than 
envvar(COMSPEC)

Description:

In http://lxr.php.net/source/TSRM/tsrm_win32.c#52, the shell to execute is
hardcoded.

This should be retrieved via GetEnvironmentVariable('COMSPEC', ...);

As such, any program called cmd.exe (or command.com for older, and now
unsupported by PHP, versions of windows) in a directory accessible via the
PATH _before_ the actual location of cmd.exe/command.com will be loaded for
the shell.

The environment variable "COMSPEC" (now known as "ComSpec", but is case
insensitive for Windows) by default includes the path.

Whilst this is not a series bug, it does mean PHP conforms to other
languages and applications that can invoke a console shell via COMSPEC,
rather than using a hard-coded name.


Considering that PHP doesn't support older versions of windows any longer,
the whole test on GetVersion() is also redundant.






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



#50255 [Bgs->Ver]: isset() and empty() silently casts array to object?

2009-11-23 Thread jani
 ID:   50255
 Updated by:   j...@php.net
-Summary:  isset and empty returns wrong value
 Reported By:  tyra3l at gmail dot com
-Status:   Bogus
+Status:   Verified
-Bug Type: *General Issues
+Bug Type: Scripting Engine problem
-Operating System: windows xp
+Operating System: *
-PHP Version:  5.3.1
+PHP Version:  5.*, 6
 New Comment:

I'm sorry, I read this a bit hastily. This indeed is a bug.


Previous Comments:


[2009-11-21 21:13:49] tyra3l at gmail dot com

could you show me which ticket duplicates this, and where this behavior
is documented in the manual?
because I tried to check this in the documentation, but I haven't found
it at the isset/empty manual page.

Tyrael



[2009-11-21 15:00:19] j...@php.net

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.

And expected behaviour. RTFM. etc.



[2009-11-21 10:08:26] tyra3l at gmail dot com

Description:

If you try to check the existence of a property on an array,
suprisingly you wont get any error or notice, but you will get the
results as you were checking with the correct type.

Reproduce code:
---
 'bar');
echo "";var_dump(isset($a->foo));echo "";
echo "";var_dump(isset($a->asd));echo "";
echo "";var_dump(empty($a->foo));echo "";
echo "";var_dump(empty($a->asd));echo "";
echo "";var_dump(@$a->foo);echo "";


Expected result:

Fatal error:  Cannot use array as object in ...

OR

bool(false)

bool(false)

bool(true)

bool(true)

NULL


Actual result:
--
bool(true)

bool(false)

bool(false)

bool(true)

NULL






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



#50271 [Opn]: Windows hard coding of CMD / COMMAND.COM rather than envvar(COMSPEC)

2009-11-23 Thread jani
 ID:   50271
 Updated by:   j...@php.net
 Reported By:  RQuadling at GMail dot com
 Status:   Open
-Bug Type: Unknown/Other Function
+Bug Type: Program Execution
 Operating System: win32 only - Windows XP SP3
 PHP Version:  5.3SVN-2009-11-23 (SVN)
 New Comment:

FYI: In the future when a bug is clearly windows only, use os prefix
'win32 only -' to preserve my sanity..


Previous Comments:


[2009-11-23 13:15:31] RQuadling at GMail dot com

Description:

In http://lxr.php.net/source/TSRM/tsrm_win32.c#52, the shell to execute
is hardcoded.

This should be retrieved via GetEnvironmentVariable('COMSPEC', ...);

As such, any program called cmd.exe (or command.com for older, and now
unsupported by PHP, versions of windows) in a directory accessible via
the PATH _before_ the actual location of cmd.exe/command.com will be
loaded for the shell.

The environment variable "COMSPEC" (now known as "ComSpec", but is case
insensitive for Windows) by default includes the path.

Whilst this is not a series bug, it does mean PHP conforms to other
languages and applications that can invoke a console shell via COMSPEC,
rather than using a hard-coded name.


Considering that PHP doesn't support older versions of windows any
longer, the whole test on GetVersion() is also redundant.










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



#50249 [Opn->Asn]: ordinal month days don't work

2009-11-23 Thread derick
 ID:   50249
 Updated by:   der...@php.net
 Reported By:  jennifer dot kimball at nrc dot ca
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Solaris 10
 PHP Version:  5.3.1
-Assigned To:  
+Assigned To:  derick
 New Comment:

I'll see if we can support this in some way without breaking anything
else— please ignore what Sjoerd wrote. mktime() and timestamps should
be avoided!


Previous Comments:


[2009-11-23 13:05:24] sjo...@php.net

Thank you for your bug report.

Here is a piece of code which may do what you want:




[2009-11-20 18:18:22] jennifer dot kimball at nrc dot ca

Description:

It appears impossible to write an expression that will generate the Nth
day of any month (except for first or last days).

Expressions like "third day of next month" fail in date_create().
Expressions like "next month +3 days" increment the month number and
add 3 days to the current day number.
Expressions like "first day of next month +2 days" give just the first
day of the month.



Reproduce code:
---
//today is Nov 20, 2009

$d1=date_create('third day of next month');
print_r(DateTime::getLastErrors()); //errors
echo 'd1: ',$d1->format('Y-m-d'); //nothing output

$d2=date_create('first day of next month');
echo 'd2: ',$d2->format('Y-m-d'); //2009-12-01, works as expected

$d3=date_create('first day of next month +2 days');
echo 'd3: ',$d3->format('Y-m-d'); //2009-12-01, not 2009-12-03

$d4=date_create('next month +3 days');
echo 'd4: ',$d4->format('Y-m-d'); //2009-12-23, also not 2009-12-03
though I can understand why



Expected result:

Array
(
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 0
[errors] => Array
(
)

)
d1: 2009-12-03

d2: 2009-12-01

d3: 2009-12-03

d4: 2009-12-23

Actual result:
--
Array
(
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 1
[errors] => Array
(
[10] => The timezone could not be found in the database
)

)
d1: 

d2: 2009-12-01

d3: 2009-12-01 //still the 1st, 2 days not added

d4: 2009-12-23





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



#50267 [Fbk->Opn]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread nachumk at gmail dot com
 ID:   50267
 User updated by:  nachumk at gmail dot com
 Reported By:  nachumk at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI downloaded 
yesterday. Keep in mind that it works fine if I give it the 
parameter $_SERVER['HTTP_USER_AGENT'], showing that browscap is 
installed correctly. It seems to be an issue in php's ability to 
retrieve the user agent on it's own.


Previous Comments:


[2009-11-23 10:07:01] j...@php.net

And what browscap.ini are you using..? 



[2009-11-23 05:20:35] nachumk at gmail dot com

I am running Apache 2.2.14
(apache_2.2.14-win32-x86-openssl-0.9.8k.msi), 
PHP 5.3.1 (php-5.3.1-Win32-VC9-x86.msi (both as module and cgi), and 
php-5.3.1-nts-Win32-VC9-x86.msi), on Windows XP 32 bit.

It works when I run PHP 5.2.11.



[2009-11-23 05:18:19] nachumk at gmail dot com

Description:

get_browser should work with null string and doesn't when using 5.3.1.

5.2.11 works fine.

Reproduce code:
---
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>


Expected result:

That both get_browser calls should produce identical results.

Actual result:
--
The first call with $_SERVER['HTTP_USER_AGENT'] returns proper results

and the call with null returns a default response (same as what it
would 
return with a completely empty user agent string).





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



#50255 [Ver]: isset() and empty() silently casts array to object?

2009-11-23 Thread tyra3l at gmail dot com
 ID:   50255
 User updated by:  tyra3l at gmail dot com
 Reported By:  tyra3l at gmail dot com
 Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.*, 6
 New Comment:

Thank you for verifying this.
It was noticed on our development machines, and I tested it on
different 
php installations, so I can confirm this is also present on 
5.2.5,5.2.8,5.2.11 also.

Tyrael


Previous Comments:


[2009-11-23 13:28:40] j...@php.net

I'm sorry, I read this a bit hastily. This indeed is a bug.



[2009-11-21 21:13:49] tyra3l at gmail dot com

could you show me which ticket duplicates this, and where this behavior
is documented in the manual?
because I tried to check this in the documentation, but I haven't found
it at the isset/empty manual page.

Tyrael



[2009-11-21 10:08:26] tyra3l at gmail dot com

Description:

If you try to check the existence of a property on an array,
suprisingly you wont get any error or notice, but you will get the
results as you were checking with the correct type.

Reproduce code:
---
 'bar');
echo "";var_dump(isset($a->foo));echo "";
echo "";var_dump(isset($a->asd));echo "";
echo "";var_dump(empty($a->foo));echo "";
echo "";var_dump(empty($a->asd));echo "";
echo "";var_dump(@$a->foo);echo "";


Expected result:

Fatal error:  Cannot use array as object in ...

OR

bool(false)

bool(false)

bool(true)

bool(true)

NULL


Actual result:
--
bool(true)

bool(false)

bool(false)

bool(true)

NULL






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



#50183 [NoF->Opn]: What feedback is expected?

2009-11-23 Thread scratch65535 at att dot net
 ID:   50183
 User updated by:  scratch65535 at att dot net
-Summary:  PNG alpha blending doesn't seem to work
 Reported By:  scratch65535 at att dot net
-Status:   No Feedback
+Status:   Open
 Bug Type: GD related
 Operating System: W2K
 PHP Version:  5.2.11
 New Comment:

I'm confused.  The status shows as "no feedback" in r/o mode, but
"open" in edit mode.  I don't know what feedback was/is expected - as
far as I'm aware, it's an open problem.  Am I expected to post another
comment every week to keep it open, or what?


Previous Comments:


[2009-11-23 01:00:02] 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".



[2009-11-15 18:29:52] scratch65535 at att dot net

So the documentation is broken then?

"The two images will be merged according to pct which can range from 0
to 100. When pct = 0, no action is taken, when 100 this function behaves
identically to imagecopy() for pallete images, while it implements alpha
transparency for true colour images. "



[2009-11-15 18:26:39] scratch65535 at att dot net

UGH!  I just did another test using a more sophisticated image
(semi-transparent pixels) and "GIF mode" doesn't work for what I want.

It seems possible that imageCopyMerge() might be the culprit here or at
least one of them, because if I call imagePNG on the $src, I don't get
the white background color.



[2009-11-15 18:21:58] paj...@php.net

Quick note: imagecopymerge is not supposed to work with alpha. See the
examples code here: http://pierre.libgd.org/watermark/



[2009-11-15 17:50:06] scratch65535 at att dot net

Expected:
http://www.kalleload.net/uploads/gricmj/suhmidvvdrvt.jpg 

Got:
http://www.kalleload.net/uploads/otgxlc/fdahibpvswas.jpg

As I mentioned, I can get rid of the magenta - I left it in to show the
size of the "assembly" area.  But that white background in the PNG
defeats me.



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

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



#50249 [Asn]: ordinal month days don't work

2009-11-23 Thread rasmus
 ID:   50249
 Updated by:   ras...@php.net
 Reported By:  jennifer dot kimball at nrc dot ca
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: Solaris 10
 PHP Version:  5.3.1
 Assigned To:  derick
 New Comment:

I think a better way to do it currently is just to do it in 2 steps:

$d=date_create('first day of next month');
$d->modify("+2 days");



Previous Comments:


[2009-11-23 13:41:56] der...@php.net

I'll see if we can support this in some way without breaking anything
else— please ignore what Sjoerd wrote. mktime() and timestamps should
be avoided!



[2009-11-23 13:05:24] sjo...@php.net

Thank you for your bug report.

Here is a piece of code which may do what you want:




[2009-11-20 18:18:22] jennifer dot kimball at nrc dot ca

Description:

It appears impossible to write an expression that will generate the Nth
day of any month (except for first or last days).

Expressions like "third day of next month" fail in date_create().
Expressions like "next month +3 days" increment the month number and
add 3 days to the current day number.
Expressions like "first day of next month +2 days" give just the first
day of the month.



Reproduce code:
---
//today is Nov 20, 2009

$d1=date_create('third day of next month');
print_r(DateTime::getLastErrors()); //errors
echo 'd1: ',$d1->format('Y-m-d'); //nothing output

$d2=date_create('first day of next month');
echo 'd2: ',$d2->format('Y-m-d'); //2009-12-01, works as expected

$d3=date_create('first day of next month +2 days');
echo 'd3: ',$d3->format('Y-m-d'); //2009-12-01, not 2009-12-03

$d4=date_create('next month +3 days');
echo 'd4: ',$d4->format('Y-m-d'); //2009-12-23, also not 2009-12-03
though I can understand why



Expected result:

Array
(
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 0
[errors] => Array
(
)

)
d1: 2009-12-03

d2: 2009-12-01

d3: 2009-12-03

d4: 2009-12-23

Actual result:
--
Array
(
[warning_count] => 0
[warnings] => Array
(
)

[error_count] => 1
[errors] => Array
(
[10] => The timezone could not be found in the database
)

)
d1: 

d2: 2009-12-01

d3: 2009-12-01 //still the 1st, 2 days not added

d4: 2009-12-23





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



#50267 [Opn->Fbk]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread jani
 ID:   50267
 Updated by:   j...@php.net
 Reported By:  nachumk at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

FYI: Since PHP 5.3.0 you can use the "real" browscap.ini too: 
  
  http://browsers.garykeith.com/stream.asp?BrowsCapINI

Can you please provide shorter and complete example script with real
expected result (and actual) instead of the one you used now? I don't
quite understand what the problem here is..


Previous Comments:


[2009-11-23 14:06:52] nachumk at gmail dot com

http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI downloaded 
yesterday. Keep in mind that it works fine if I give it the 
parameter $_SERVER['HTTP_USER_AGENT'], showing that browscap is 
installed correctly. It seems to be an issue in php's ability to 
retrieve the user agent on it's own.



[2009-11-23 10:07:01] j...@php.net

And what browscap.ini are you using..? 



[2009-11-23 05:20:35] nachumk at gmail dot com

I am running Apache 2.2.14
(apache_2.2.14-win32-x86-openssl-0.9.8k.msi), 
PHP 5.3.1 (php-5.3.1-Win32-VC9-x86.msi (both as module and cgi), and 
php-5.3.1-nts-Win32-VC9-x86.msi), on Windows XP 32 bit.

It works when I run PHP 5.2.11.



[2009-11-23 05:18:19] nachumk at gmail dot com

Description:

get_browser should work with null string and doesn't when using 5.3.1.

5.2.11 works fine.

Reproduce code:
---
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>


Expected result:

That both get_browser calls should produce identical results.

Actual result:
--
The first call with $_SERVER['HTTP_USER_AGENT'] returns proper results

and the call with null returns a default response (same as what it
would 
return with a completely empty user agent string).





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



#50240 [Opn->Csd]: pdo_mysql.default_socket in php.ini shouldn't used if it's empty

2009-11-23 Thread iliaa
 ID:   50240
 Updated by:   il...@php.net
 Reported By:  foutrelis at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: PDO related
 Operating System: Arch Linux
 PHP Version:  5.3.1
 New Comment:

This bug has been fixed in SVN.

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:


[2009-11-23 15:45:05] s...@php.net

Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=291215
Log: Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't
used if it is empty).



[2009-11-20 12:29:12] foutrelis at gmail dot com

Description:

When pdo_mysql.default_socket in php.ini is empty, it shouldn't be used
and pdo_mysql should fallback to PDO_MYSQL_UNIX_ADDR.

It appears that OnUpdateStringUnempty should be used in the related
STD_PHP_INI_ENTRY definition in ext/pdo_mysql/pdo_mysql.c, instead of
OnUpdateString. Also, OnUpdateStringUnempty is used by the mysql and
mysqli extensions for their default_socket directives, so it makes sense
to use it here as well.

Proposed patch: http://bugs.archlinux.org/task/17179?getfile=4430






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



#50267 [Fbk->Opn]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread nachumk at gmail dot com
 ID:   50267
 User updated by:  nachumk at gmail dot com
 Reported By:  nachumk at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

Thanx for the update about browscap, I'll use that once I reinstall 
5.3.1. For now I'm sticking with 5.2.11.

A clearer explanation:
get_browser takes 2 parameters, 'useragent' and 'as array'. useragent 
can be a user agent string like $customUserAgent or it can be null 
which should use the current user agent. The behaviour is like this, 
when I give it the user agent $_SERVER['HTTP_USER_AGENT'] it works 
fine. It detects the browser, whether it's Mozilla or iPhone or 
whatever. When I give it null it doesn't detect anything. It's like I 
gave it an empty string for user agent.

I have shown the code a bit clearer by marking the lines to look at 
with ***. You will see that under 5.3.1 the print_r shows the 
returned array to be completely default when get_browser is called 
with a null parameter.

Here's the code I'm running:
http://www.w3.org/TR/html4/strict.dtd";> 
 
 
 
 
 
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>
 


Here's the output when 5.3.1 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => §^mozilla/5\.0 \(windows; u; windows 
nt 5\.1; .*\) applewebkit/.* \(khtml, like gecko\) chrome/4\.0\..* 
safari/.*$§ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows

NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

**  Using a null parameter in 5.3.1 returns incorrect results:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * 
[browser] => Default Browser [version] => 0 [majorver] => 0 [minorver]

=> 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => 
[win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => 
[backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => 
[javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] =>

[issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] 
=> [aol] => [aolversion] => 0 )


Here's the output when 5.2.11 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works:

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; u; windows nt 
5\.1; .*) applewebkit/.* (khtml, like gecko) chrome/4\.0\..* 
safari/.*$ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows 
NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

*** 5.2.11 does this right:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; u; windows nt 
5\.1; .*) applewebkit/.* (khtml, like gecko) chrome/4\.0\..* 
safari/.*$ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows 
NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 )


Previous Comments:



#50205 [Fbk->Opn]: Can't start Apache 2.2.14 with PHP 5.2.11

2009-11-23 Thread vladmu at mail dot ru
 ID:   50205
 User updated by:  vladmu at mail dot ru
 Reported By:  vladmu at mail dot ru
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: win32 only - Windows XP
 PHP Version:  5.2.11
 New Comment:

So, I have disabled all extensions in php.ini - Apache 2.2.14 works
fine with PHP 5.2.11. Then I have enabled one
after another and found the following extensions that block the
working:

php_mssql.dll
php_oci8.dll
php_pdo_mssql.dll
php_pdo_oci.dll
php_pdo_oci8.dll
php_pdo_sqlite_external.dll
php_pspell.dll
php_sybase_ct.dll

But after I have uninstalled PHP 5.2.11 and install PHP 5.2.10 only
with extensions above and Apache 2.2.14 works fine with PHP 5.2.10 with
all "buggly" extensions enabled!


Previous Comments:


[2009-11-21 11:13:19] paj...@php.net

Disable all extensions in php.ini, check if it works. Then enable one
after another to see which one is failing. Many extensions (like DB
related) requires clients to be installed and we do not distribute them.



[2009-11-20 19:31:25] vladmu at mail dot ru

I don't know this is the configuration error or something else but:

1. I have tried to install a snapshot and there is an equal bug.
2. I have tried to install an Apache 2.2.14 + PHP 5.2.10 and no any
errors have occured, and the same was with the Apache 2.2.14 + PHP
5.3.0

Therefore no bogus bug here, but really something wrong with your
5.2.11 libraries for WIndows. Please try to reproduce by yourself at
first before change the bug status to bogus.



[2009-11-20 10:28:09] paj...@php.net

Configuration error, ask on php-setup for support.



[2009-11-18 14:23:53] j...@php.net

Please try using this snapshot:

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

  http://windows.php.net/snapshots/

..and remove ALL old dlls and stuff before you do this..



[2009-11-17 17:22:35] vladmu at mail dot ru

Description:

There is a error from windows event viewer:

Faulting application httpd.exe, version 2.2.14.0, faulting module
php5ts.dll, version 5.2.11.11, fault address 0x000f330d.

Steps to reproduce:

1. Install Apache 2.2.14
2. Stop Apache 2.2 service
3. Install PHP 5.2.11 and select web server Apache 2.2 with defining
config path
4. Run Apache 2.2 service







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



#50205 [Opn->Bgs]: Can't start Apache 2.2.14 with PHP 5.2.11

2009-11-23 Thread pajoye
 ID:   50205
 Updated by:   paj...@php.net
 Reported By:  vladmu at mail dot ru
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: win32 only - Windows XP
 PHP Version:  5.2.11
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Messing with DLLs, all these extensions require external DLL or clients
to be installed.


Previous Comments:


[2009-11-23 17:00:57] vladmu at mail dot ru

So, I have disabled all extensions in php.ini - Apache 2.2.14 works
fine with PHP 5.2.11. Then I have enabled one
after another and found the following extensions that block the
working:

php_mssql.dll
php_oci8.dll
php_pdo_mssql.dll
php_pdo_oci.dll
php_pdo_oci8.dll
php_pdo_sqlite_external.dll
php_pspell.dll
php_sybase_ct.dll

But after I have uninstalled PHP 5.2.11 and install PHP 5.2.10 only
with extensions above and Apache 2.2.14 works fine with PHP 5.2.10 with
all "buggly" extensions enabled!



[2009-11-21 11:13:19] paj...@php.net

Disable all extensions in php.ini, check if it works. Then enable one
after another to see which one is failing. Many extensions (like DB
related) requires clients to be installed and we do not distribute them.



[2009-11-20 19:31:25] vladmu at mail dot ru

I don't know this is the configuration error or something else but:

1. I have tried to install a snapshot and there is an equal bug.
2. I have tried to install an Apache 2.2.14 + PHP 5.2.10 and no any
errors have occured, and the same was with the Apache 2.2.14 + PHP
5.3.0

Therefore no bogus bug here, but really something wrong with your
5.2.11 libraries for WIndows. Please try to reproduce by yourself at
first before change the bug status to bogus.



[2009-11-20 10:28:09] paj...@php.net

Configuration error, ask on php-setup for support.



[2009-11-18 14:23:53] j...@php.net

Please try using this snapshot:

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

  http://windows.php.net/snapshots/

..and remove ALL old dlls and stuff before you do this..



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50205

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



#50274 [NEW]: Segmentation fault SIGSEGV with protected variable with ssh2

2009-11-23 Thread graham dot simpson at hsbcib dot com
From: graham dot simpson at hsbcib dot com
Operating system: SuSE 10.2
PHP version:  5.3.1
PHP Bug Type: Reproducible crash
Bug description:  Segmentation fault SIGSEGV with protected variable with ssh2

Description:

Reproducible SIGSEGV fault whilst accessing protected variable via a
method in a class using ssh2 functions. 
-
Note, this happens in php 5.3.0 and php 5.3.1. My current live host is php
5.0.4 where this code happily runs.

Reproduce code:
---
#!/opt/sybase/php-5.3.1/bin/php -q
sessionparams = array
('hostname'=>'darkstar','username'=>'batman','port'=>'22',
'publickey'=>'/dbai/.ssh/id_rsa.pub',
   
'privatekey'=>'/dbai/.ssh/id_rsa','passphrase'=>'mypassphrase');
  $this->stdio = array();
}

public function Connect () {
  $this->connection = ssh2_connect($this->GetParameter("hostname"),
   $this->GetParameter("port"),
   array('hostkey'=>'ssh-rsa,ssh-dss'));
  if (!$this->connection) die ('Connection failed');
  $this->negotiatedmethods = ssh2_methods_negotiated ($this->connection);
  $this->authmethods =
ssh2_auth_none($this->connection,"userthatcannotexist");
  if (in_array('publickey',$this->authmethods)) {
unset ($this->connection);
$this->connection = ssh2_connect($this->GetParameter("hostname"),
 $this->GetParameter("port"),

array('hostkey'=>'ssh-rsa,ssh-dss'));
  }
  $rs = ssh2_auth_pubkey_file($this->connection,
  $this->GetParameter("username"),
  $this->GetParameter("publickey"),
  $this->GetParameter("privatekey"),
  $this->GetParameter("passphrase"));
}
public function Exec () {
  $stdiostream = ssh2_exec($this->connection,"uname -a");
  stream_set_blocking($stdiostream,TRUE);
  $output = array();
  while ($line = fgets($stdiostream)) {
flush();
$output[] = $line;
  }
  fclose ($stdiostream);
  $this->stdio = $output;
}

public function GetStdOut () {
  return $this->stdio;
}

public function Disconnect () {
  unset($this->connection);
}

protected function GetParameter ($parameter) {
  if ($this->sessionparams[$parameter]) {
return $this->sessionparams[$parameter];
  }
  return FALSE;
}

}

$conn = new Ssh();
$conn->Connect();
$conn->Exec();
$output = $conn->GetStdOut();
print_r($output);
$conn->Disconnect();
?>



Expected result:

Output from a basic ssh df -k command.

Actual result:
--
In the example above, the call to method $output=$conn->GetStdOut accesses
$this->stdio which causes a SIGSEGV in the calling script as soon as
$output is printed.
-
Note: More often than not the memory fault occurs - but not always!
Sometimes it works!!
-
Strace shows a SIGSEGV, but here's the gdb output:
(gbl00358) /tmp/gsi2 > ./repro.php
Memory fault
(gbl00358) /tmp/gsi2 > gdb /opt/sybase/php-5.3.1/bin/php
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run -qe repro.php
Starting program: /opt/sybase/php-5.3.1/bin/php -qe repro.php
[Thread debugging using libthread_db enabled]
[New Thread 47746607593328 (LWP 13931)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47746607593328 (LWP 13931)]
0x00767b6f in _zend_mm_alloc_int ()
(gdb) bt
#0  0x00767b6f in _zend_mm_alloc_int ()
#1  0x00769158 in _emalloc ()
#2  0x0079cf7d in _zend_hash_quick_add_or_update ()
#3  0x007ba950 in _get_zval_cv_lookup ()
#4  0x00863f75 in ZEND_ASSIGN_SPEC_CV_VAR_HANDLER ()
#5  0x007bcce4 in execute ()
#6  0x0078e87e in zend_execute_scripts ()
#7  0x0071a14f in php_execute_script ()
#8  0x00874b39 in main ()

So next, I disable ZEND mm...
(gbl00358) /tmp/gsi2 > USE_ZEND_ALLOC=0
(gbl00358) /tmp/gsi2 > export USE_ZEND_ALLOC
(gbl00358) /tmp/gsi2 > ./repro.php
*** glibc detected *** /opt/sybase/php-5.3.1/bin/php: malloc(): memory
corruption: 0x00e80a30 ***
=== Backtrace: =
/lib64/libc.so.6[0x2aaac6bcc31e]
/lib64/libc.so.6[0x2aaac6bce3b4]
/lib64/libc.so.6(malloc+0x86)[0x2aaac6bcf766]
/opt/sybase/php-5.3.1/bin/php(_emalloc+0x33)[0x769142]
/opt/sybase/libssh2-1.2.1/lib/libssh2.so.1(libssh2_session_init_ex+0x50)[0x2aaac706f920]
/opt/sybase/php-5.3.1/lib/php/extensions/ssh2.so(php_ssh2_session_connect+0xa0)[0x2aaac6f54160]
/opt/sybase/php-5.3.1/lib/php/extensions/ssh2.so(zif_ssh2_connect+0x6b)[0x2aaac6f549bb]
/opt/

#50274 [Com]: Segmentation fault SIGSEGV with protected variable with ssh2

2009-11-23 Thread graham dot simpson at hsbcib dot com
 ID:   50274
 Comment by:   graham dot simpson at hsbcib dot com
 Reported By:  graham dot simpson at hsbcib dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: SuSE 10.2
 PHP Version:  5.3.1
 New Comment:

BTW, I used PHP 5.3.1, libssh2-1.2.1 with openssl-0.9.8.k.

Also used a minimal php configure, here it is:
CFLAGS="-DSYB_LP64" ./configure --with-libdir=lib64
--prefix=${TDIR}/php-5.3.1 --with-gnu-ld --enable-libgcc
--with-openssl=${TDIR}/openssl-0.9.8k --with-ssh2=${TDIR}/libssh2-1.2.1
--with-libxml-dir=${TDIR}/libxml2-2.7.5
--with-xsl=${TDIR}/libxslt-1.1.26 \
--with-zlib --disable-cgi --with-bz2
--with-apxs2=${TDIR}/httpd-2.2.13/bin/apxs


Previous Comments:


[2009-11-23 17:25:17] graham dot simpson at hsbcib dot com

Description:

Reproducible SIGSEGV fault whilst accessing protected variable via a
method in a class using ssh2 functions. 
-
Note, this happens in php 5.3.0 and php 5.3.1. My current live host is
php 5.0.4 where this code happily runs.

Reproduce code:
---
#!/opt/sybase/php-5.3.1/bin/php -q
sessionparams = array
('hostname'=>'darkstar','username'=>'batman','port'=>'22',
'publickey'=>'/dbai/.ssh/id_rsa.pub',
   
'privatekey'=>'/dbai/.ssh/id_rsa','passphrase'=>'mypassphrase');
  $this->stdio = array();
}

public function Connect () {
  $this->connection = ssh2_connect($this->GetParameter("hostname"),
   $this->GetParameter("port"),
  
array('hostkey'=>'ssh-rsa,ssh-dss'));
  if (!$this->connection) die ('Connection failed');
  $this->negotiatedmethods = ssh2_methods_negotiated
($this->connection);
  $this->authmethods =
ssh2_auth_none($this->connection,"userthatcannotexist");
  if (in_array('publickey',$this->authmethods)) {
unset ($this->connection);
$this->connection = ssh2_connect($this->GetParameter("hostname"),
 $this->GetParameter("port"),

array('hostkey'=>'ssh-rsa,ssh-dss'));
  }
  $rs = ssh2_auth_pubkey_file($this->connection,
  $this->GetParameter("username"),
  $this->GetParameter("publickey"),
  $this->GetParameter("privatekey"),
  $this->GetParameter("passphrase"));
}
public function Exec () {
  $stdiostream = ssh2_exec($this->connection,"uname -a");
  stream_set_blocking($stdiostream,TRUE);
  $output = array();
  while ($line = fgets($stdiostream)) {
flush();
$output[] = $line;
  }
  fclose ($stdiostream);
  $this->stdio = $output;
}

public function GetStdOut () {
  return $this->stdio;
}

public function Disconnect () {
  unset($this->connection);
}

protected function GetParameter ($parameter) {
  if ($this->sessionparams[$parameter]) {
return $this->sessionparams[$parameter];
  }
  return FALSE;
}

}

$conn = new Ssh();
$conn->Connect();
$conn->Exec();
$output = $conn->GetStdOut();
print_r($output);
$conn->Disconnect();
?>



Expected result:

Output from a basic ssh df -k command.

Actual result:
--
In the example above, the call to method $output=$conn->GetStdOut
accesses $this->stdio which causes a SIGSEGV in the calling script as
soon as $output is printed.
-
Note: More often than not the memory fault occurs - but not always!
Sometimes it works!!
-
Strace shows a SIGSEGV, but here's the gdb output:
(gbl00358) /tmp/gsi2 > ./repro.php
Memory fault
(gbl00358) /tmp/gsi2 > gdb /opt/sybase/php-5.3.1/bin/php
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run -qe repro.php
Starting program: /opt/sybase/php-5.3.1/bin/php -qe repro.php
[Thread debugging using libthread_db enabled]
[New Thread 47746607593328 (LWP 13931)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47746607593328 (LWP 13931)]
0x00767b6f in _zend_mm_alloc_int ()
(gdb) bt
#0  0x00767b6f in _zend_mm_alloc_int ()
#1  0x00769158 in _emalloc ()
#2  0x0079cf7d in _zend_hash_quick_add_or_update ()
#3  0x007ba950 in _get_zval_cv_lookup ()
#4  0x00863f75 in ZEND_ASSIGN_SPEC_CV_VAR_HANDLER ()
#5  0x007bcce4 in execute ()
#6  0x0078e87e in zend_execute_scripts ()
#7  0x0071a14f in php_execute_script ()
#8  0x00874b39 in main ()

So next, I disable ZEND mm...
(gbl00358) /tmp/gsi2 > USE_ZEND_ALLOC=0
(gbl00358

#50274 [Opn->Bgs]: Segmentation fault SIGSEGV with protected variable with ssh2

2009-11-23 Thread pajoye
 ID:   50274
 Updated by:   paj...@php.net
 Reported By:  graham dot simpson at hsbcib dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: SuSE 10.2
 PHP Version:  5.3.1
 New Comment:

Please report SSH2 to pecl.php.net as it is a PECL extension only.


Previous Comments:


[2009-11-23 17:28:50] graham dot simpson at hsbcib dot com

BTW, I used PHP 5.3.1, libssh2-1.2.1 with openssl-0.9.8.k.

Also used a minimal php configure, here it is:
CFLAGS="-DSYB_LP64" ./configure --with-libdir=lib64
--prefix=${TDIR}/php-5.3.1 --with-gnu-ld --enable-libgcc
--with-openssl=${TDIR}/openssl-0.9.8k --with-ssh2=${TDIR}/libssh2-1.2.1
--with-libxml-dir=${TDIR}/libxml2-2.7.5
--with-xsl=${TDIR}/libxslt-1.1.26 \
--with-zlib --disable-cgi --with-bz2
--with-apxs2=${TDIR}/httpd-2.2.13/bin/apxs



[2009-11-23 17:25:17] graham dot simpson at hsbcib dot com

Description:

Reproducible SIGSEGV fault whilst accessing protected variable via a
method in a class using ssh2 functions. 
-
Note, this happens in php 5.3.0 and php 5.3.1. My current live host is
php 5.0.4 where this code happily runs.

Reproduce code:
---
#!/opt/sybase/php-5.3.1/bin/php -q
sessionparams = array
('hostname'=>'darkstar','username'=>'batman','port'=>'22',
'publickey'=>'/dbai/.ssh/id_rsa.pub',
   
'privatekey'=>'/dbai/.ssh/id_rsa','passphrase'=>'mypassphrase');
  $this->stdio = array();
}

public function Connect () {
  $this->connection = ssh2_connect($this->GetParameter("hostname"),
   $this->GetParameter("port"),
  
array('hostkey'=>'ssh-rsa,ssh-dss'));
  if (!$this->connection) die ('Connection failed');
  $this->negotiatedmethods = ssh2_methods_negotiated
($this->connection);
  $this->authmethods =
ssh2_auth_none($this->connection,"userthatcannotexist");
  if (in_array('publickey',$this->authmethods)) {
unset ($this->connection);
$this->connection = ssh2_connect($this->GetParameter("hostname"),
 $this->GetParameter("port"),

array('hostkey'=>'ssh-rsa,ssh-dss'));
  }
  $rs = ssh2_auth_pubkey_file($this->connection,
  $this->GetParameter("username"),
  $this->GetParameter("publickey"),
  $this->GetParameter("privatekey"),
  $this->GetParameter("passphrase"));
}
public function Exec () {
  $stdiostream = ssh2_exec($this->connection,"uname -a");
  stream_set_blocking($stdiostream,TRUE);
  $output = array();
  while ($line = fgets($stdiostream)) {
flush();
$output[] = $line;
  }
  fclose ($stdiostream);
  $this->stdio = $output;
}

public function GetStdOut () {
  return $this->stdio;
}

public function Disconnect () {
  unset($this->connection);
}

protected function GetParameter ($parameter) {
  if ($this->sessionparams[$parameter]) {
return $this->sessionparams[$parameter];
  }
  return FALSE;
}

}

$conn = new Ssh();
$conn->Connect();
$conn->Exec();
$output = $conn->GetStdOut();
print_r($output);
$conn->Disconnect();
?>



Expected result:

Output from a basic ssh df -k command.

Actual result:
--
In the example above, the call to method $output=$conn->GetStdOut
accesses $this->stdio which causes a SIGSEGV in the calling script as
soon as $output is printed.
-
Note: More often than not the memory fault occurs - but not always!
Sometimes it works!!
-
Strace shows a SIGSEGV, but here's the gdb output:
(gbl00358) /tmp/gsi2 > ./repro.php
Memory fault
(gbl00358) /tmp/gsi2 > gdb /opt/sybase/php-5.3.1/bin/php
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run -qe repro.php
Starting program: /opt/sybase/php-5.3.1/bin/php -qe repro.php
[Thread debugging using libthread_db enabled]
[New Thread 47746607593328 (LWP 13931)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47746607593328 (LWP 13931)]
0x00767b6f in _zend_mm_alloc_int ()
(gdb) bt
#0  0x00767b6f in _zend_mm_alloc_int ()
#1  0x00769158 in _emalloc ()
#2  0x0079cf7d in _zend_hash_quick_add_or_update ()
#3  0x007ba950 in _get_zval_cv_lookup ()
#4  0x00863f75 in ZEND_ASSIGN_SPEC_CV_VAR_HANDLER ()
#5  0x007bcce4 in execute ()
#6  0x0

#49333 [Bgs]: Bug in recursive regex processing

2009-11-23 Thread laszlo dot janszky at gmail dot com
 ID:   49333
 User updated by:  laszlo dot janszky at gmail dot com
-Reported By:  inf3rno dot hu at gmail dot com
+Reported By:  laszlo dot janszky at gmail dot com
 Status:   Bogus
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5.2.10
 New Comment:

This bug is in relation with the memory leak I found:
http://bugs.php.net/bug.php?id=50264

The code works with a raised pcre.backtrack_limit.


Previous Comments:


[2009-08-25 10:25:16] j...@php.net

You can abuse things to some extend but there's a limit always. And
this is not PHP bug anyway (if a bug at all) but PCRE lib.



[2009-08-25 10:05:57] inf3rno dot hu at gmail dot com

Original pattern was this:
'%(?.*?)(?:{\\s*(?[a-z0-9_]+)(?:\\s*(?:(?(?:(?:\\s+[a-z0-9_]+\\s*=\\s*)?(?:\\$[a-z0-9_]+(?:->[a-z0-9_]+|\\.[a-z0-9_]+)*|\\d+(?:\\.\\d+)?|".*?(?:".*?)*"))+)|(?(?:(?:\\s+[a-z0-9_]+(?:
[a-z0-9_]+)*\\s+)?(?:\\$[a-z0-9_]+(?:->[a-z0-9_]+|\\.[a-z0-9_]+)*|\\d+(?:\\.\\d+)?|".*?(?:".*?)*"))+)|(?(?:\\$[a-z0-9_]+(?:->[a-z0-9_]+|\\.[a-z0-9_]+)*|\\d+(?:\\.\\d+)?|".*?(?:".*?)*")(?:\\s*,\\s*(?:\\$[a-z0-9_]+(?:->[a-z0-9_]+|\\.[a-z0-9_]+)*|\\d+(?:\\.\\d+)?|".*?(?:".*?)*"))*)))?(?:\\s*}(?.*?(?:(?R).*?)*?){\\s*/(?P=function))?\\s*}|{\\s*\\$(?[a-z0-9_]+(?:->[a-z0-9_]+|\\.[a-z0-9_]+)*)\\s*}|{\\s*\\*(?.*?)\\*\\s*}|$)%sDu'

This pattern matches on similar tokens like Smarty uses.

I need the
%string_before(?:function_with_recursive_block|variable|comment|$)%
structure because I have to capture the string before the token too, and
the fastest way for that is this.
With offset capture and a
%function_with_recursive_block|variable|comment% structured regex I can
do this too, but it's the slower way, cause I have to call strlen and
substr functions in a loop.

So I need that .*? :-)
But recursive patterns have a strange behavior.
I thought that '%.*?(?:([a-z])(?:(?R)*?\1)?|$)%sD' has to work too, but
it didn't. Logically, the (?R)*? means here:
"string+token...+string+end_of_the_recursive_part", but "$" is the end
of the whole string, and not the end of the recursive part. :S



[2009-08-25 08:47:29] j dot boggiano at seld dot be

I am not entirely sure what you are trying to achieve so maybe I broke
some functionality, but with this pattern at least it gives the expected
result with \r\n or \n (of course \n has less chars..)

$pattern='%\s*(?:([a-z])(?:.*?(?:(?R).*?)*?\1)?|$)%sD';

Is that good enough ?



[2009-08-25 08:35:43] j...@php.net

When the $test contains \r\n instead of \n it fails. 



[2009-08-24 12:21:40] inf3rno dot hu at gmail dot com

I reproduced it on another computer with the latest WAMPServer (Apache
2.2.11, PHP 5.3.0). I copied the code from here.



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

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



#50267 [Opn->Fbk]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread jani
 ID:   50267
 Updated by:   j...@php.net
 Reported By:  nachumk at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

I'll try again, but I'm running out of wire: Provide a standalone
script that can be run on command line to reproduce the issue in simple
manner. Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT'].


Previous Comments:


[2009-11-23 16:17:13] nachumk at gmail dot com

Thanx for the update about browscap, I'll use that once I reinstall 
5.3.1. For now I'm sticking with 5.2.11.

A clearer explanation:
get_browser takes 2 parameters, 'useragent' and 'as array'. useragent 
can be a user agent string like $customUserAgent or it can be null 
which should use the current user agent. The behaviour is like this, 
when I give it the user agent $_SERVER['HTTP_USER_AGENT'] it works 
fine. It detects the browser, whether it's Mozilla or iPhone or 
whatever. When I give it null it doesn't detect anything. It's like I 
gave it an empty string for user agent.

I have shown the code a bit clearer by marking the lines to look at 
with ***. You will see that under 5.3.1 the print_r shows the 
returned array to be completely default when get_browser is called 
with a null parameter.

Here's the code I'm running:
http://www.w3.org/TR/html4/strict.dtd";> 
 
 
 
 
 
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>
 


Here's the output when 5.3.1 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => §^mozilla/5\.0 \(windows; u; windows 
nt 5\.1; .*\) applewebkit/.* \(khtml, like gecko\) chrome/4\.0\..* 
safari/.*$§ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows

NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

**  Using a null parameter in 5.3.1 returns incorrect results:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * 
[browser] => Default Browser [version] => 0 [majorver] => 0 [minorver]

=> 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => 
[win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => 
[backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => 
[javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] =>

[issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] 
=> [aol] => [aolversion] => 0 )


Here's the output when 5.2.11 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works:

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; u; windows nt 
5\.1; .*) applewebkit/.* (khtml, like gecko) chrome/4\.0\..* 
safari/.*$ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows 
NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

*** 5.2.11 does this right:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; u; windows nt 
5\.1; .*) applewebkit/.* (khtml, like gecko) chrome/4\.0\..* 
safari/.*$ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows 
NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] =

#50205 [Bgs]: Can't start Apache 2.2.14 with PHP 5.2.11

2009-11-23 Thread vladmu at mail dot ru
 ID:   50205
 User updated by:  vladmu at mail dot ru
 Reported By:  vladmu at mail dot ru
 Status:   Bogus
-Bug Type: Apache2 related
+Bug Type: Dynamic loading
 Operating System: win32 only - Windows XP
 PHP Version:  5.2.11
 Assigned To:  pajoye
 New Comment:

Ok, I agree with this, all these extensions require external DLL or
clients to be installed. I have changed a category to "Dynamic loading"
because it seems that there is no Apache related bug. But the one
question still is not answered, why Apache doesn't work with PHP 5.2.11
when these extensions are enabled but works fine with PHP 5.2.10 and PHP
5.3.0 even if these extensions are enabled? Maybe it will be better to
exclude or replace these "bugly" extensions with versions similar to PHP
5.2.10 and PHP 5.3.0?


Previous Comments:


[2009-11-23 17:03:35] paj...@php.net

Messing with DLLs, all these extensions require external DLL or clients
to be installed.



[2009-11-23 17:00:57] vladmu at mail dot ru

So, I have disabled all extensions in php.ini - Apache 2.2.14 works
fine with PHP 5.2.11. Then I have enabled one
after another and found the following extensions that block the
working:

php_mssql.dll
php_oci8.dll
php_pdo_mssql.dll
php_pdo_oci.dll
php_pdo_oci8.dll
php_pdo_sqlite_external.dll
php_pspell.dll
php_sybase_ct.dll

But after I have uninstalled PHP 5.2.11 and install PHP 5.2.10 only
with extensions above and Apache 2.2.14 works fine with PHP 5.2.10 with
all "buggly" extensions enabled!



[2009-11-21 11:13:19] paj...@php.net

Disable all extensions in php.ini, check if it works. Then enable one
after another to see which one is failing. Many extensions (like DB
related) requires clients to be installed and we do not distribute them.



[2009-11-20 19:31:25] vladmu at mail dot ru

I don't know this is the configuration error or something else but:

1. I have tried to install a snapshot and there is an equal bug.
2. I have tried to install an Apache 2.2.14 + PHP 5.2.10 and no any
errors have occured, and the same was with the Apache 2.2.14 + PHP
5.3.0

Therefore no bogus bug here, but really something wrong with your
5.2.11 libraries for WIndows. Please try to reproduce by yourself at
first before change the bug status to bogus.



[2009-11-20 10:28:09] paj...@php.net

Configuration error, ask on php-setup for support.



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

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



#48216 [Com]: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Extra content at the end of the doc

2009-11-23 Thread ondra dot podolinsky at seznam dot cz
 ID:   48216
 Comment by:   ondra dot podolinsky at seznam dot cz
 Reported By:  mark at everytruckjob dot com
 Status:   No Feedback
 Bug Type: SOAP related
 Operating System: CentOs 5.3
 PHP Version:  5.3.0RC2
 New Comment:

The same problem: win xp, php 5.3.0.
[faultstring] => SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://webapi.allegro.pl/uploader.php?wsdl' : Extra content at the end
of the document [faultcode] => WSDL


Previous Comments:


[2009-11-17 10:37:17] dmitry dot dulepov at gmail dot com

Same issue on PHP 5.3 that comes with Mac OS X:

Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 
'http://typo3.org/wsdl/tx_ter_wsdl.php' : Extra content at the end of 
the document in /Users/user/Projects/TYPO3/typo3_src-
4.2.6/typo3/mod/tools/em/class.em_soap.php on line 115



[2009-10-30 15:04:50] nadavkav at gmail dot com

similar issue, on Debian unstable , PHP/5.3.0-3

laptop:/var/www/moodle-weekly/wspp/clients# ./mkclasses.sh
PHP Notice:  Undefined offset: 2 in /var/www/moodle-
weekly/wspp/wsdl2php.php on line 84
PHP Notice:  Undefined offset: 2 in /var/www/moodle-
weekly/wspp/wsdl2php.php on line 85
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 
'http://localhost/moodle-weekly/wspp/wsdl_pp.php' : Extra content at 
the end of the document
 in /var/www/moodle-weekly/wspp/wsdl2php.php on line 88
SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load 
from 'http://localhost/moodle-weekly/wspp/wsdl_pp.php' : Extra content

at the end of the document
 in /var/www/moodle-weekly/wspp/wsdl2php.php:88
Stack trace:
#0 /var/www/moodle-weekly/wspp/wsdl2php.php(88): SoapClient-
>SoapClient('http://localhos...')
#1 {main}laptop:/var/www/moodle-weekly/wspp/clients#



[2009-10-30 15:04:23] nadavkav at gmail dot com

similar issue, on Debian unstable , PHP/5.3.0-3

laptop:/var/www/moodle-weekly/wspp/clients# ./mkclasses.sh
PHP Notice:  Undefined offset: 2 in /var/www/moodle-
weekly/wspp/wsdl2php.php on line 84
PHP Notice:  Undefined offset: 2 in /var/www/moodle-
weekly/wspp/wsdl2php.php on line 85
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 
'http://localhost/moodle-weekly/wspp/wsdl_pp.php' : Extra content at 
the end of the document
 in /var/www/moodle-weekly/wspp/wsdl2php.php on line 88
SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load 
from 'http://localhost/moodle-weekly/wspp/wsdl_pp.php' : Extra content

at the end of the document
 in /var/www/moodle-weekly/wspp/wsdl2php.php:88
Stack trace:
#0 /var/www/moodle-weekly/wspp/wsdl2php.php(88): SoapClient-
>SoapClient('http://localhos...')
#1 {main}laptop:/var/www/moodle-weekly/wspp/clients#



[2009-10-15 01:00:00] 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".



[2009-10-07 18:31:10] sjo...@php.net

Please try using this snapshot:

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

  http://windows.php.net/snapshots/





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

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



#50264 [Com]: Possible pcre memory leak

2009-11-23 Thread laszlo dot janszky at gmail dot com
 ID:   50264
 Comment by:   laszlo dot janszky at gmail dot com
 Reported By:  laszlo dot janszky at gmail dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5.3.1
 New Comment:

The leak is in relation with this
http://bugs.php.net/bug.php?id=49333


Here is a simplyfied example with eight "withoutBlock" tokens:



The basic syntax is:
  {withBlock}block{/withBlock}
or
  {withoutBlock}


As the {withBlock} opener part is of the same structure like the
{withoutBlock}, it starts to collect the string after the {withoutBlock}
to the backtrace. But for some kind of reason the {withoutBlock}
backtrace eats up the memory superexponential, not linear like in the
case of {withBlock}.



A measured the memory usage with the simplyfied example. It was not
superexponential, just exponential. I think cause I have in this example
two capturing groups only, not a lot like in the original code.

tokens  M1[b]   M2[b]   LN(M2)
1   19  22  3,0910
2   53  115 4,7449
3   87  405 6,0039
4   121 12867,1593
5   155 39408,2789
6   189 11913   9,3854
7   223 35843   10,4869
8   257 107644  11,6204

M1 = 34 * N - 15
R^2 = 1

M2 = exp ( 1,1192 * N + 2,6669 )
R^2 = 0, for the 3-8 part

Btw. it's funny memory usage.


Previous Comments:


[2009-11-22 18:53:14] laszlo dot janszky at gmail dot com

If I remove the recursive part
(?:\\}(?.*?(?:(?0).*?)*?)\\{/(?P=function))?
 from the end of the regex, then it works fine...



[2009-11-22 18:47:14] laszlo dot janszky at gmail dot com

Description:

I have a huge recursive regex (about 500bytes), which needs a lot of
memory for backtrace.

The regex matches on templates like
{command1 arg1=$arg1 arg2=$arg2|modifier2
arg3="text"|modifier3:modarg31:modarg32}
etc

If I use the regex with preg_match_all, then the backtrace memory usage
depends on the count of the commands superexponential. 

So:
 R^2 =   0,9977 (R^2 for trendline)
 ln ln M =   0,0787 * N + 1,9304  
 [M] =   used backtrack memory in bytes  
 [N] =   number of command calls  

It don't think that more than 1Mb memory usage is normal for a 0.0002Mb
string.

The recursion memory usage is normal(under 1kb). I'm pretty
disappointed because I can't use my template engine because of a badly
written pcre engine.

Reproduce code:
---
$template1='
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
';

$template2='
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test
';

$regex='%\\{(?(?:\\w+))(?:(?\\s(?:[\\w_]+(?:\\s[\\w_]+)*\\s)?(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?)(?:\\|\\w+(?::(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?))*)*(?:\\s[\\w_]+(?:\\s[\\w_]+)*\\s(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?)(?:\\|\\w+(?::(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?))*)*)*(?:\\s[\\w_]+(?:\\s[\\w_]+)*)?)|(?(?:\\s\\w+=(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?)(?:\\|\\w+(?::(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?))*)*)*))(?:\\}(?.*?(?:(?0).*?)*?)\\{/(?P=function))?\\}%usD';


$one_Mb=1024*1024;
$one_kb=1024;

ini_set('pcre.backtrack_limit', $one_Mb);
ini_set('pcre.recursion_limit', $one_kb);

preg_match_all($regex,$template1,$matches1,PREG_SET_ORDER);
preg_match_all($regex,$template2,$matches2,PREG_SET_ORDER);


echo 'test1:';
echo (!count($matches1)?'failed':'ok').'';
echo 'test2:';
echo (!count($matches2)?'failed':'ok').'';


Expected result:

test1:
ok
test2:
ok

Actual result:
--
test1:
failed
test2:
ok





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



#50205 [Bgs]: Can't start Apache 2.2.14 with PHP 5.2.11

2009-11-23 Thread pajoye
 ID:   50205
 Updated by:   paj...@php.net
 Reported By:  vladmu at mail dot ru
 Status:   Bogus
 Bug Type: Dynamic loading
 Operating System: win32 only - Windows XP
 PHP Version:  5.2.11
 Assigned To:  pajoye
 New Comment:

they work just fine here (10 different windows). As I said, something
is wrong in your setup. You ask for further support on the php-windows
or php-setup ML.


Previous Comments:


[2009-11-23 19:00:38] vladmu at mail dot ru

Ok, I agree with this, all these extensions require external DLL or
clients to be installed. I have changed a category to "Dynamic loading"
because it seems that there is no Apache related bug. But the one
question still is not answered, why Apache doesn't work with PHP 5.2.11
when these extensions are enabled but works fine with PHP 5.2.10 and PHP
5.3.0 even if these extensions are enabled? Maybe it will be better to
exclude or replace these "bugly" extensions with versions similar to PHP
5.2.10 and PHP 5.3.0?



[2009-11-23 17:03:35] paj...@php.net

Messing with DLLs, all these extensions require external DLL or clients
to be installed.



[2009-11-23 17:00:57] vladmu at mail dot ru

So, I have disabled all extensions in php.ini - Apache 2.2.14 works
fine with PHP 5.2.11. Then I have enabled one
after another and found the following extensions that block the
working:

php_mssql.dll
php_oci8.dll
php_pdo_mssql.dll
php_pdo_oci.dll
php_pdo_oci8.dll
php_pdo_sqlite_external.dll
php_pspell.dll
php_sybase_ct.dll

But after I have uninstalled PHP 5.2.11 and install PHP 5.2.10 only
with extensions above and Apache 2.2.14 works fine with PHP 5.2.10 with
all "buggly" extensions enabled!



[2009-11-21 11:13:19] paj...@php.net

Disable all extensions in php.ini, check if it works. Then enable one
after another to see which one is failing. Many extensions (like DB
related) requires clients to be installed and we do not distribute them.



[2009-11-20 19:31:25] vladmu at mail dot ru

I don't know this is the configuration error or something else but:

1. I have tried to install a snapshot and there is an equal bug.
2. I have tried to install an Apache 2.2.14 + PHP 5.2.10 and no any
errors have occured, and the same was with the Apache 2.2.14 + PHP
5.3.0

Therefore no bogus bug here, but really something wrong with your
5.2.11 libraries for WIndows. Please try to reproduce by yourself at
first before change the bug status to bogus.



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

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



#50183 [Opn->Asn]: What feedback is expected?

2009-11-23 Thread pajoye
 ID:   50183
 Updated by:   paj...@php.net
 Reported By:  scratch65535 at att dot net
-Status:   Open
+Status:   Assigned
 Bug Type: GD related
-Operating System: W2K
+Operating System: *
-PHP Version:  5.2.11
+PHP Version:  *
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

It looks to me to be a misusage for imagecopymerge. I have to test with
your code to be sure. move to assigned.


Previous Comments:


[2009-11-23 14:42:28] scratch65535 at att dot net

I'm confused.  The status shows as "no feedback" in r/o mode, but
"open" in edit mode.  I don't know what feedback was/is expected - as
far as I'm aware, it's an open problem.  Am I expected to post another
comment every week to keep it open, or what?



[2009-11-23 01:00:02] 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".



[2009-11-15 18:29:52] scratch65535 at att dot net

So the documentation is broken then?

"The two images will be merged according to pct which can range from 0
to 100. When pct = 0, no action is taken, when 100 this function behaves
identically to imagecopy() for pallete images, while it implements alpha
transparency for true colour images. "



[2009-11-15 18:26:39] scratch65535 at att dot net

UGH!  I just did another test using a more sophisticated image
(semi-transparent pixels) and "GIF mode" doesn't work for what I want.

It seems possible that imageCopyMerge() might be the culprit here or at
least one of them, because if I call imagePNG on the $src, I don't get
the white background color.



[2009-11-15 18:21:58] paj...@php.net

Quick note: imagecopymerge is not supposed to work with alpha. See the
examples code here: http://pierre.libgd.org/watermark/



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

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



#50264 [Com]: Possible pcre memory leak

2009-11-23 Thread laszlo dot janszky at gmail dot com
 ID:   50264
 Comment by:   laszlo dot janszky at gmail dot com
 Reported By:  laszlo dot janszky at gmail dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5.3.1
 New Comment:

If it is not clear, by the test:

the 8 tokens withBlock (M1) test string is:

$test='
{display}
{display}
{display}
{display}
{display}
{display}
{display}
{display}
{/display}
{/display}
{/display}
{/display}
{/display}
{/display}
{/display}
{/display}
';

and the 8 tokens withoutBlock (M2) test string is:

$test='
{display}
{display}
{display}
{display}
{display}
{display}
{display}
{display}
';


Previous Comments:


[2009-11-23 19:21:02] laszlo dot janszky at gmail dot com

The leak is in relation with this
http://bugs.php.net/bug.php?id=49333


Here is a simplyfied example with eight "withoutBlock" tokens:



The basic syntax is:
  {withBlock}block{/withBlock}
or
  {withoutBlock}


As the {withBlock} opener part is of the same structure like the
{withoutBlock}, it starts to collect the string after the {withoutBlock}
to the backtrace. But for some kind of reason the {withoutBlock}
backtrace eats up the memory superexponential, not linear like in the
case of {withBlock}.



A measured the memory usage with the simplyfied example. It was not
superexponential, just exponential. I think cause I have in this example
two capturing groups only, not a lot like in the original code.

tokens  M1[b]   M2[b]   LN(M2)
1   19  22  3,0910
2   53  115 4,7449
3   87  405 6,0039
4   121 12867,1593
5   155 39408,2789
6   189 11913   9,3854
7   223 35843   10,4869
8   257 107644  11,6204

M1 = 34 * N - 15
R^2 = 1

M2 = exp ( 1,1192 * N + 2,6669 )
R^2 = 0, for the 3-8 part

Btw. it's funny memory usage.



[2009-11-22 18:53:14] laszlo dot janszky at gmail dot com

If I remove the recursive part
(?:\\}(?.*?(?:(?0).*?)*?)\\{/(?P=function))?
 from the end of the regex, then it works fine...



[2009-11-22 18:47:14] laszlo dot janszky at gmail dot com

Description:

I have a huge recursive regex (about 500bytes), which needs a lot of
memory for backtrace.

The regex matches on templates like
{command1 arg1=$arg1 arg2=$arg2|modifier2
arg3="text"|modifier3:modarg31:modarg32}
etc

If I use the regex with preg_match_all, then the backtrace memory usage
depends on the count of the commands superexponential. 

So:
 R^2 =   0,9977 (R^2 for trendline)
 ln ln M =   0,0787 * N + 1,9304  
 [M] =   used backtrack memory in bytes  
 [N] =   number of command calls  

It don't think that more than 1Mb memory usage is normal for a 0.0002Mb
string.

The recursion memory usage is normal(under 1kb). I'm pretty
disappointed because I can't use my template engine because of a badly
written pcre engine.

Reproduce code:
---
$template1='
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
';

$template2='
{display var=$link}
{display var=$link}
{display var=$link}
{display var=$link}
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test 
test test test test test
';

$regex='%\\{(?(?:\\w+))(?:(?\\s(?:[\\w_]+(?:\\s[\\w_]+)*\\s)?(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?)(?:\\|\\w+(?::(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?))*)*(?:\\s[\\w_]+(?:\\s[\\w_]+)*\\s(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?)(?:\\|\\w+(?::(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?))*)*)*(?:\\s[\\w_]+(?:\\s[\\w_]+)*)?)|(?(?:\\s\\w+=(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?)(?:\\|\\w+(?::(?:\\$\\w+(?:->\\w+|\\.\\w+)*|"(?:.*?)"|\\d+(?:\\.\\d+)?))*)*)*))(?:\\}(?.*?(?:(?0).*?)*?)\\{/(?P=function))?\\}%usD';


$one_Mb=1024*1024;
$one_kb=1024;

ini_set('pcre.backtrack_limit', $one_Mb);
ini_set('pcre.recursion_limit', $one_kb);

preg_match_all($regex,$template1,$matches1,PREG_SET_ORDER);
preg_match_all($regex,$template2,$matches2,PREG_SET_ORDER);


echo 'test1:';
echo (!count($matches1)?'failed':'ok').'';
echo 'test2:';
echo (!count($matches2)?'failed':'ok').'';


Expected result:

test1:
ok
test2:
ok

Actual result:
--
test1:
failed
test2:
ok





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



#50275 [NEW]: get_class_vars with protected members inconsistent

2009-11-23 Thread msa at xtivate dot de
From: msa at xtivate dot de
Operating system: ubuntu
PHP version:  5.2.11
PHP Bug Type: Class/Object related
Bug description:  get_class_vars with protected members inconsistent

Description:

get_class_vars return is inconsistent.
from inside the class it returnes the protected members as well as the
public.
from outside the class it returns only the public.

until php 5.2.10 it only returned the public, not the non-public.
(as is it specified in the documentation that it only returns the
public...)


so... now it does not only return the non-public when called from inside
the actual class, but is inconsistent with the output  that one gets
calling outside of the class.

this is a _major issiue_ in terms of scoping/inheritance/consitency.


please change it back to the way it was before because that was 
a) consistent 
and
b) in accordance with the spec ( "only public" )




Reproduce code:
---
abstract class Vader{
protected $vaders_protected_var;
}

class Luke extends Vader {
public $lukes_public_var;   
final function ShowVars(){
echo " inside Luke:";
print_r(get_class_vars(get_class($this)));
}
}

$luke = new Luke();

$luke->ShowVars();

echo " outside luke:";
print_r( get_class_vars("Luke") );


Expected result:

inside Luke:
Array ( [lukes_public_var] => )
outside luke:
Array ( [lukes_public_var] => ) 

Actual result:
--
inside Luke:
Array ( [lukes_public_var] => [vaders_protected_var] => )
outside luke:
Array ( [lukes_public_var] => ) 

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



#50233 [Opn]: This is not enought description.

2009-11-23 Thread bjori
 ID:   50233
 Updated by:   bj...@php.net
 Reported By:  k_radek at yahoo dot pl
 Status:   Open
-Bug Type: Documentation problem
+Bug Type: Scripting Engine problem
 Operating System: GNU/Linux
 PHP Version:  5.2.11
 New Comment:

That makes no sense.
Reclassified as an engine problem.


Previous Comments:


[2009-11-19 16:00:14] k_radek at yahoo dot pl

Description:

Last paremeter defined in a function says that you can define constant
with case-insensitive option but says nothing about that it allows you
to REDEFINE constant...

Reproduce code:
---
---
>From manual page: function.define#Parameters
---

"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values."

Expected result:

"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values. It allows you to redefine constant."

Actual result:
--
"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values."





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



#50233 [Opn->Bgs]: This is not enought description.

2009-11-23 Thread bjori
 ID:   50233
 Updated by:   bj...@php.net
 Reported By:  k_radek at yahoo dot pl
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: GNU/Linux
 PHP Version:  5.2.11
 New Comment:

Actually, I cannot reproduce this.

You are probably talking about something like this:


Note that "fOo" still references the original "bar", while any other
variations of "foo" reference the latter, case-insensitive declaration.
Thats expected behavior.


Previous Comments:


[2009-11-23 20:44:14] bj...@php.net

That makes no sense.
Reclassified as an engine problem.



[2009-11-19 16:00:14] k_radek at yahoo dot pl

Description:

Last paremeter defined in a function says that you can define constant
with case-insensitive option but says nothing about that it allows you
to REDEFINE constant...

Reproduce code:
---
---
>From manual page: function.define#Parameters
---

"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values."

Expected result:

"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values. It allows you to redefine constant."

Actual result:
--
"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values."





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



#50233 [Bgs]: This is not enought description.

2009-11-23 Thread bjori
 ID:   50233
 Updated by:   bj...@php.net
 Reported By:  k_radek at yahoo dot pl
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: GNU/Linux
 PHP Version:  5.2.11
 New Comment:

Actually, see bug#50184 (which is an open doc issue)


Previous Comments:


[2009-11-23 20:49:52] bj...@php.net

Actually, I cannot reproduce this.

You are probably talking about something like this:


Note that "fOo" still references the original "bar", while any other
variations of "foo" reference the latter, case-insensitive declaration.
Thats expected behavior.



[2009-11-23 20:44:14] bj...@php.net

That makes no sense.
Reclassified as an engine problem.



[2009-11-19 16:00:14] k_radek at yahoo dot pl

Description:

Last paremeter defined in a function says that you can define constant
with case-insensitive option but says nothing about that it allows you
to REDEFINE constant...

Reproduce code:
---
---
>From manual page: function.define#Parameters
---

"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values."

Expected result:

"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values. It allows you to redefine constant."

Actual result:
--
"If set to TRUE, the constant will be defined case-insensitive. The
default behavior is case-sensitive; i.e. CONSTANT and Constant represent
different values."





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



#50173 [Tbd->Csd]: Alternative Syntax Else Issue

2009-11-23 Thread bjori
 ID:   50173
 Updated by:   bj...@php.net
 Reported By:  kevinarcher15 at hotmail dot com
-Status:   To be documented
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: CentOS 5
 PHP Version:  5.3.0
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




Previous Comments:


[2009-11-23 21:11:37] s...@php.net

Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=291231
Log: Fixed bug#50173 (Alternative Syntax Else Issue)



[2009-11-14 21:23:24] j...@php.net

Do not mix the syntax. You're not only confusing the engine, you're
confusing yourself as well. Needs a note in the manual page here:

http://www.php.net/manual/en/control-structures.alternative-syntax.php



[2009-11-14 02:38:25] kevinarcher15 at hotmail dot com

Description:

PHP is confusing else as part of the nested if statement above it. When
removing the colon and replacing it with a left brace { it says
unexepected '{' expecting ':'... Placing any line of code below the
nested if will stop the problem from occurring, even while(false) { }
prevents it. So it makes sense why its happening, however based on the
syntax and alternative syntax it looks acceptable and PHP even seems to
have an idea that the else is part of the alternative syntax. Test on
stable 5.3.0 and 5.3.1-dev (August 15 2009).

Reproduce code:
---
if(true):
if(true) {
echo 'exepected';
}
else:
echo 'not here';
endif;

Expected result:

expected

Actual result:
--
PHP Parse error:  syntax error, unexpected ':' in /home/archer/test.php
on line 5





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



#50275 [Opn->Bgs]: get_class_vars with protected members inconsistent

2009-11-23 Thread jani
 ID:   50275
 Updated by:   j...@php.net
 Reported By:  msa at xtivate dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: ubuntu
 PHP Version:  5.2.11
 New Comment:

It was fixed to be consistent and inside class defining the properties
it is perfectly okay to show protected variables. Also, protected !=
hidden, do you agree? :) (further discussion -> intern...@lists.php.net
please)


Previous Comments:


[2009-11-23 20:03:31] msa at xtivate dot de

Description:

get_class_vars return is inconsistent.
from inside the class it returnes the protected members as well as the
public.
from outside the class it returns only the public.

until php 5.2.10 it only returned the public, not the non-public.
(as is it specified in the documentation that it only returns the
public...)


so... now it does not only return the non-public when called from
inside the actual class, but is inconsistent with the output  that one
gets calling outside of the class.

this is a _major issiue_ in terms of scoping/inheritance/consitency.


please change it back to the way it was before because that was 
a) consistent 
and
b) in accordance with the spec ( "only public" )




Reproduce code:
---
abstract class Vader{
protected $vaders_protected_var;
}

class Luke extends Vader {
public $lukes_public_var;   
final function ShowVars(){
echo " inside Luke:";
print_r(get_class_vars(get_class($this)));
}
}

$luke = new Luke();

$luke->ShowVars();

echo " outside luke:";
print_r( get_class_vars("Luke") );


Expected result:

inside Luke:
Array ( [lukes_public_var] => )
outside luke:
Array ( [lukes_public_var] => ) 

Actual result:
--
inside Luke:
Array ( [lukes_public_var] => [vaders_protected_var] => )
outside luke:
Array ( [lukes_public_var] => ) 





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



#50190 [Opn->Csd]: need libtool >=1.5.26

2009-11-23 Thread jani
 ID:   50190
 Updated by:   j...@php.net
 Reported By:  ralphdoncaster at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: AIX 5.3
 PHP Version:  5.2.11
 New Comment:

Fixed in SVN. 


Previous Comments:


[2009-11-20 20:06:38] ralphdoncaster at gmail dot com

I guess you missed the part where I said I don't have gnu diff.



[2009-11-20 19:48:10] j...@php.net

I should have been more verbose I guess: I need diff -u (unified diff)
and do NOT paste it here but in http://pastebin.com/ and provide the URL
to the paste in this bug report. DO NOT EMAIL anything to me!



[2009-11-20 14:01:01] j...@php.net

Yes, I know all this. I really need the diff between the libtool that
gets generated with stock PHP (which didn't work for you) and the
libtool your replaced it with. Can you do this or not? If you can, put
it to pastebin.com and submit the url here..



[2009-11-20 13:10:54] ralphdoncaster at gmail dot com

I tried it again with need_version=1.5.26 and it makes no difference.



[2009-11-20 13:02:46] ralphdoncaster at gmail dot com

I don't have gnu diff installed, but I think the diff is a red herring
anyway; we know it's the difference between 1.5.20 & 1.5.26.

I think the issue may be the version of autoconf used to build the
distribution configure script(if libtool is included as part of
autoconf, which I'm not so sure it is).  Since the date stamp for 1.5.26
is 2008/01/30, if autoconf 2.61 or earlier was used to build configure,
it can't have included libtool 1.5.26.  build/buildcheck.sh only
requires autoconf 2.13 or newer.

If autoconf just uses the version of libtool installed on the
distribution build box, then maybe changing libtool.m4:1236 might work:
need_version=no
to:
need_version=1.5.26
might work.

I tried rebuilding configure (I have autoconf 2.59 and no libtool
installed).  The libtool that was created after running configure was
still 1.5.20. here's what I ran:
autoconf
./configure
./libtool --version



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

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



#50267 [Fbk->Opn]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread nachumk at gmail dot com
 ID:   50267
 User updated by:  nachumk at gmail dot com
 Reported By:  nachumk at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

I do not know how I would create a standalone script that would have a

default user agent... Why would I even want to do that?? The problem 
is from within a browser running the get_browser function... Sort of, 
server side of course.

I don't know how I would set the PHP variables for a browser in a 
script. Please read my posts, I think they're extremely clear. If you 
would like more information from me then please, and by all means, 
ask.

Re: Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT']:
What??? The get_browser function should on its own use this variable 
value. I am showing by inputting it manually that get_browser isn't 
working properly!

Thank you, and please forgive me if I'm acting like a newbie. Perhaps 
there is something I don't know and if you could explain to me what 
that is I would be obliged.


Previous Comments:


[2009-11-23 18:41:06] j...@php.net

I'll try again, but I'm running out of wire: Provide a standalone
script that can be run on command line to reproduce the issue in simple
manner. Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT'].



[2009-11-23 16:17:13] nachumk at gmail dot com

Thanx for the update about browscap, I'll use that once I reinstall 
5.3.1. For now I'm sticking with 5.2.11.

A clearer explanation:
get_browser takes 2 parameters, 'useragent' and 'as array'. useragent 
can be a user agent string like $customUserAgent or it can be null 
which should use the current user agent. The behaviour is like this, 
when I give it the user agent $_SERVER['HTTP_USER_AGENT'] it works 
fine. It detects the browser, whether it's Mozilla or iPhone or 
whatever. When I give it null it doesn't detect anything. It's like I 
gave it an empty string for user agent.

I have shown the code a bit clearer by marking the lines to look at 
with ***. You will see that under 5.3.1 the print_r shows the 
returned array to be completely default when get_browser is called 
with a null parameter.

Here's the code I'm running:
http://www.w3.org/TR/html4/strict.dtd";> 
 
 
 
 
 
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>
 


Here's the output when 5.3.1 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => §^mozilla/5\.0 \(windows; u; windows 
nt 5\.1; .*\) applewebkit/.* \(khtml, like gecko\) chrome/4\.0\..* 
safari/.*$§ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows

NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

**  Using a null parameter in 5.3.1 returns incorrect results:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * 
[browser] => Default Browser [version] => 0 [majorver] => 0 [minorver]

=> 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => 
[win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => 
[backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => 
[javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] =>

[issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] 
=> [aol] => [aolversion] => 0 )


Here's the output when 5.2.11 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works:

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; u; windows nt 
5\.1; .*) applewebkit/.* (khtml, like gecko) chrome/4\.0\..* 
safari/.*$ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows 
NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] =>

#48795 [Ver->Fbk]: Building intl 64-bit fails on OS X

2009-11-23 Thread jani
 ID:   48795
 Updated by:   j...@php.net
 Reported By:  gwy...@php.net
-Status:   Verified
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.5.8
 PHP Version:  5.3SVN-2009-09-14 (SVN)
 New Comment:

Please try using this snapshot:

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

  http://windows.php.net/snapshots/




Previous Comments:


[2009-09-15 15:25:13] ram...@php.net

I'm having the same exact problem using --enable-intl
--with-icu-dir=/path/to/icu

I installed ICU with macports, and so I'm using /opt/local as my path
to ICU.



[2009-07-16 20:09:52] jplock at gmail dot com

I'm using OSX 10.5 as well and I'm getting the same error when trying
to build PHP 5.3.0 with intl enabled.

Undefined symbols:
  "___gxx_personality_v0", referenced from:
  ___gxx_personality_v0$non_lazy_ptr in msgformat_helpers.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1



LDFLAGS="/usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib"
export LDFLAGS

./configure \
--disable-all \
--with-libxml-dir=/usr \
--with-apxs2=/usr/local/apache22/bin/apxs \
--with-regex=php \
--with-zend-vm=CALL \
--with-curl=/usr \
--with-curlwrappers \
--with-gd \
--with-gettext=/usr \
--with-iconv \
--with-pear=/usr/local/lib/php \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl=/usr \
--with-pcre-regex \
--with-zlib-dir=/usr \
--with-xsl=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-icu-dir=/usr/local \
--enable-tokenizer \
--enable-ctype \
--enable-mbstring \
--enable-session \
--enable-simplexml \
--enable-xml \
--enable-hash \
--enable-libxml \
--enable-dom \
--enable-filter \
--enable-fileinfo \
--enable-bcmath \
--enable-json \
--enable-intl \
--enable-pdo \
--enable-pcntl \
--enable-shmop \
--enable-phar \
--enable-posix \
--enable-sockets



[2009-07-04 00:47:46] gwy...@php.net

Description:

This is a reference to PECL bug #16575
. Since intl will shortly be
part of core instead of PECL, I feel this bug belongs here. Here's my
addition to the issue:

This is due to intl/msgformat/msgformat_helpers.cpp being a C++ file
and GCC not handling that case cleanly. The exact error is specifically
due to GCC not linking to libstdc++. Which is, actually, kinda
reasonable since it's been invoked as a plain C compiler. Anyway, you
can get around the problem for now by adding
"/usr/lib/gcc/i686-apple-darwin9/4.2.1/libstdc++.dylib" (if you're
building with gcc-4.2) or
"/usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib" (if you're
building with gcc-4.0, the default) to your LDFLAGS. That's right,
WITHOUT -l or -L. I wouldn't consider this a real solution, but a better
solution is pending further research into the subject.

Reproduce code:
---
$ CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' LDFLAGS='-arch x86_64'
./configure --enable-intl --with-icu=/path/to/icu
$ make


Expected result:

Build complete.
Don't forget to run 'make test'.

$ 

Actual result:
--
Undefined symbols:
 "___gxx_personality_v0", referenced from:
 EH_frame1 in msgformat_helpers.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
$ 






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



#48614 [Com]: Loading "pdo_sqlite.so" fails: undefined symbol: sqlite3_libversion

2009-11-23 Thread koubel at volny dot cz
 ID:   48614
 Comment by:   koubel at volny dot cz
 Reported By:  kaspernj at gmail dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Ubuntu Jaunty
 PHP Version:  5.3.0RC4
 Assigned To:  scottmac
 New Comment:

i dot galic: yes, but if I use bundled sqlite, without /usr in
configure, bug is still here. When I use --enable-pdo=shared
--with-pdo-sqlite=shared
"configure" and "make" phases are ok, but when I try to use "make test"
all tests fails, because warning:
dl(): Unable to load dynamic library '.../pdo_sqlite.so' -
.../pdo_sqlite.so: undefined symbol: sqlite3_libversion

is produced on every test.

So bug is still there (tested php 5.3.1 on Debian Lenny). Using own
sqlite is workaround I think.


Previous Comments:


[2009-11-22 23:37:04] i dot galic at brainsware dot org

from pdo_sqlite.la
# Libraries that this one depends upon.
dependency_libs=' -lrt'

from pdo_pgsql.la:
# Libraries that this one depends upon.
dependency_libs=' -lpq'

Makes sense. The obvious fix (or workaround) would be to do:

--with-sqlite=shared,/usr --with-pdo-pgsql=shared,/usr etc..

In Debian, make sure to have libsqlite0-dev and libsqlite3-dev
installed



[2009-11-11 17:12:22] kenashkov at gmail dot com

I'm able to reproduce this with 5.3.1 RC3 on debian 5.



[2009-08-23 00:22:27] koubel at volny dot cz

yes, same problem with php 5.3.0 final instalation on debian stable



[2009-07-09 18:18:07] dkepplinger at gmail dot com

I have the same problem with PHP 5.3 on Debian 5.0.2 when loading the
pdo_sqlite.so extension in the config file.



[2009-06-23 07:18:49] dominics at gmail dot com

I can reproduce this bug (Debian Lenny) with the following minimal
configure line:

./configure --with-zlib --enable-pdo=shared --with-sqlite=shared
--with-pdo-sqlite=shared

For now, not building PDO as shared seems to be a workaround.



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

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



#50267 [Opn->Fbk]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread jani
 ID:   50267
 Updated by:   j...@php.net
 Reported By:  nachumk at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

It's quite simple: what does $_SERVER['HTTP_USER_AGENT'] contain when
you get the wrong result? Try var_dump() it? And then copy'paste to a
script. For example script look at: http://php.net/get_browser 


Previous Comments:


[2009-11-23 22:11:53] nachumk at gmail dot com

I do not know how I would create a standalone script that would have a

default user agent... Why would I even want to do that?? The problem 
is from within a browser running the get_browser function... Sort of, 
server side of course.

I don't know how I would set the PHP variables for a browser in a 
script. Please read my posts, I think they're extremely clear. If you 
would like more information from me then please, and by all means, 
ask.

Re: Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT']:
What??? The get_browser function should on its own use this variable 
value. I am showing by inputting it manually that get_browser isn't 
working properly!

Thank you, and please forgive me if I'm acting like a newbie. Perhaps 
there is something I don't know and if you could explain to me what 
that is I would be obliged.



[2009-11-23 18:41:06] j...@php.net

I'll try again, but I'm running out of wire: Provide a standalone
script that can be run on command line to reproduce the issue in simple
manner. Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT'].



[2009-11-23 16:17:13] nachumk at gmail dot com

Thanx for the update about browscap, I'll use that once I reinstall 
5.3.1. For now I'm sticking with 5.2.11.

A clearer explanation:
get_browser takes 2 parameters, 'useragent' and 'as array'. useragent 
can be a user agent string like $customUserAgent or it can be null 
which should use the current user agent. The behaviour is like this, 
when I give it the user agent $_SERVER['HTTP_USER_AGENT'] it works 
fine. It detects the browser, whether it's Mozilla or iPhone or 
whatever. When I give it null it doesn't detect anything. It's like I 
gave it an empty string for user agent.

I have shown the code a bit clearer by marking the lines to look at 
with ***. You will see that under 5.3.1 the print_r shows the 
returned array to be completely default when get_browser is called 
with a null parameter.

Here's the code I'm running:
http://www.w3.org/TR/html4/strict.dtd";> 
 
 
 
 
 
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>
 


Here's the output when 5.3.1 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => §^mozilla/5\.0 \(windows; u; windows 
nt 5\.1; .*\) applewebkit/.* \(khtml, like gecko\) chrome/4\.0\..* 
safari/.*$§ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows

NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

**  Using a null parameter in 5.3.1 returns incorrect results:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * 
[browser] => Default Browser [version] => 0 [majorver] => 0 [minorver]

=> 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => 
[win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => 
[backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => 
[javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] =>

[issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] 
=> [aol] => [aolversion] => 0 )


Here's the output when 5.2.11 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works:

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; u; wind

#50267 [Fbk->Csd]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread jani
 ID:   50267
 Updated by:   j...@php.net
 Reported By:  nachumk at gmail dot com
-Status:   Feedback
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

This bug has been fixed in SVN.

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:


[2009-11-24 00:18:16] s...@php.net

Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=291250
Log: Fixed bug #50267 (get_browser(null) does not use HTTP_USER_AGENT)



[2009-11-23 23:37:38] j...@php.net

It's quite simple: what does $_SERVER['HTTP_USER_AGENT'] contain when
you get the wrong result? Try var_dump() it? And then copy'paste to a
script. For example script look at: http://php.net/get_browser 



[2009-11-23 22:11:53] nachumk at gmail dot com

I do not know how I would create a standalone script that would have a

default user agent... Why would I even want to do that?? The problem 
is from within a browser running the get_browser function... Sort of, 
server side of course.

I don't know how I would set the PHP variables for a browser in a 
script. Please read my posts, I think they're extremely clear. If you 
would like more information from me then please, and by all means, 
ask.

Re: Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT']:
What??? The get_browser function should on its own use this variable 
value. I am showing by inputting it manually that get_browser isn't 
working properly!

Thank you, and please forgive me if I'm acting like a newbie. Perhaps 
there is something I don't know and if you could explain to me what 
that is I would be obliged.



[2009-11-23 18:41:06] j...@php.net

I'll try again, but I'm running out of wire: Provide a standalone
script that can be run on command line to reproduce the issue in simple
manner. Hint: It can NOT contain this: $_SERVER['HTTP_USER_AGENT'].



[2009-11-23 16:17:13] nachumk at gmail dot com

Thanx for the update about browscap, I'll use that once I reinstall 
5.3.1. For now I'm sticking with 5.2.11.

A clearer explanation:
get_browser takes 2 parameters, 'useragent' and 'as array'. useragent 
can be a user agent string like $customUserAgent or it can be null 
which should use the current user agent. The behaviour is like this, 
when I give it the user agent $_SERVER['HTTP_USER_AGENT'] it works 
fine. It detects the browser, whether it's Mozilla or iPhone or 
whatever. When I give it null it doesn't detect anything. It's like I 
gave it an empty string for user agent.

I have shown the code a bit clearer by marking the lines to look at 
with ***. You will see that under 5.3.1 the print_r shows the 
returned array to be completely default when get_browser is called 
with a null parameter.

Here's the code I'm running:
http://www.w3.org/TR/html4/strict.dtd";> 
 
 
 
 
 
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>
 


Here's the output when 5.3.1 is installed:


User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) 
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3

** Using a non-null parameter works

print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
Array ( [browser_name_regex] => §^mozilla/5\.0 \(windows; u; windows 
nt 5\.1; .*\) applewebkit/.* \(khtml, like gecko\) chrome/4\.0\..* 
safari/.*$§ [browser_name_pattern] => Mozilla/5.0 (Windows; U; Windows

NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/4.0.* Safari/* 
[parent] => Chrome 4.0 [platform] => WinXP [browser] => Chrome 
[version] => 4.0 [majorver] => 4 [beta] => 1 [win32] => 1 [frames] => 
1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javaapplets] => 1 
[javascript] => 1 [cssversion] => 3 [supportscss] => 1 [minorver] => 0

[alpha] => [win16] => [win64] => [backgroundsounds] => [cdf] => 
[vbscript] => [activexcontrols] => [isbanned] => [ismobiledevice] => 
[issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 ) 

**  Using a null parameter in 5.3.1 returns incorrect results:

print_r(get_browser(null, true))
Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * 
[browser] => Default Browser [version] => 0 [majorver] => 0 [minorver]

=> 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] 

#50270 [Opn->Fbk]: ldap_start_tls problem

2009-11-23 Thread jani
 ID:   50270
 Updated by:   j...@php.net
 Reported By:  jcarlos at dsi dot uclm dot es
-Status:   Open
+Status:   Feedback
 Bug Type: LDAP related
 Operating System: windows
 PHP Version:  5.3.1
 New Comment:

Check this if it helps:

  http://marc.info/?l=php-windows&m=116127873321748&w=2


Previous Comments:


[2009-11-23 11:35:29] jcarlos at dsi dot uclm dot es

$ds=ldap_connect($ldaphost);  
   if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)){
  print "No puedo establecer LDAPv3";
   }else if (!ldap_set_option($ds, LDAP_OPT_REFERRALS, 0)){
  print "No puedo establecer LDAP_OPT_REFERRALS";
   }else if (!ldap_start_tls($ds)) { // <- FAIL --
  print "No puedo iniciar TLS ";
   }else {
  printf "OK";
  } 
   }



[2009-11-23 11:27:21] jcarlos at dsi dot uclm dot es

Description:

My configuration (works perfect):
Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.11

When i upgrade to:
Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.3.1

ldap_start_tls problem





Reproduce code:
---
Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start
TLS: Connect error in 






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



#50276 [NEW]: PHP cache headers do NOT override server headers

2009-11-23 Thread vector dot thorn at gmail dot com
From: vector dot thorn at gmail dot com
Operating system: Fedora Linux
PHP version:  5.3.1
PHP Bug Type: Output Control
Bug description:  PHP cache headers do NOT override server headers

Description:

If this section is in your httpd.conf:

Header unset Cache-Control
Header unset Expires
Header unset Last-Modified
FileETag None
Header unset Pragma


Then the cache headers here will not be used:

$expires = 60*60*24*365;
$size = filesize("{$client_directory}/{$_GET['did']}");
$last = filemtime("{$client_directory}/{$_GET['did']}");
header("Content-Length: ".$size,true);
header("Etag: ".md5($last),true);
header("Server: Ionisis.com",false);
header("Cache-Control: max-age={$expires}, public,no-transform",true);
header('Expires: ' . gmdate('D, d M Y H:i:s',($last+$expires)) . '
GMT',true);
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $last) . '
GMT',true);
header("Content-type: audio/example");
header("Content-Disposition: attachment; filename=\"{$_GET['did']}\"");
readfile("{$client_directory}/{$_GET['did']}");

and even if you remove that section, and these headers are sent, the
client is still not sending a "if-modified-since" header that can be
captured at the server level for the php level.

Firefox 3.5, Apache 2.2, PHP 5.3, Fedora Linux

Reproduce code:
---
Just copy that code, and paste it in an file called download.php, and set
it up so that it grabs an mp3 file, then beat your head into the desk for 2
days :D

Expected result:

I expected it to send the proper cache headers, despite what the server
was preconfigured to send.

Actual result:
--
Had to remove the server's configuration section pertaining to caching php
output.

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



#48795 [Fbk->Ver]: Building intl 64-bit fails on OS X

2009-11-23 Thread gwynne
 ID:   48795
 Updated by:   gwy...@php.net
 Reported By:  gwy...@php.net
-Status:   Feedback
+Status:   Verified
 Bug Type: Compile Failure
-Operating System: Mac OS X 10.5.8
+Operating System: Mac OS X 10.5.8, 10.6.2
-PHP Version:  5.3SVN-2009-09-14 (SVN)
+PHP Version:  5.3SVN-2009-11-23 (SVN)
 New Comment:

No, upgrading the bundled libtool didn't fix it. The buildsystem isn't
set up to deal with C++ files automatically.


Previous Comments:


[2009-11-23 21:58:18] j...@php.net

Please try using this snapshot:

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

  http://windows.php.net/snapshots/





[2009-09-15 15:25:13] ram...@php.net

I'm having the same exact problem using --enable-intl
--with-icu-dir=/path/to/icu

I installed ICU with macports, and so I'm using /opt/local as my path
to ICU.



[2009-07-16 20:09:52] jplock at gmail dot com

I'm using OSX 10.5 as well and I'm getting the same error when trying
to build PHP 5.3.0 with intl enabled.

Undefined symbols:
  "___gxx_personality_v0", referenced from:
  ___gxx_personality_v0$non_lazy_ptr in msgformat_helpers.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1



LDFLAGS="/usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib"
export LDFLAGS

./configure \
--disable-all \
--with-libxml-dir=/usr \
--with-apxs2=/usr/local/apache22/bin/apxs \
--with-regex=php \
--with-zend-vm=CALL \
--with-curl=/usr \
--with-curlwrappers \
--with-gd \
--with-gettext=/usr \
--with-iconv \
--with-pear=/usr/local/lib/php \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl=/usr \
--with-pcre-regex \
--with-zlib-dir=/usr \
--with-xsl=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-icu-dir=/usr/local \
--enable-tokenizer \
--enable-ctype \
--enable-mbstring \
--enable-session \
--enable-simplexml \
--enable-xml \
--enable-hash \
--enable-libxml \
--enable-dom \
--enable-filter \
--enable-fileinfo \
--enable-bcmath \
--enable-json \
--enable-intl \
--enable-pdo \
--enable-pcntl \
--enable-shmop \
--enable-phar \
--enable-posix \
--enable-sockets



[2009-07-04 00:47:46] gwy...@php.net

Description:

This is a reference to PECL bug #16575
. Since intl will shortly be
part of core instead of PECL, I feel this bug belongs here. Here's my
addition to the issue:

This is due to intl/msgformat/msgformat_helpers.cpp being a C++ file
and GCC not handling that case cleanly. The exact error is specifically
due to GCC not linking to libstdc++. Which is, actually, kinda
reasonable since it's been invoked as a plain C compiler. Anyway, you
can get around the problem for now by adding
"/usr/lib/gcc/i686-apple-darwin9/4.2.1/libstdc++.dylib" (if you're
building with gcc-4.2) or
"/usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib" (if you're
building with gcc-4.0, the default) to your LDFLAGS. That's right,
WITHOUT -l or -L. I wouldn't consider this a real solution, but a better
solution is pending further research into the subject.

Reproduce code:
---
$ CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' LDFLAGS='-arch x86_64'
./configure --enable-intl --with-icu=/path/to/icu
$ make


Expected result:

Build complete.
Don't forget to run 'make test'.

$ 

Actual result:
--
Undefined symbols:
 "___gxx_personality_v0", referenced from:
 EH_frame1 in msgformat_helpers.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
$ 






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



#50267 [Csd]: get_browser with null parameter runs on empty user agent string

2009-11-23 Thread nachumk at gmail dot com
 ID:   50267
 User updated by:  nachumk at gmail dot com
 Reported By:  nachumk at gmail dot com
 Status:   Closed
 Bug Type: *General Issues
 Operating System: Windows XP 32 bit
 PHP Version:  5.3.1
 New Comment:

Thank you


Previous Comments:


[2009-11-24 00:18:55] j...@php.net

This bug has been fixed in SVN.

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.





[2009-11-24 00:18:16] s...@php.net

Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=291250
Log: Fixed bug #50267 (get_browser(null) does not use HTTP_USER_AGENT)



[2009-11-23 05:20:35] nachumk at gmail dot com

I am running Apache 2.2.14
(apache_2.2.14-win32-x86-openssl-0.9.8k.msi), 
PHP 5.3.1 (php-5.3.1-Win32-VC9-x86.msi (both as module and cgi), and 
php-5.3.1-nts-Win32-VC9-x86.msi), on Windows XP 32 bit.

It works when I run PHP 5.2.11.



[2009-11-23 05:18:19] nachumk at gmail dot com

Description:

get_browser should work with null string and doesn't when using 5.3.1.

5.2.11 works fine.

Reproduce code:
---
";
echo 'print_r(get_browser($_SERVER[\'HTTP_USER_AGENT\'], true));';
print_r(get_browser($_SERVER['HTTP_USER_AGENT'], true));
echo 'print_r(get_browser(null, true))';
print_r(get_browser(null, true));
?>


Expected result:

That both get_browser calls should produce identical results.

Actual result:
--
The first call with $_SERVER['HTTP_USER_AGENT'] returns proper results

and the call with null returns a default response (same as what it
would 
return with a completely empty user agent string).





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



#50265 [Fbk->Opn]: endless loop wating for child process

2009-11-23 Thread mg at fork dot pl
 ID:   50265
 User updated by:  mg at fork dot pl
 Reported By:  mg at fork dot pl
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  5.2.11
 New Comment:

I rebuilt php and started up, but as I don't know what exactly causes
the problem we'll have to wait until it happens...

I started it like
% PHP_FCGI_CHILDREN=2 PHP_FCGI_MAX_REQUESTS=100 php-cgi -e -b
127.0.0.1:30004 -c /.../php.ini

Process group 2720
Forking, 0 running
Forking, 1 running
Wait for kids, pid 2720
Forking, 1 running
Wait for kids, pid 2720
Forking, 1 running
Wait for kids, pid 2720
Forking, 1 running
Wait for kids, pid 2720


pstree -uap shows

`-php-cgi,2720 -e -b 127.0.0.1:30004 -c /.../php.ini
  |-php-cgi,13821 -e -b 127.0.0.1:30004 -c /.../php.ini
  `-php-cgi,13822 -e -b 127.0.0.1:30004 -c /.../php.ini


Previous Comments:


[2009-11-23 10:16:14] j...@php.net

Try enable fastcgi debugging with DEBUG_FASTCGI when you compile PHP
and provide the log of the failing run.



[2009-11-23 02:24:21] mg at fork dot pl

Description:

fast-cgi php process loops forever during wait()ing for child process
while there's no more child processes. 

Actual result:
--
in cgi_main.c there's loop:

1631 while (1) {
1632 if (wait(&status) >= 0) {
1633 running--;
1634 break;
1635 } else if (exit_signal) {
1636 break;
1637 }
1638 }

wait returns -1 as strace shows:

wait4(-1, 0xbff2d2a4, 0, NULL)  = -1 ECHILD (No child
processes)

and loop never breaks (as apparently exit_signal is set to 0).





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



#50278 [NEW]: Output != Input

2009-11-23 Thread taylorms at mtaonline dot net
From: taylorms at mtaonline dot net
Operating system: linux 2.6
PHP version:  5.2SVN-2009-11-24 (snap)
PHP Bug Type: DOM XML related
Bug description:  Output != Input

Description:

Using loadHTML to load a formated HTML template file. I then use the DOM
functions to create new elements before using saveHTML to dump the entire
HTML to the browser.

When loading the .html file directly into the browser, the elements have
correct spacing. When using loadHTML/saveHTML, spacing for a particular
element is different.

I've tracked it down to the following difference. The .html looks as shown
in BLK#1 below, whereas the html generated with loadHTML/saveHTML is as
shown in BLK#2 below.

The newline in the .html file shown in BLK#1 produces a "space" between
the elements in both FF3.5 and IE8 that is missing when the BLK#2 code is
sent.

Reproduce code:
---
BLK#1





BLK#2




NOTE: In BLK#2, the two  tags are together on the same line, i.e.,
no newline between them.

Expected result:

The searchbox (textbox) and searchgo (button) are separated by a small
space (about 5 px) when displaying the .html file directly (BLK#1 code). 

Actual result:
--
When displaying in browser using saveHTML, the space is missing, and only
on this page. This is part of a template file and is identical on every
page of my site. BLK#2 code produces a searchbox and searchgo button that
are touching.

NOTE: I can edit the source directly in FF Firebug, add a single space or
a newline to the code between the two  tags and the space appears as
it should be.

The DOM functionality is removing newlines in other places too, but
manifests itself here as a negative visual effect.

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



#50279 [NEW]: No results for running linux commands in php

2009-11-23 Thread rettaikulamram at gmail dot com
From: rettaikulamram at gmail dot com
Operating system: linux
PHP version:  5.3.1
PHP Bug Type: Unknown/Other Function
Bug description:  No results for running linux commands in php

Description:

I installed poppler utils in my ubuntyu for to convert pdftohtml,it runs
well in terminal
but in a php script via exec() it not works why
exec('pdftohtml -c Desktop/resume.pdf')

Reproduce code:
---
---
>From manual page: ref.exec
---



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



#50279 [Opn]: No results for running linux commands in php

2009-11-23 Thread rettaikulamram at gmail dot com
 ID:   50279
 User updated by:  rettaikulamram at gmail dot com
 Reported By:  rettaikulamram at gmail dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: linux
 PHP Version:  5.3.1
 New Comment:

Description:

I installed poppler utils in my ubuntu for to convert pdftohtml,it
runs
well in terminal
but in a php script via exec() it not works why
exec('pdftohtml -c Desktop/resume.pdf')


Previous Comments:


[2009-11-24 06:12:00] rettaikulamram at gmail dot com

Description:

I installed poppler utils in my ubuntyu for to convert pdftohtml,it
runs well in terminal
but in a php script via exec() it not works why
exec('pdftohtml -c Desktop/resume.pdf')

Reproduce code:
---
---
>From manual page: ref.exec
---







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