[PHP-BUG] Bug #61199 [NEW]: SQLSRV problem to create new Transaction

2012-02-27 Thread mohammad dot saberi at gmail dot com
From: 
Operating system: Windows 7
PHP version:  5.3.10
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:SQLSRV problem to create new Transaction

Description:

---
>From manual page: http://www.php.net/function.sqlsrv-begin-transaction.php
---
I've used SQLSRV driever ver.2 with PHP. I must use SQL Transactions in my
codes. 
But I get this error sometimes:
"New transaction is not allowed because there are other threads running in
the 
session"

I updated SQL SERVER Native client too, but it could not solve anything.

Test script:
---
sqlsrvLink ) === true) {

   $firstQuery = sqlsrv_query($stmt1);
   if (!$firstQuery) {
  sqlsrv_rollback();
   } else {
  $nextQuery = sqlsrv_query($stmt2);
  if (!$nextQuery) {
 sqlsrv_rollback();
  } else {
 sqlsrv_commit();
  }
   }

}
?>


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



Bug #47126 [Com]: copy() caches incorrect stat info of file-target

2012-02-27 Thread t dot weber at digi-info dot de
Edit report at https://bugs.php.net/bug.php?id=47126&edit=1

 ID: 47126
 Comment by: t dot weber at digi-info dot de
 Reported by:a dot u dot savchuk at gmail dot com
 Summary:copy() caches incorrect stat info of file-target
 Status: No Feedback
 Type:   Bug
 Package:Filesystem function related
 Operating System:   linux
 PHP Version:5.2.8
 Block user comment: N
 Private report: N

 New Comment:

Since the original reporter doesn’t seem to be interested in it anymore, 
I’m 
speaking up.

This bug is still present in PHP 5.3.10.

I agree with the original reporter that the documentation should be updated. 
However, I have not looked into PHP’s source code and cannot comment on his 
proposed solution.


Previous Comments:

[2009-12-23 01:00:01] php-bugs at lists dot php dot net

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


[2009-12-15 01:03:07] fel...@php.net

Please try using this snapshot:

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

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




[2009-04-09 01:00:01] php-bugs at lists dot php dot net

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


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

Please try using this CVS snapshot:

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

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




[2009-01-16 12:17:08] a dot u dot savchuk at gmail dot com

Description:

Function copy() has a bug (or strange behavior).

When you copy file to _already_ existed file-target,
then info of this file-target will be cached before rewrite.

Workaround here is usage of clearstatcache().

Also other problem is that copy() function is not listed in list of cached 
functions in manual for clearstatcache().

As i understand from source code, the problem is that copy() uses 
php_stream_stat_path_ex() [ _php_stream_stat_path() ] function which stores 
stat info in cache. Correct solutions are:
1. add parameter to php_stream_stat_path_ex() to not store info to cache and 
call it for destination path in php_copy_file_ex()
2. clear cache after successfull call of php_stream_stat_path_ex() for 
destination path in php_copy_file_ex().



Reproduce code:
---



Expected result:

int(10)


Actual result:
--
int(1)







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


Bug #55473 [Com]: mysql_pconnect leaks file descriptors on reconnect

2012-02-27 Thread jim at addmired dot com
Edit report at https://bugs.php.net/bug.php?id=55473&edit=1

 ID: 55473
 Comment by: jim at addmired dot com
 Reported by:littlesavage at rambler dot ru
 Summary:mysql_pconnect leaks file descriptors on reconnect
 Status: Closed
 Type:   Bug
 Package:MySQL related
 PHP Version:5.3.7
 Assigned To:andrey
 Block user comment: N
 Private report: N

 New Comment:

We are still getting hit by this bug. This patch hasn't been applied in 5.3 
releases yet, apparently. It was supposed to go into 5.3.8 but still no joy. =( 
Any hope of this getting into the code now? =(


Previous Comments:

[2011-08-23 19:19:39] neweracracker at gmail dot com

Maybe its time to apply in 5.3?

http://svn.php.net/viewvc?view=revision&revision=315270


[2011-08-22 10:57:44] larue...@php.net

Please try using this snapshot:

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

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




[2011-08-22 10:42:35] and...@php.net

Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revision&revision=315270
Log: Fix Bug #55473 mysql_pconnect leaks file descriptors on reconnect
The fix is for now in 5_4 and trunk, to be merged into 5_3 after 5.3.8
is packaged (expected today). The test case goes to all branches


[2011-08-22 09:01:22] larue...@php.net

and the reason for why this cleanup cound not be done in dtor,  is that in 
dtor, 
it also clean the content, option, which should not free at that memont,

and that is not a dtor time in theory.


[2011-08-22 08:35:23] larue...@php.net

I found this is due to, when doing a reconnect, mysqlnd_connect didn't free the 
stream. I have submitted a patch, but need georg&andrey&ulf to review first..




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

https://bugs.php.net/bug.php?id=55473


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


Bug #55061 [Com]: Array autoindex[] overflow

2012-02-27 Thread vovan-ve at yandex dot ru
Edit report at https://bugs.php.net/bug.php?id=55061&edit=1

 ID: 55061
 Comment by: vovan-ve at yandex dot ru
 Reported by:vovan-ve at yandex dot ru
 Summary:Array autoindex[] overflow
 Status: Open
 Type:   Bug
 Package:Arrays related
 Operating System:   WindowsXP SP3
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

Reproduced with the same behaviour and result in Ubuntu 11.10 i386.


Previous Comments:

[2011-07-29 14:39:20] vovan-ve at yandex dot ru

No, I have no non-official extensions. I have disabled all extensions for test 
even. May be your int is not int32?


[2011-07-27 06:52:24] larue...@php.net

I can not reproduce this warning, do you have non-php-official extension 
installed?

if yes, plz remove them then check again. thanks


[2011-06-29 06:03:07] vovan-ve at yandex dot ru

Sorry for typo. var_dymp == var_dump


[2011-06-29 04:47:05] vovan-ve at yandex dot ru

Description:

There is a test code:

  $a = array(0x7FFF => 42);
  $a[] = 37;
  var_dymp($a);

Second line emits warning:

  Warning: Cannot add element to the array as the next element
  is already occupied in ... on line 2

and doesn't add element with value 37. This is absolutely abnormal
behaviour. At least there is incorrect text for Warning. I expect,
the element should be added with any index (i.e. string "2147483648"
as the result of 0x7FFF+1 thru float), or something else. But
element was not added even.

Test script:
---
$a = array(0x7FFF => 42);
$a[] = 37;
var_dymp($a);

Expected result:

array(1) {
  [2147483647]=>
  int(42)
  ["2147483648"]=>
  int(37)
}

OR (when int will become int64):

array(1) {
  [2147483647]=>
  int(42)
  [2147483648]=>
  int(37)
}

Actual result:
--
Warning: Cannot add element to the array as the next element is already 
occupied in ... on line 2
array(1) {
  [2147483647]=>
  int(42)
}






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


Bug #61197 [Opn]: SNMPv3 cannot connect after reboot

2012-02-27 Thread markn at ieee dot org
Edit report at https://bugs.php.net/bug.php?id=61197&edit=1

 ID: 61197
 User updated by:markn at ieee dot org
 Reported by:markn at ieee dot org
 Summary:SNMPv3 cannot connect after reboot
 Status: Open
 Type:   Bug
 Package:SNMP related
 Operating System:   Linux
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

wrong email address. bad day at the keyboard.


Previous Comments:

[2012-02-27 21:17:10] markn at ieee dot org

Description:

Under certain conditions, it is not possible to reconnect to a device that has 
rebooted while using SNMPv3.

This happens if a PHP script is connecting with authNoPriv or authPriv.

After the device reboots, PHP's SNMPv3 routines do not take note of the 
modified 
msgAuthoritativeEngineReboots count and the modified msgAuthoritativeEngineTime 
values - they continue trying to use the old values, and as a result are never 
able to communicate after a reboot.

During device maintenance, it is often necessary to reboot a device - such as 
after a firmware upgrade. So this is actually something that is needed.

Basically, there needs to be a way to discard existing session information.

Test script:
---


Expected result:

Run this script, verify that it successfully reads the data. Reboot the device 
and 
see that it is unable to read the data after the device is back up. Use 
Wireshark 
to observe that the boot count and time values have changed, but the PHP SNMP 
routines ignore the new values.








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


Req #38508 [Com]: Addition of Magic __toArray() function

2012-02-27 Thread john at john dot com
Edit report at https://bugs.php.net/bug.php?id=38508&edit=1

 ID: 38508
 Comment by: john at john dot com
 Reported by:doublecompile at gmail dot com
 Summary:Addition of Magic __toArray() function
 Status: Closed
 Type:   Feature/Change Request
 Package:Feature/Change Request
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

this magic function would be great to have


Previous Comments:

[2011-05-23 23:32:13] spark at limao dot com dot br

Because of the magic __toString I was able to write a String class with the 
same methods as the Java String class.
I was trying to write an Array class to map the one in Adobe AS3, but then I 
came across the lack of __toArray.
I don't want a __toArray, or even a toString
I want classes with reasonable methods and not lots of functions with no naming 
rules nor parameter order standard.
I know it may sound rude but that's how I feel when I see a language getting so 
far and still not following any coding convetion.


[2006-08-20 11:12:22] he...@php.net

Why not simply have a method asArray() maybe even as par of an interface:

interface ArrayConversion
{
  function asArray();
}

See, we have __toString as it is supported in language constructs like echo, 
print and other internal functions. But we decided against an autoconversion 
for arrays already. So itwill never be supported in any language construct. 
That said there is no needed for this and nothing you would win against the 
above interface. In fact you would make it php more complex because you'd add 
just one more magic feature.


[2006-08-19 00:40:17] doublecompile at gmail dot com

Description:

Doing this:

$newarray = (array)$object;

will take the properties of an object and assign them as the values of keys in 
an array.

As of PHP 5.2, doing this:

$stringified = (string)$object;

will call the magic __toString() function for a user-specified formatting of 
the object as a string.

It would be a great addition to call a magic __toArray() function if an object 
is cast as an array, instead of converting its public members to array 
elements.  (For instance, the class might not have public members).  Classes 
without the function could use the default method of mapping property names to 
array keys.

Just my two cents.

Reproduce code:
---
'bar');
}
}

$test = new magicExample();
$array = (array)$test;

print_r($array); // should show foo=>bar, not aoeu=>htns

?>







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


[PHP-BUG] Bug #61197 [NEW]: SNMPv3 cannot connect after reboot

2012-02-27 Thread markn at iee dot org
From: 
Operating system: Linux
PHP version:  Irrelevant
Package:  SNMP related
Bug Type: Bug
Bug description:SNMPv3 cannot connect after reboot

Description:

Under certain conditions, it is not possible to reconnect to a device that
has 
rebooted while using SNMPv3.

This happens if a PHP script is connecting with authNoPriv or authPriv.

After the device reboots, PHP's SNMPv3 routines do not take note of the
modified 
msgAuthoritativeEngineReboots count and the modified
msgAuthoritativeEngineTime 
values - they continue trying to use the old values, and as a result are
never 
able to communicate after a reboot.

During device maintenance, it is often necessary to reboot a device - such
as 
after a firmware upgrade. So this is actually something that is needed.

Basically, there needs to be a way to discard existing session information.

Test script:
---


Expected result:

Run this script, verify that it successfully reads the data. Reboot the
device and 
see that it is unable to read the data after the device is back up. Use
Wireshark 
to observe that the boot count and time values have changed, but the PHP
SNMP 
routines ignore the new values.



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



Bug #61191 [Csd->Nab]: $_SESSION['abfrage']++

2012-02-27 Thread cataphract
Edit report at https://bugs.php.net/bug.php?id=61191&edit=1

 ID: 61191
 Updated by: cataphr...@php.net
 Reported by:phismail at web dot de
 Summary:$_SESSION['abfrage']++
-Status: Closed
+Status: Not a bug
 Type:   Bug
 Package:Session related
 Operating System:   Windows 7 64bit
 PHP Version:5.3.10
-Assigned To:laruence
+Assigned To:
 Block user comment: N
 Private report: N



Previous Comments:

[2012-02-27 17:10:15] phismail at web dot de

Solution: Deactivate Firebug in Firefox! -- Thx a lot


[2012-02-27 14:48:55] phismail at web dot de

Your right! The script is loaded twice.

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"

It seems to be a Firefox problem. The page is loaded twice at the same time. 
I.e. IE: 

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:22:46 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:22:47 +0100] "GET /favicon.ico HTTP/1.1" 200 1406 "-" 
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 
6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:23:14 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"

i never thought about that...sorry!


[2012-02-26 23:14:45] ras...@php.net

A bit of logging should clear it up. But one way this sometimes happens to 
people 
is when they configure their web server to redirect all 404s to a PHP script 
and 
on each page load the browser tries to load favicon.ico, but if it doesn't 
exist 
this request will trigger the 404 error script which in turn hits the session. 
So 
look for something like that.


[2012-02-26 23:05:50] phismail at web dot de

Description:

---
>From manual page: http://www.php.net/reserved.variables.session
---
Everytime I reload my page the SESSION Variable increases by 2 instead of 1. 
register_globals is turned off! No changes made in php.ini

Modules mysql and other

PHP Version 3.5.1 (I'm too stupid to update)

I expect:
   1. I'm too stupid
   2. 64-bit CPU running a 32-bit Programm
   3. Script is loaded twice somehow

Test script:
---
// First test script in test2.php
session_start();

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];

// Second test script in test2.php
session_start();

$_SESSION['views']=$_SESSION['views']+2;

echo "Views=". $_SESSION['views'];

Expected result:

1 at first load
2 at second load
3 ...
4 ...

2 at first load
4 at second load
8 ...
12 ...

Actual result:
--
1 at first load
3 at second load
5 at third load
7 ...
9 ...

2 at first load
6 at second load
10 at third load
14 ...
18 ...






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


Bug #61196 [Com]: Unable to load dynamic library, undefined symbol

2012-02-27 Thread floren at yqed dot com
Edit report at https://bugs.php.net/bug.php?id=61196&edit=1

 ID: 61196
 Comment by: floren at yqed dot com
 Reported by:floren at yqed dot com
 Summary:Unable to load dynamic library, undefined symbol
 Status: Open
 Type:   Bug
 Package:Dynamic loading
 Operating System:   CentOS 5.7
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

Please note the --enable-mysqlnd, present into build() function.
I'm forced to use it, or else the mysqli related functions are not available 
into 
phpinfo(). I obtain the same results, if I force to "yes" the 
PHP_MYSQLND_ENABLED 
variable:

PHP_MYSQLND_ENABLED=yes
export PHP_MYSQLND_ENABLED


Previous Comments:

[2012-02-27 19:53:30] floren at yqed dot com

Description:

I compiled successfully PHP with the following configuration:
http://pastie.org/3474406

Everything works as expected, except when I run PHP from command line.
I was wondering if I missed something, thank you for your help.

Test script:
---
# php -r 'echo 1;'
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/mysql.so' - /usr/lib64/php/modules/mysql.so: undefined 
symbol: _mysqlnd_fetch_lengths in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/mysqli.so' - /usr/lib64/php/modules/mysqli.so: 
undefined symbol: mysqlnd_get_client_version in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/pdo_mysql.so' - /usr/lib64/php/modules/pdo_mysql.so: 
undefined symbol: mysqlnd_allocator in Unknown on line 0
1







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


[PHP-BUG] Bug #61196 [NEW]: Unable to load dynamic library, undefined symbol

2012-02-27 Thread floren at yqed dot com
From: 
Operating system: CentOS 5.7
PHP version:  5.3.10
Package:  Dynamic loading
Bug Type: Bug
Bug description:Unable to load dynamic library, undefined symbol

Description:

I compiled successfully PHP with the following configuration:
http://pastie.org/3474406

Everything works as expected, except when I run PHP from command line.
I was wondering if I missed something, thank you for your help.

Test script:
---
# php -r 'echo 1;'
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/mysql.so' - /usr/lib64/php/modules/mysql.so:
undefined symbol: _mysqlnd_fetch_lengths in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/mysqli.so' - /usr/lib64/php/modules/mysqli.so:
undefined symbol: mysqlnd_get_client_version in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/pdo_mysql.so' -
/usr/lib64/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in
Unknown on line 0
1


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



Bug #61143 [Fbk->Csd]: XML Parser segfaults on large xml

2012-02-27 Thread seth dot mos at dds dot nl
Edit report at https://bugs.php.net/bug.php?id=61143&edit=1

 ID: 61143
 User updated by:seth dot mos at dds dot nl
 Reported by:seth dot mos at dds dot nl
 Summary:XML Parser segfaults on large xml
-Status: Feedback
+Status: Closed
 Type:   Bug
 Package:Reproducible crash
 Operating System:   FreeBSD 8.3
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

Just confirmed that disabling the Suhosin extension in our PHP 5.3.10 build 
succesfully resolves the crash.

We will take this up with the Suhosin maintainers.

Kind regards,


Previous Comments:

[2012-02-20 17:50:08] ras...@php.net

I tried to reproduce this crash with the provided files on both Linux and 
FreeBSD 
and was unable to. We'll need more information. Could you get a backtrace for 
us? 
And second, could you try it without Suhosin enabled?


[2012-02-20 13:11:28] seth dot mos at dds dot nl

Description:

Previously we used PHP 5.2.17 in pfSense 2.0 before we upgraded our build 
process to the current 5.3.10.

We use the suplied xml to PHP array function in pfSense to convert RRD files 
and add new fields to RRD files.

Here is the PHP version that we use on pfSense.
[2.1-DEVELOPMENT][root@pfsense.localdomain]/root(1): php -v
PHP 5.3.10 with Suhosin-Patch (cgi-fcgi) (built: Feb 17 2012 14:05:19)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH


$xml = file_get_contents("wan-traffic.rrd.old.xml");
$array = xml2array($xml, 1, "tag");
/* this ^^ causes a segfault */

Please see the complete code below and a test file to work on.

Test script:
---
PHP code that triggers our crash, please download the entire code and XML file 
from:

http://iserv.nl/files/pfsense/php/wan-traffic.rrd.old.xml
http://iserv.nl/files/pfsense/php/testscript.txt


Expected result:

Return a array of the XML data.

Actual result:
--
PHP core dumps with a signal 11.
http://iserv.nl/files/pfsense/php/php%20core%20dump%205.3.10%20freebsd%208.3.png






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


Bug #61191 [Csd]: $_SESSION['abfrage']++

2012-02-27 Thread phismail at web dot de
Edit report at https://bugs.php.net/bug.php?id=61191&edit=1

 ID: 61191
 User updated by:phismail at web dot de
 Reported by:phismail at web dot de
 Summary:$_SESSION['abfrage']++
 Status: Closed
 Type:   Bug
 Package:Session related
 Operating System:   Windows 7 64bit
 PHP Version:5.3.10
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

Solution: Deactivate Firebug in Firefox! -- Thx a lot


Previous Comments:

[2012-02-27 14:48:55] phismail at web dot de

Your right! The script is loaded twice.

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"

It seems to be a Firefox problem. The page is loaded twice at the same time. 
I.e. IE: 

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:22:46 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:22:47 +0100] "GET /favicon.ico HTTP/1.1" 200 1406 "-" 
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 
6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:23:14 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"

i never thought about that...sorry!


[2012-02-26 23:14:45] ras...@php.net

A bit of logging should clear it up. But one way this sometimes happens to 
people 
is when they configure their web server to redirect all 404s to a PHP script 
and 
on each page load the browser tries to load favicon.ico, but if it doesn't 
exist 
this request will trigger the 404 error script which in turn hits the session. 
So 
look for something like that.


[2012-02-26 23:05:50] phismail at web dot de

Description:

---
>From manual page: http://www.php.net/reserved.variables.session
---
Everytime I reload my page the SESSION Variable increases by 2 instead of 1. 
register_globals is turned off! No changes made in php.ini

Modules mysql and other

PHP Version 3.5.1 (I'm too stupid to update)

I expect:
   1. I'm too stupid
   2. 64-bit CPU running a 32-bit Programm
   3. Script is loaded twice somehow

Test script:
---
// First test script in test2.php
session_start();

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];

// Second test script in test2.php
session_start();

$_SESSION['views']=$_SESSION['views']+2;

echo "Views=". $_SESSION['views'];

Expected result:

1 at first load
2 at second load
3 ...
4 ...

2 at first load
4 at second load
8 ...
12 ...

Actual result:
--
1 at first load
3 at second load
5 at third load
7 ...
9 ...

2 at first load
6 at second load
10 at third load
14 ...
18 ...






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


Bug #61195 [Opn->Nab]: Symbols referenced but definition not found

2012-02-27 Thread johannes
Edit report at https://bugs.php.net/bug.php?id=61195&edit=1

 ID: 61195
 Updated by: johan...@php.net
 Reported by:wayne dot krauth at insuranceautomationgroup dot co
 Summary:Symbols referenced but definition not found
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:Apache2 related
 Operating System:   AIX 6.1
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

Setting as "Not a bug", please check with support forums etc.


Previous Comments:

[2012-02-27 16:12:34] johan...@php.net

This means you're mixing thread-safe and non-thread-safe PHP installations. 
Please ensure to configure the extension using 
--with-php-config=/path/to/bin/php-config where php-config belongs to the PHP 
installation you're using lateron.


[2012-02-27 15:57:06] wayne dot krauth at insuranceautomationgroup dot co

Description:

After successful configure and make, then adding extension=imagick.so to 
php.ini, PHP fails to load imagick.so on apache (2.2.21) startup.  The Apache 
error_log reports the following errors:

PHP Warning:  PHP Startup: Unable to load dynamic library 
'/opt/freeware/lib/php/modules/imagick.so' - rtld: 0712-001 Symbol 
executor_globals was referenced\n  from module 
/opt/freeware/lib/php/modules/imagick.so(), but a runtime definition\n  of 
the symbol was not found.\nrtld: 0712-001 Symbol core_globals was referenced\n  
from module /opt/freeware/lib/php/modules/imagick.so(), but a runtime 
definition\n  of the symbol was not found.\nrtld: 0712-001 Symbol sqrt was 
referenced\n  from module /opt/freeware/lib/php/modules/imagick.so(), but a 
runtime definition\n  of the symbol was not found. in Unknown on line 0







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


Bug #61195 [Opn]: Symbols referenced but definition not found

2012-02-27 Thread johannes
Edit report at https://bugs.php.net/bug.php?id=61195&edit=1

 ID: 61195
 Updated by: johan...@php.net
 Reported by:wayne dot krauth at insuranceautomationgroup dot co
 Summary:Symbols referenced but definition not found
 Status: Open
 Type:   Bug
 Package:Apache2 related
 Operating System:   AIX 6.1
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

This means you're mixing thread-safe and non-thread-safe PHP installations. 
Please ensure to configure the extension using 
--with-php-config=/path/to/bin/php-config where php-config belongs to the PHP 
installation you're using lateron.


Previous Comments:

[2012-02-27 15:57:06] wayne dot krauth at insuranceautomationgroup dot co

Description:

After successful configure and make, then adding extension=imagick.so to 
php.ini, PHP fails to load imagick.so on apache (2.2.21) startup.  The Apache 
error_log reports the following errors:

PHP Warning:  PHP Startup: Unable to load dynamic library 
'/opt/freeware/lib/php/modules/imagick.so' - rtld: 0712-001 Symbol 
executor_globals was referenced\n  from module 
/opt/freeware/lib/php/modules/imagick.so(), but a runtime definition\n  of 
the symbol was not found.\nrtld: 0712-001 Symbol core_globals was referenced\n  
from module /opt/freeware/lib/php/modules/imagick.so(), but a runtime 
definition\n  of the symbol was not found.\nrtld: 0712-001 Symbol sqrt was 
referenced\n  from module /opt/freeware/lib/php/modules/imagick.so(), but a 
runtime definition\n  of the symbol was not found. in Unknown on line 0







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


Bug #48507 [Com]: fgetcsv() ignoring special characters

2012-02-27 Thread jamie dot kahgee at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=48507&edit=1

 ID: 48507
 Comment by: jamie dot kahgee at gmail dot com
 Reported by:krynble at yahoo dot com dot br
 Summary:fgetcsv() ignoring special characters
 Status: Not a bug
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Unix
 PHP Version:5.*
 Block user comment: N
 Private report: N

 New Comment:

rasmus@php, eswald@middil

I had the same problem, running fgetcsv from CLI showed no error and everything 
worked and output as expected.  It was when I ran from through APACHE that I 
couldn't get my output to display. (same script, same file).

(Ü) was the specific character I was dealing with at the start of a string 
that 
was not showing.

After I tried setting my locale local in the script everything worked as 
expected through APACHE and my strings started parsing and displaying correctly.

setlocale(LC_ALL, 'en_US.UTF-8');

Hopefully this can help you.


Previous Comments:

[2012-02-13 05:16:35] ras...@php.net

eswald@middil, I am not able to reproduce your results with either en_US.UTF-8 
nor C with a UTF8 input file:

~> echo $LANG
en_US.UTF-8
~> file utf8.txt
utf8.txt: UTF-8 Unicode text
~> cat utf8.txt 
a,"a",é,"é",óú,"óú",ó&ú,"ó&ú"
~> php -r "print_r(fgetcsv(fopen('./utf8.txt','r')));"
Array
(
[0] => a
[1] => a
[2] => é
[3] => é
[4] => óú
[5] => óú
[6] => ó&ú
[7] => ó&ú
)

I don't see any corruption. I can understand problems with charsets that are 
not  
low-ascii compatible with a low-ascii delimiter, but I don't see why this UTF8 
case would break.


[2012-02-13 01:46:59] figura at hotbox dot ru

setlocale() might solve the issue but I do not see any reason to set up 
dependence of this fgetcsv on locale settings. The format is straight and 
clear. 

Especially this "feature" confuses when the string is read in UTF-8 format.


[2012-01-26 19:55:01] eswald at middil dot com

Tested with LANG=C, input file encoding of UTF-8.
Also tested with LANG=C, input file encoding of cp1252, with identical results, 
except that the output characters (what was left of them) were also cp1252.


[2012-01-26 19:50:26] eswald at middil dot com

Confirmed with php5 (5.3.6-13ubuntu3.2 on Oneiric Ocelot); can be worked around 
by quoting the value with quotation marks.  For example, the line

a,"a",é,"é",óú,"óú",ó&ú,"ó&ú"

yields

array (
  0 => 'a',
  1 => 'a',
  2 => '',
  3 => 'é',
  4 => '',
  5 => 'óú',
  6 => '&ú',
  7 => 'ó&ú',
)

Note the corruption in elements 2, 4, and 6, but not in their quoted 
counterparts 3, 5, and 7.


[2012-01-18 11:53:48] tero dot tasanen at gmail dot com

I can also confirm that this is an actual bug. File encoding UTF-8, locale 
settings are set correctly and characters like äöå are dropped from the 
beginning 
of the csv column. 

Tested with php versions 5.2.6, 5.2.10, 5.3.6




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=48507


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


[PHP-BUG] Bug #61195 [NEW]: Symbols referenced but definition not found

2012-02-27 Thread wayne dot krauth at insuranceautomationgroup dot co
From: 
Operating system: AIX 6.1
PHP version:  5.3.10
Package:  Apache2 related
Bug Type: Bug
Bug description:Symbols referenced but definition not found

Description:

After successful configure and make, then adding extension=imagick.so to
php.ini, PHP fails to load imagick.so on apache (2.2.21) startup.  The
Apache error_log reports the following errors:

PHP Warning:  PHP Startup: Unable to load dynamic library
'/opt/freeware/lib/php/modules/imagick.so' - rtld: 0712-001 Symbol
executor_globals was referenced\n  from module
/opt/freeware/lib/php/modules/imagick.so(), but a runtime definition\n 
of the symbol was not found.\nrtld: 0712-001 Symbol core_globals was
referenced\n  from module /opt/freeware/lib/php/modules/imagick.so(),
but a runtime definition\n  of the symbol was not found.\nrtld:
0712-001 Symbol sqrt was referenced\n  from module
/opt/freeware/lib/php/modules/imagick.so(), but a runtime definition\n 
of the symbol was not found. in Unknown on line 0


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



Bug #61191 [Opn->Csd]: $_SESSION['abfrage']++

2012-02-27 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=61191&edit=1

 ID: 61191
 Updated by: larue...@php.net
 Reported by:phismail at web dot de
 Summary:$_SESSION['abfrage']++
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Session related
 Operating System:   Windows 7 64bit
 PHP Version:5.3.10
-Assigned To:
+Assigned To:laruence
 Block user comment: N
 Private report: N



Previous Comments:

[2012-02-27 14:48:55] phismail at web dot de

Your right! The script is loaded twice.

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"

It seems to be a Firefox problem. The page is loaded twice at the same time. 
I.e. IE: 

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:22:46 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:22:47 +0100] "GET /favicon.ico HTTP/1.1" 200 1406 "-" 
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 
6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:23:14 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"

i never thought about that...sorry!


[2012-02-26 23:14:45] ras...@php.net

A bit of logging should clear it up. But one way this sometimes happens to 
people 
is when they configure their web server to redirect all 404s to a PHP script 
and 
on each page load the browser tries to load favicon.ico, but if it doesn't 
exist 
this request will trigger the 404 error script which in turn hits the session. 
So 
look for something like that.


[2012-02-26 23:05:50] phismail at web dot de

Description:

---
>From manual page: http://www.php.net/reserved.variables.session
---
Everytime I reload my page the SESSION Variable increases by 2 instead of 1. 
register_globals is turned off! No changes made in php.ini

Modules mysql and other

PHP Version 3.5.1 (I'm too stupid to update)

I expect:
   1. I'm too stupid
   2. 64-bit CPU running a 32-bit Programm
   3. Script is loaded twice somehow

Test script:
---
// First test script in test2.php
session_start();

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];

// Second test script in test2.php
session_start();

$_SESSION['views']=$_SESSION['views']+2;

echo "Views=". $_SESSION['views'];

Expected result:

1 at first load
2 at second load
3 ...
4 ...

2 at first load
4 at second load
8 ...
12 ...

Actual result:
--
1 at first load
3 at second load
5 at third load
7 ...
9 ...

2 at first load
6 at second load
10 at third load
14 ...
18 ...






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


Bug #51909 [Fbk->NoF]: mysqli hangs after small request storms.

2012-02-27 Thread johannes
Edit report at https://bugs.php.net/bug.php?id=51909&edit=1

 ID: 51909
 Updated by: johan...@php.net
 Reported by:ixti at member dot fsf dot org
 Summary:mysqli hangs after small request storms.
-Status: Feedback
+Status: No Feedback
 Type:   Bug
 Package:MySQLi related
 Operating System:   Debian GNU/Linux
 PHP Version:Irrelevant
 Assigned To:mysql
 Block user comment: N
 Private report: N



Previous Comments:

[2010-08-18 17:21:02] johan...@php.net

Please try the latest snapshot from http://snaps.php.net


[2010-05-26 15:10:14] ixti at member dot fsf dot org

I can prepare a screencast with showing process of stroming and some 
statisctics 
information (e.g. top). Alternatively you can test script provided in bug 
report 
with simple request stormer - I can prepare such in PHP if you want. Basically 
it can be with pecl_http:

$url = 'http://localhost/mysqli.php';
$r   = new HttpRequest($url, HttpRequest::METH_GET);
for ($i = 0; $i < 256; $i++) {
$r->send();
}


[2010-05-26 15:02:39] ixti at member dot fsf dot org

Normally CPU usage is low. It raises up upon rapid continiously requests.
By "hanging" I mean that after some amount of requests with stormer provided in 
discussion it becomes completely impossible to connect to MySQL (at least wth 
MySQLi) so any attempt to connect to MySQL with MySQLi adapter fails. Here's 
example that I was met:

After I have stormed mysqli.php test script with 130 requests it started to 
tell 
that it can't connect to database. BUT. Even phpMyAdmin started tell me the 
same. While I was able to connect via CLI mysql tool. After all rebooting 
apache2 helps.

If you need I can try to gather more additional information on my current PHP 
(with latest snapshot of PHP there is no such problem at all)


[2010-05-26 14:47:42] and...@php.net

What do you mean by hanging? You have Apache workers that don't return and 
still process some data? Is the CPU usage high?


[2010-05-26 09:33:41] ixti at member dot fsf dot org

Please let me know if you want more information from me. I'm running Debian 
GNU/Linux "testing" with some "sid" mixins :)) But the bug (as you can see in 
the 
discussion) was first reproduced on FreeBSD :))




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

https://bugs.php.net/bug.php?id=51909


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


Bug #61191 [Fbk->Opn]: $_SESSION['abfrage']++

2012-02-27 Thread phismail at web dot de
Edit report at https://bugs.php.net/bug.php?id=61191&edit=1

 ID: 61191
 User updated by:phismail at web dot de
 Reported by:phismail at web dot de
 Summary:$_SESSION['abfrage']++
-Status: Feedback
+Status: Open
 Type:   Bug
 Package:Session related
 Operating System:   Windows 7 64bit
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

Your right! The script is loaded twice.

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"

It seems to be a Firefox problem. The page is loaded twice at the same time. 
I.e. IE: 

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:22:46 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:22:47 +0100] "GET /favicon.ico HTTP/1.1" 200 1406 "-" 
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 
6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:23:14 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"

i never thought about that...sorry!


Previous Comments:

[2012-02-26 23:14:45] ras...@php.net

A bit of logging should clear it up. But one way this sometimes happens to 
people 
is when they configure their web server to redirect all 404s to a PHP script 
and 
on each page load the browser tries to load favicon.ico, but if it doesn't 
exist 
this request will trigger the 404 error script which in turn hits the session. 
So 
look for something like that.


[2012-02-26 23:05:50] phismail at web dot de

Description:

---
>From manual page: http://www.php.net/reserved.variables.session
---
Everytime I reload my page the SESSION Variable increases by 2 instead of 1. 
register_globals is turned off! No changes made in php.ini

Modules mysql and other

PHP Version 3.5.1 (I'm too stupid to update)

I expect:
   1. I'm too stupid
   2. 64-bit CPU running a 32-bit Programm
   3. Script is loaded twice somehow

Test script:
---
// First test script in test2.php
session_start();

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];

// Second test script in test2.php
session_start();

$_SESSION['views']=$_SESSION['views']+2;

echo "Views=". $_SESSION['views'];

Expected result:

1 at first load
2 at second load
3 ...
4 ...

2 at first load
4 at second load
8 ...
12 ...

Actual result:
--
1 at first load
3 at second load
5 at third load
7 ...
9 ...

2 at first load
6 at second load
10 at third load
14 ...
18 ...






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


Req #41003 [Com]: proc_get_status - PID is -1 out

2012-02-27 Thread arto at bendiken dot net
Edit report at https://bugs.php.net/bug.php?id=41003&edit=1

 ID: 41003
 Comment by: arto at bendiken dot net
 Reported by:andy dot shellam at mailnetwork dot co dot uk
 Summary:proc_get_status - PID is -1 out
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   Unix (FreeBSD)
 PHP Version:5.2.1
 Block user comment: N
 Private report: N

 New Comment:

Note that a very simple user-level workaround on Unix systems is to call 
proc_open("exec /usr/bin/myprogram") instead of 
proc_open("/usr/bin/myprogram"), 
in which case the shell is replaced by the program being executed and 
proc_get_status() thus returns the program's PID instead of the shell's.

Similarly, the very simplest (though not most efficient) way to have the 
"bypass_shell" option work on Unix as well would be to simply prepend "exec " 
to 
the command string automatically in the implementation of proc_open().

It seems to me that proc_get_status() works correctly, and that indeed this bug 
report is really about "bypass_shell" not being honored on Unix, so perhaps the 
bug report could be retitled accordingly.


Previous Comments:

[2009-03-17 07:55:31] vdovin_m at mail dot ru

I have w/changes for FreeBSD. W/pacth you can use "bypass_shell" to start 
binary executable file w/o /bin/sh process. To compile w/patch, modification in 
Makefile are needed (add "-lpopt" to EXTRA_LIBS parameter line).

-proc_open.patch start
{{{
19c19,21
< 
---
> #ifndef PHP_WIN32
> #include 
> #endif
469a472,474
>   char *param_str = NULL;
>   char *param_dup = NULL;
>   char *const *av = NULL;
501d505
<   int bypass_shell = 0;
502a507
>   int bypass_shell = 0;
517a523,524
>   command_len = strlen(command);
> 
533a541,552
> #else
>   if (other_options) {
>   zval **item;
>   if (SUCCESS == zend_hash_find(Z_ARRVAL_P(other_options), 
> "bypass_shell", sizeof("bypass_shell"), (void**)&item)) {
>   if ((Z_TYPE_PP(item) == IS_BOOL || Z_TYPE_PP(item) == 
> IS_LONG) &&
>   Z_LVAL_PP(item)) {
>   param_dup = pemalloc(command_len+1, 
> is_persistent);
>   memcpy(param_dup, command, command_len+1);
>   bypass_shell = 1;
>   }
>   }
>   }
536,537d554
<   command_len = strlen(command);
< 
881c898,915
<   execle("/bin/sh", "sh", "-c", command, NULL, 
env.envarray);
---
>   if (bypass_shell) {
>   int rc; 
>   if ((param_str = strchr(command, ' '))) {
>   rc = poptParseArgvString(command, NULL, 
> (const char ***)&av);
>   *param_str = '\0';
>   if (!rc && av != NULL){
>   execve(command, (char * const 
> *) av, env.envarray);
>   free((void*)av);
>   } else {
>   param_str++;
>   execle(command, command, 
> param_str, NULL, env.envarray);
>   }
>   } else {
>   execlp(command, NULL);
>   }
>   } else {
>   execle("/bin/sh", "sh", "-c", command, NULL, 
> env.envarray);
>   }
883c917,934
<   execl("/bin/sh", "sh", "-c", command, NULL);
---
>   if (bypass_shell) {
>   int rc; 
>   if ((param_str = strchr(command, ' '))) {
>   rc = poptParseArgvString(command, NULL, 
> (const char ***)&av);
>   *param_str = '\0';
>   if (!rc && av != NULL){
>   execvp(command, (char * const 
> *) av);
>   free((void*)av);
>   } else {
>   param_str++;
>   execlp(command, command, 
> param_str, NULL);
>   }
>   } else {
>   execlp(command, NULL);
>   }
>   } else {
>   execl("/bin/sh", "sh", "-c", command, NULL);
> 

Mail delivery failed: returning message to sender

2012-02-27 Thread phpbugs . 20 . zsh
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  phpbugs.20@spamgourmet.com
SMTP error from remote mail server after RCPT 
TO::
host mx-ha02.web.de [217.72.192.188]: 550  
Benutzer nicht bekannt/User unknown

-- This is a copy of the message, including all the headers. --

Return-path:  phpbugs.20@spamgourmet.com
Received: from spamgourmet by gourmet7.spamgourmet.com with local (Exim 4.69)
(envelope-from <>)
id 1S21j4-00044D-Os
for phpbugs.20@spamgourmet.com; Mon, 27 Feb 2012 14:38:54 +
Received: from 133.69-195-199.static.servergrove.com ([69.195.199.133] 
helo=sgrv2.php.net)
by gourmet7.spamgourmet.com with esmtp (Exim 4.69)
(envelope-from )
id 1S21j4-00043S-DZ
for phpbugs.20@spamgourmet.com; Mon, 27 Feb 2012 14:38:54 +
Received: from www-data by sgrv2.php.net with local (Exim 4.71)
(envelope-from )
id 1S21iw-0003Lo-Of
for phpbugs.20@spamgourmet.com; Mon, 27 Feb 2012 09:38:46 -0500
Date: Mon, 27 Feb 2012 09:38:46 -0500
Message-Id: 
To: phpbugs.20@spamgourmet.com
Subject: Req #42608 [PATCH]: Example #660 (filter_input_array) is wrong
X-PHP-Originating-Script: 33:functions.php
From:  "PHP Bug Database - php-bugs@lists.php.net" <>
X-PHP-Bug: 42608
X-PHP-Site: PHP
In-Reply-To: 

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
https://bugs.php.net/bug.php?id=42608&edit=2

 ID: 42608
 Patch added by: datib...@php.net
 Reported by:phpbugs dot 20 dot zsh at spamgourmet dot com
 Summary:Example #660 (filter_input_array) is wrong
 Status: Open
 Type:   Feature/Change Request
 Package:Filter related
 Operating System:   Irrelevant
 PHP Version:5.2.4
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: consistent_filter_input_array
Revision:   1330353526
URL:
https://bugs.php.net/patch-display.php?bug=42608&patch=consistent_filter_input_array&revision=1330353526


Previous Comments:

[2012-02-22 13:29:09] datib...@php.net

Fast forward to 2012, this is still wrong IMHO

Possible bugs:
1) documentation problem; the return value is defined as an array or false in 
case of failure - when the respective INPUT_XXX is not populated, it returns 
null; clearly not expected according to the documentation.
2) wrong behaviour in the code; if INPUT_XXX is not populated, I would expect 
the return value to be this: array_fill_keys(array_keys($definition), null)


[2009-10-08 03:02:44] ChadFulton at gmail dot com

Although this is a very old bug, it seems to me that the poster is 
incorrect; I suspect the problem is that the poster attempted to set the 
$_POST array during runtime (e.g. $_POST = array( ... ); ), and 
filter_input_array does not allow runtime modification $_POST, $_GET, 
etc.


[2007-09-10 11:04:44] phpbugs dot 20 dot zsh at spamgourmet dot com

Description:

The example will not output the array shown below the example code -- any 
undefined variable will cause filter_input_array() to return (so the output 
would be "NULL").

You'll notice I've classified this as a change request rather than a 
documentation problem, for the expected (and described ("Return Values")) 
behavior in example #660 makes WAY more sense.

Reproduce code:
---
http://www.php.net/filter_input_array










Req #42608 [PATCH]: Example #660 (filter_input_array) is wrong

2012-02-27 Thread datib...@php.net
Edit report at https://bugs.php.net/bug.php?id=42608&edit=1

 ID: 42608
 Patch added by: datib...@php.net
 Reported by:phpbugs dot 20 dot zsh at spamgourmet dot com
 Summary:Example #660 (filter_input_array) is wrong
 Status: Open
 Type:   Feature/Change Request
 Package:Filter related
 Operating System:   Irrelevant
 PHP Version:5.2.4
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: consistent_filter_input_array
Revision:   1330353526
URL:
https://bugs.php.net/patch-display.php?bug=42608&patch=consistent_filter_input_array&revision=1330353526


Previous Comments:

[2012-02-22 13:29:09] datib...@php.net

Fast forward to 2012, this is still wrong IMHO

Possible bugs:
1) documentation problem; the return value is defined as an array or false in 
case of failure - when the respective INPUT_XXX is not populated, it returns 
null; clearly not expected according to the documentation.
2) wrong behaviour in the code; if INPUT_XXX is not populated, I would expect 
the return value to be this: array_fill_keys(array_keys($definition), null)


[2009-10-08 03:02:44] ChadFulton at gmail dot com

Although this is a very old bug, it seems to me that the poster is 
incorrect; I suspect the problem is that the poster attempted to set the 
$_POST array during runtime (e.g. $_POST = array( ... ); ), and 
filter_input_array does not allow runtime modification $_POST, $_GET, 
etc.


[2007-09-10 11:04:44] phpbugs dot 20 dot zsh at spamgourmet dot com

Description:

The example will not output the array shown below the example code -- any 
undefined variable will cause filter_input_array() to return (so the output 
would be "NULL").

You'll notice I've classified this as a change request rather than a 
documentation problem, for the expected (and described ("Return Values")) 
behavior in example #660 makes WAY more sense.

Reproduce code:
---
http://www.php.net/filter_input_array







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


Bug #61194 [Opn->Asn]: PDO should export compression flag with myslqnd

2012-02-27 Thread johannes
Edit report at https://bugs.php.net/bug.php?id=61194&edit=1

 ID: 61194
 Updated by: johan...@php.net
 Reported by:johan...@php.net
 Summary:PDO should export compression flag with myslqnd
-Status: Open
+Status: Assigned
 Type:   Bug
 Package:MySQL related
 Operating System:   *
 PHP Version:trunk-SVN-2012-02-27 (SVN)
-Assigned To:
+Assigned To:mysql
 Block user comment: N
 Private report: N

 New Comment:

To be committed after 5.4.0


Previous Comments:

[2012-02-27 14:17:03] johan...@php.net

The following patch has been added/updated:

Patch Name: pdo_myslqnd_compression.diff
Revision:   1330352223
URL:
https://bugs.php.net/patch-display.php?bug=61194&patch=pdo_myslqnd_compression.diff&revision=1330352223


[2012-02-27 14:16:47] johan...@php.net

Description:

pdo_mysql.c has this code:

107 #ifndef PDO_USE_MYSQLND
/* ... */
111 REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS", 
(long)PDO_MYSQL_ATTR_COMPRESS);
112 #endif

This attribute should be provided for mysqlnd builds, too, as compression is 
supported in mysqlnd.







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


Bug #61194 [PATCH]: PDO should export compression flag with myslqnd

2012-02-27 Thread johan...@php.net
Edit report at https://bugs.php.net/bug.php?id=61194&edit=1

 ID: 61194
 Patch added by: johan...@php.net
 Reported by:johan...@php.net
 Summary:PDO should export compression flag with myslqnd
 Status: Open
 Type:   Bug
 Package:MySQL related
 Operating System:   *
 PHP Version:trunk-SVN-2012-02-27 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: pdo_myslqnd_compression.diff
Revision:   1330352223
URL:
https://bugs.php.net/patch-display.php?bug=61194&patch=pdo_myslqnd_compression.diff&revision=1330352223


Previous Comments:

[2012-02-27 14:16:47] johan...@php.net

Description:

pdo_mysql.c has this code:

107 #ifndef PDO_USE_MYSQLND
/* ... */
111 REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS", 
(long)PDO_MYSQL_ATTR_COMPRESS);
112 #endif

This attribute should be provided for mysqlnd builds, too, as compression is 
supported in mysqlnd.







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


[PHP-BUG] Bug #61194 [NEW]: PDO should export compression flag with myslqnd

2012-02-27 Thread johan...@php.net
From: johannes
Operating system: *
PHP version:  trunk-SVN-2012-02-27 (SVN)
Package:  MySQL related
Bug Type: Bug
Bug description:PDO should export compression flag with myslqnd

Description:

pdo_mysql.c has this code:

107 #ifndef PDO_USE_MYSQLND
/* ... */
111 REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_COMPRESS",
(long)PDO_MYSQL_ATTR_COMPRESS);
112 #endif

This attribute should be provided for mysqlnd builds, too, as compression
is supported in mysqlnd.


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



Req #47416 [Com]: Please add "endclass", "endfunction" keywords.

2012-02-27 Thread undsoft at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=47416&edit=1

 ID: 47416
 Comment by: undsoft at gmail dot com
 Reported by:mail at dropdev dot org
 Summary:Please add "endclass", "endfunction" keywords.
 Status: Not a bug
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   Any
 PHP Version:6CVS-2009-02-17 (CVS)
 Block user comment: N
 Private report: N

 New Comment:

Hi,

I'd like to speak in favour of the request.

Alternative syntax is very useful for embedding php code to the html.
This way statements like  look pretty much like template engine 
tags.

Very useful in php framework's view files.


Previous Comments:

[2009-02-17 15:41:52] johan...@php.net

Derick'S response to #24100 is still valid. We still prefer the {} syntax.



[2009-02-17 00:18:41] mail at dropdev dot org

Description:

Note: I'm aware of the "won't fix" on #24100

I'm re-requesting this feature, because this syntax actually helps people 
working with php to debug their program.

Consider this:
When using curly braces, PHP gives an syntax error at the end of the file, on a 
non-existing line (which confuses developpers), using an item ($end) which 
looks like a php variable (which confuses developpers even more).
Also, the error message confuses lot's of developpers as can be seen in the 
loads of issues popping on when searching for the error.

Now consider this:
When using endxxx statements, it gives a more meaningful, error message, which 
is also a lot closer to the actual error position (a bless if you have 1000+ 
lines of code in your difficult class)
Also, it is much easier to search for in the documentation (see: 
http://php.net/manual/tokens.php which is on the first page of the search, if 
you search sitewide for T_ENDFOREACH)

As a free bonus, using this alternative syntax also resolves the ongoing 
discussion on where to place the curly braces (new line/no new line).

please also read: http://www.geocities.com/tablizer/endx.htm

The reproduce code contains two similar independent examamples showing the 
primary and alternative syntax, each with 1 syntax error to show the difference 
between the both.

Reproduce code:
---
 $value):
  if (TRUE):
// some code
  // also code
endforeach; // << syntax error here!!! (unexpected T_ENDFOREACH)
  endif;
else:
  // more code
endif;

// example 2
$foobar = array('foo', 'bar');
if (TRUE) {
  if (TRUE) {
foreach($foobar as $key => $value) { 
  if (TRUE) {
// some code...
  // also code...
}
  }
} else {
  // more code ...
}
// << syntax error here!!! (unexpected $end)







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


Bug #61193 [Opn->Csd]: PHP_EOL definition for Mac OS X is wrong and unused

2012-02-27 Thread rasmus
Edit report at https://bugs.php.net/bug.php?id=61193&edit=1

 ID: 61193
 Updated by: ras...@php.net
 Reported by:sam at robots dot org dot uk
 Summary:PHP_EOL definition for Mac OS X is wrong and unused
-Status: Open
+Status: Closed
 Type:   Bug
 Package:*General Issues
 PHP Version:5.4.0RC8
-Assigned To:
+Assigned To:rasmus
 Block user comment: N
 Private report: N

 New Comment:

Not sure how it can be both unused and wrong. It gets set to "\n" because 
__MacOSX__ doesn't exist. I agree the intent of the code is wrong now, but the 
end result is correct. I have cleaned it up.


Previous Comments:

[2012-02-27 12:16:33] ras...@php.net

Automatic comment from SVN on behalf of rasmus
Revision: http://svn.php.net/viewvc/?view=revision&revision=323577
Log: Fix bug 61193


[2012-02-27 11:47:05] sam at robots dot org dot uk

Description:

php.h contains:

#ifdef PHP_WIN32
#   include "tsrm_win32.h"
#   include "win95nt.h"
#   ifdef PHP_EXPORTS
#   define PHPAPI __declspec(dllexport)
#   else
#   define PHPAPI __declspec(dllimport)
#   endif
#   define PHP_DIR_SEPARATOR '\\'
#   define PHP_EOL "\r\n"
#else
#   if defined(__GNUC__) && __GNUC__ >= 4
#   define PHPAPI __attribute__ ((visibility("default")))
#   else
#   define PHPAPI
#   endif

#define THREAD_LS
#define PHP_DIR_SEPARATOR '/'
#if defined(__MacOSX__)
#define PHP_EOL "\r"
#else 
#define PHP_EOL "\n"
#endif
#endif

The indentation is bad, the value of PHP_EOL on Mac OS X is wrong, and the code 
never gets into the line that defines it incorrectly because there is no such 
macro as __MacOSX__. Instead you should test for __APPLE__ & __MACH__, in 
general, but in this case you should just remove the whole test for __MacOSX__ 
because it's not needed.







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


Req #51982 [Com]: Unexpected TC_SECTION with parse_ini_file/string

2012-02-27 Thread info at maartendeboer dot net
Edit report at https://bugs.php.net/bug.php?id=51982&edit=1

 ID: 51982
 Comment by: info at maartendeboer dot net
 Reported by:uramihsayibok at gmail dot com
 Summary:Unexpected TC_SECTION with parse_ini_file/string
 Status: Open
 Type:   Feature/Change Request
 Package:PHP options/info functions
 Operating System:   Win 7
 PHP Version:*
 Block user comment: N
 Private report: N

 New Comment:

I recommend implementing this the Zend Framework way using '.' as separator for 
multi dimension "arrays".

[section]
foo.bar[] = "a"

would then result in:

section
 - foo
  - bar
   - 0 = "a"


Previous Comments:

[2010-06-02 22:58:48] uramihsayibok at gmail dot com

Description:

parse_ini_file and parse_ini_string can't handle arrays with multiple 
dimensions.

Test script:
---


Expected result:

An appropriate var_dump

Actual result:
--
PHP Warning: syntax error, unexpected TC_SECTION, expecting '=' in Unknown on 
line 2

(or the INI filename instead of "Unknown" when using parse_ini_file)






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


[PHP-BUG] Bug #61193 [NEW]: PHP_EOL definition for Mac OS X is wrong and unused

2012-02-27 Thread sam at robots dot org dot uk
From: 
Operating system: 
PHP version:  5.4.0RC8
Package:  *General Issues
Bug Type: Bug
Bug description:PHP_EOL definition for Mac OS X is wrong and unused

Description:

php.h contains:

#ifdef PHP_WIN32
#   include "tsrm_win32.h"
#   include "win95nt.h"
#   ifdef PHP_EXPORTS
#   define PHPAPI __declspec(dllexport)
#   else
#   define PHPAPI __declspec(dllimport)
#   endif
#   define PHP_DIR_SEPARATOR '\\'
#   define PHP_EOL "\r\n"
#else
#   if defined(__GNUC__) && __GNUC__ >= 4
#   define PHPAPI __attribute__ ((visibility("default")))
#   else
#   define PHPAPI
#   endif

#define THREAD_LS
#define PHP_DIR_SEPARATOR '/'
#if defined(__MacOSX__)
#define PHP_EOL "\r"
#else 
#define PHP_EOL "\n"
#endif
#endif

The indentation is bad, the value of PHP_EOL on Mac OS X is wrong, and the
code 
never gets into the line that defines it incorrectly because there is no
such 
macro as __MacOSX__. Instead you should test for __APPLE__ & __MACH__, in 
general, but in this case you should just remove the whole test for
__MacOSX__ 
because it's not needed.


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



Bug #61192 [Opn->Nab]: Serializable interface not calling unserialize()

2012-02-27 Thread mike
Edit report at https://bugs.php.net/bug.php?id=61192&edit=1

 ID: 61192
 Updated by: m...@php.net
 Reported by:slusarz at curecanti dot org
 Summary:Serializable interface not calling unserialize()
-Status: Open
+Status: Not a bug
 Type:   Bug
 Package:*Data Exchange functions
 Operating System:   Linux
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

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

Thank you for your interest in PHP.

You have to return something from Foo::serialize().


Previous Comments:

[2012-02-27 05:12:42] slusarz at curecanti dot org

Description:

unserialize() in a class implementing Serializable is not called when the 
serialized object is contained within a container element (e.g. array).

Compare with __wakeup() which IS called in the same environment.

In the test script below, if the class is modified to not extend Serializable, 
the output is:

Sleep
Wakeup



Test script:
---
class Foo implements Serializable {

public function __sleep() {
print "Sleep\n";
return array();
}

public function __wakeup() {
print "Wakeup\n";
}

public function serialize() {
print "Serialize\n";
}

public function unserialize($data) {
print "Unserialize\n";
}

}

$a = array(
new Foo()
);

$b = serialize($a);
unserialize($b);

Expected result:

Serialize
Unserialize

Actual result:
--
Serialize






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


Bug #60965 [Csd->Asn]: Buffer overflow on htmlspecialchars/entities with $double=false

2012-02-27 Thread khalid at istartus dot com
Edit report at https://bugs.php.net/bug.php?id=60965&edit=1

 ID: 60965
 User updated by:khalid at istartus dot com
 Reported by:khalid at istartus dot com
 Summary:Buffer overflow on htmlspecialchars/entities with
 $double=false
-Status: Closed
+Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Any
 PHP Version:5.4SVN-2012-02-03 (SVN)
 Assigned To:cataphract
 Block user comment: N
 Private report: N

 New Comment:

hi


Previous Comments:

[2012-02-05 09:59:28] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=323074
Log: - Merge r323056 (see bug #60965).


[2012-02-04 18:12:14] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=323056
Log: - Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with
  $double=false).
- Removed unused variable.
- Given maxlen the usual meaning of *len variables (terminator not included).
- Changed some comments.


[2012-02-03 18:36:42] cataphr...@php.net

Yes, it is trunk/5.4 only.


[2012-02-03 17:03:40] ras...@php.net

This is 5.4-only?


[2012-02-03 10:48:29] khalid at istartus dot com

Description:

Long entities can cause a buffer overflow because the loop only guarantees 40 
bytes available in beginning.

Test script:
---
https://bugs.php.net/bug.php?id=60965&edit=1


Bug #61186 [Opn->Ver]: valgrind complain of invalid reading

2012-02-27 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=61186&edit=1

 ID: 61186
 Updated by: larue...@php.net
 Reported by:larue...@php.net
 Summary:valgrind complain of invalid reading
-Status: Open
+Status: Verified
 Type:   Bug
 Package:Scripting Engine problem
 PHP Version:5.3.10
 Block user comment: N
 Private report: N



Previous Comments:

[2012-02-26 21:08:17] ras...@php.net

Ok, verified. It only happens with --enable-debug


[2012-02-26 19:38:19] phpmpan at mpan dot pl

./configure --with-readline --enable-debug --enable-zend-multibyte

Happens for snapshot (2012/02/26 18:30) of 5.3, but *does not* happen on 
snapshot of trunk.


[2012-02-26 15:53:55] ras...@php.net

Still clean for me with --enable-zend-multibyte
Please provide the minimum set of configure flags you can reproduce this with.


[2012-02-26 15:42:52] larue...@php.net

try after enable multi-byte support, thanks


[2012-02-26 15:28:30] ras...@php.net

Not seeing that here on my 5.3.10 build:

3:26pm x220:~/php-5.3.10> memcheck sapi/cli/php test.php
==32664== Memcheck, a memory error detector
==32664== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==32664== Using Valgrind-3.6.1-Debian and LibVEX; rerun with -h for copyright 
info
==32664== Command: sapi/cli/php test.php
==32664== 
2==32664== 
==32664== HEAP SUMMARY:
==32664== in use at exit: 1,016 bytes in 7 blocks
==32664==   total heap usage: 25,722 allocs, 25,715 frees, 3,633,436 bytes 
allocated
==32664== 
==32664== LEAK SUMMARY:
==32664==definitely lost: 0 bytes in 0 blocks
==32664==indirectly lost: 0 bytes in 0 blocks
==32664==  possibly lost: 0 bytes in 0 blocks
==32664==still reachable: 0 bytes in 0 blocks
==32664== suppressed: 1,016 bytes in 7 blocks
==32664== 
==32664== For counts of detected and suppressed errors, rerun with: -v
==32664== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 12 from 6)

My memcheck script is:

#!/bin/bash
USE_ZEND_ALLOC=0 valgrind --tool=memcheck --
suppressions=/home/rasmus/.suppressions --leak-check=yes --track-origins=yes --
num-callers=30 --show-reachable=yes "$@"

And I am not suppressing that one obviously.




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

https://bugs.php.net/bug.php?id=61186


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