#47769 [NEW]: Strange extends PDO

2009-03-25 Thread admin at d9tx dot com
From: admin at d9tx dot com
Operating system: xp sp3
PHP version:  5.3.0RC1
PHP Bug Type: PDO related
Bug description:  Strange extends PDO 

Description:

if extends pdo, then visibility keyword work failure.

Reproduce code:
---
class test extends PDO
{
private function isPrivate()
{
echo 'this is a private method.';
}
}

$test = new test('sqlite:./test/mydb.sq3');
$test-isPrivate();
// bad output: this is a private method.

Expected result:

class test extends PDO
{
private function isPrivate()
{
echo 'this is a private method.';
}
}

$test = new test('sqlite:./test/mydb.sq3');
$test-isPrivate();
// Expected output: Fatal error: Call to private method test::isPrivate()
from


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



#47770 [NEW]: pdo::query() segmentation fault

2009-03-25 Thread shj at xenosi dot de
From: shj at xenosi dot de
Operating system: Gentoo Linux 64bit
PHP version:  5.2.9
PHP Bug Type: PDO related
Bug description:  pdo::query() segmentation fault

Description:

1. this is segmentation fault.
return new class($pdo-class-query($this-query));

2. this is ok.
$stmt = $pdo-class-query($this-query);
return new class($stmt);


Reproduce code:
---
http://codepad.org/wJ5O5TvG
this is bug example.
run this code on your machine.

thank you.


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



#47712 [Com]: Weird behavior under high load

2009-03-25 Thread ninzya at inbox dot lv
 ID:   47712
 Comment by:   ninzya at inbox dot lv
 Reported By:  ninzya at inbox dot lv
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.3.0beta1
 New Comment:

In most cases this bug is being hit when working with mysql, and only
during high concurrency. When there is no concurrency, or concurrency is
not big enough, bug does not trigger. Also i forgot to mention that PHP
is installed as a module.

Downloaded QA's PHP 5.3.0RC1 and tested it with both php_mysql and
php_mysqli extensions, bug is still present.

The page that is being executed during stress test contains 14 SQL
queries, 11 of them are SELECT queries. In most cases the 5th to 7th
SELECT queries are failing to return proper data using
mysql_fetch_assoc(). When the bug triggers, the values of returned array
(usually first on first two keys in the array) are being replaced with
irrelevant to SELECT result data, contents of those values are either
NULL or data that was stored in DB, but used to appear in previous SQL
queries. In the example above you can clearly see that the value of key
'id' in array $row is 'SHARED', but shared is the value of another field
in another SQL query i used to execute. Probably, mysqlnd is somehow
sharing memory between requests, and somehow memory of another request
being processed concurrently is being passed to current request. Another
assumption may be that the mysqlnd somehow bypasses update of currently
used cached zval.

Anyway, if this is mysqlnd related, still don't know how to explain
warning with empty constant mentioned in previous report.


Previous Comments:


[2009-03-24 18:49:53] kak dot serpom dot po dot yaitsam at gmail dot
com

I guess the trouble is in MySQL Native Driver (mysqlnd). No?



[2009-03-21 22:45:24] ninzya at inbox dot lv

Tested under PHP 5.2.9-1, the problem does not exist with that version
of PHP.



[2009-03-20 12:34:59] ninzya at inbox dot lv

And here is the screenshot of the output of MySql query browser after
executing SQL query i mentioned above:
http://www.stepanov.lv/pub/mysql.jpg



[2009-03-20 12:28:51] ninzya at inbox dot lv

I got a little bit closer to the problem. Here's what happens. See this
script:

  // load page
  $sql ='SELECT id, ' .implode( ', ', $properties) .'
FROM ' .TAB_PREF .'pages
  WHERE node_id =' .$Db-escape( $nodeId, 'UINT').'
AND alt_name =' .$Db-escape( $pageAlt, 'STRING') .'
  LIMIT 0, 1;';
  if(( $row =$Db-queryFirst( $sql)) ===null)
throw new Exception( 'NOT_FOUND');

  if( $row['id'] ===null) {// THIS IS WHERE YOU SHOULD LOOK AT
trigger_error( 'Got NULL!', E_USER_WARNING);
trigger_error( 'SQL: ' .$sql, E_USER_WARNING);
ob_start();
var_dump( $row);
trigger_error( ob_get_clean(), E_USER_WARNING);
die();
  }

As you can see, i am testing if $row['id'] is null (this is unexpected
situation when this field becomes null, it's an auto column and at this
step i expect successfully fetched row), and if it is NULL, then i wish
to see the debug info for the contents of $row and overall what's going
on.

Now here is the error log when this unexpected situation is being
RANDOMLY triggered during stress test:

[20-Mar-2009 14:20:37] PHP Warning:  Got NULL! in D:\...\pages.php on
line 93

[20-Mar-2009 14:20:37] PHP Warning:  SQL: SELECT id, `title`,
`keywords`, `descr`, `template_id`
FROM pages
  WHERE node_id =11
AND alt_name ='welcome'
  LIMIT 0, 1; in D:\...\pages.php on line 94

[20-Mar-2009 14:20:37] PHP Warning:  array(5) {
  [id]=
  string(6) SHARED
  [title]=
  string(12) My test page
  [keywords]=
  string(6) asdasd
  [descr]=
  string(6) asdasd
  [template_id]=
  string(4) 8567
}
 in D:\...\pages.php on line 97

I don't know how to explain this. I guess this is mysqlnd failing this
bad.



[2009-03-20 12:12:15] ninzya at inbox dot lv

Every mentioned error/warning occurs randomly. It is not possible to
trigger these warnings (especially first) during each request, something
related to memory fails i think, or stack is being corrupted or
something.

I was investigating this problem for past day and i found this. Take a
look at the following script:

?php

function throw_exc() {
  throw new Exception('TEST_EXCEPTION');
}

class Test {
  
  public function __construct() {
echo 'Constr' .\n;
  }
  
  public function __destruct() {
echo 'Destr' .\n;
  }
  
}

try {
  
  $T =new Test( throw_exc());
  
} catch( Exception $e) {
  echo 'Exception: ' .$e-getMessage();
}

?

Execution of this script 

#47771 [NEW]: Exception during object construction from arg call calls object's destructor

2009-03-25 Thread ninzya at inbox dot lv
From: ninzya at inbox dot lv
Operating system: Windows XP
PHP version:  5.3.0RC1
PHP Bug Type: Scripting Engine problem
Bug description:  Exception during object construction from arg call calls 
object's destructor

Description:

If you create new object and pass to it's constructor argument from
function call, that has thrown an exception, the object's constructor is
not being called (which is correct behavior), but object's destructor is
being called (which is not correct behavior). See reproduce code.

Reproduce code:
---
?php

function throw_exc() {
  throw new Exception('TEST_EXCEPTION');
}

class Test {
  
  public function __construct() {
echo 'Constr' .\n;
  }
  
  public function __destruct() {
echo 'Destr' .\n;
  }
  
}

try {
  
  $T =new Test( throw_exc());
  
} catch( Exception $e) {
  echo 'Exception: ' .$e-getMessage();
}

?



Expected result:

Exception: TEST_EXCEPTION

Actual result:
--
Destr
Exception: TEST_EXCEPTION

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



#47766 [Opn-Fbk]: php-cgi.exe crashes

2009-03-25 Thread pajoye
 ID:   47766
 Updated by:   paj...@php.net
 Reported By:  ipseno at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Win XP SP3
 PHP Version:  5.3CVS-2009-03-24 (snap)
 New Comment:

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

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

And how we suppose to know what you are doing then?

You can try to create a backtrace, maybe there is an obvious problem
which can be seen in it.




Previous Comments:


[2009-03-25 00:34:01] ipseno at yahoo dot com

Script has 145 lines of code and loads 5 custom classes and 3 extra
files.

What you propose is, as I've just found, most likely impossible.
Reason is that crash won't appear if I remove ANYTHING from script.

At one line I removed COMMENT!
// From DB

Which doesn't affect PHP's code in ANY way.
To my shock everythhing restored to normal.

Exactly this fact makes me unable to ISOLATE few lines of code for
crash reproduction.



[2009-03-24 23:58:25] paj...@php.net

Create the smallest possible script to reproduce the problem and post
it here.



[2009-03-24 23:42:33] ipseno at yahoo dot com

I..., m..., well.
Hm...!?

This script uses custom classes that I've built and needs to be
loaded.

Anyway... I've found out, that crash occurs in LAST line of code before
PHP's closing tag ?


new face($cont);


There are 2 ways od avoiding crash.
a) By commenting out // new face($cont);
b) By making string $cont supplied to class face shorter then 2232
letters

I can not just post / give you all code, as this script is being built
for financial biz. So it is a secret.

Crash occurs inside object of 'face' class.

What do you propose?



[2009-03-24 23:18:46] paj...@php.net

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2009-03-24 23:15:19] ipseno at yahoo dot com

Ok, I've parsed it with:
VC9 x86 Non Thread Safe (2009-Mar-24 15:00:00)

* Zip [12.73MB]
  sha1: 9c94f8a7cdc73c22da8c66e6af16ade4ceb4d197 

Result:
CGI / FastCGI has encountered a problem and needs to close.  We are
sorry for the inconvenience.


This means same thing is happening.

Only one line of code is responsible for it.
Commenting it out, makes no crash at all.

Line of code is:

$temp .= $site-p('You will receive ' . $amount . ' ' . $mon . ' to ' .
$dc . ' account with number ' . $acc, array('class'='phys_wide
face_green') );

HINT:
When I shothened(removed letters), first or second arg of 'p' method
it worked!

Like:
$temp .= $site-p('You will receive ' . $amount . ' ' . $mon . ' to ' .
$dc . ' account number ' . $acc, array('class'='phys_wide face_green')
);
Works without crash!



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

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



#47764 [Opn]: PDO statement blank page

2009-03-25 Thread kalle
 ID:   47764
 Updated by:   ka...@php.net
 Reported By:  dimas at webimpact dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Linux wiaspweb17 2.6.9-34.ELsmp
 PHP Version:  5.2.9
 New Comment:

I tried with the PDO_MySQL driver but I can't reproduce the problem,
does this only happen with dblib and on Linux?


Previous Comments:


[2009-03-24 20:05:52] dimas at webimpact dot com

Thanks for a quick reply, that is the problem that absolutely no errors
loged by the server and no exceptions by PDO :-(



[2009-03-24 19:09:29] ka...@php.net

Does your webserver log show anything that could might have been more
of help here?



[2009-03-24 18:02:32] dimas at webimpact dot com

Description:

Good day,

we are using PDO and got into the funny problem, 

The code below shows that we are trying to simple reuse the statement 
but when first query with ci_id = 70 brings not result, PDO dies 
on a second execute. We see only blank page, if first query brings 
some results everything is fine.

Can u please help.

Thank you.  







Reproduce code:
---
$oDbConn = new PDO(dblib:dbname=;host=:1433,  , );
$oDbConn-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);  

$oStatement = $oDbConn-prepare('SIMPLE SELECT QUERY WHERE ci_id =
:ci_id');

$oStatement-bindParam(':ci_id', $val, PDO::PARAM_INT);
$val = 70;
$oStatement-execute(); 

$val = 1000;
$oStatement-execute(); 






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



#47770 [Opn-Fbk]: pdo::query() segmentation fault

2009-03-25 Thread kalle
 ID:   47770
 Updated by:   ka...@php.net
 Reported By:  shj at xenosi dot de
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Gentoo Linux 64bit
 PHP Version:  5.2.9
 New Comment:

I'm unable to reproduce this with your script if I replace:
$stmt = $this-class-query($this-query);
return new SHJPDOStatement($stmt);

with:
return new SHJPDOStatement($this-class-query($this-query));


I get no crash, anything in my server log, etc. using Windows 32bit,
can you generate a backtrace as described here:
http://bugs.php.net/bugs-generating-backtrace.php


Previous Comments:


[2009-03-25 07:12:07] shj at xenosi dot de

Description:

1. this is segmentation fault.
return new class($pdo-class-query($this-query));

2. this is ok.
$stmt = $pdo-class-query($this-query);
return new class($stmt);


Reproduce code:
---
http://codepad.org/wJ5O5TvG
this is bug example.
run this code on your machine.

thank you.






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



#47699 [Opn-Csd]: autoload and late static binding

2009-03-25 Thread dmitry
 ID:   47699
 Updated by:   dmi...@php.net
 Reported By:  rayro at gmx dot de
-Status:   Open
+Status:   Closed
 Bug Type: Class/Object related
 Operating System: XP
 PHP Version:  5.3.0beta1
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-03-18 00:41:14] rayro at gmx dot de

Description:

spl_autoload_register does not work with lsb/get_called_class()

Reproduce code:
---
namespace test;
class A {
static function test($v='') {
var_dump(get_called_class());
}
}
class B extends A {
}
B::test();
spl_autoload_register(__NAMESPACE__.'\B::test');
new X();

Expected result:

string(6) test\B
string(6) test\B

Fatal error: Class 'test\X' not found in ... on line ...

Actual result:
--
string(6) test\B
bool(false)

Fatal error: Class 'test\X' not found in ... on line ...





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



#47767 [Com]: include_once does not resolve windows symlinks or junctions

2009-03-25 Thread andrew at mcgl dot co dot nz
 ID:   47767
 Comment by:   andrew at mcgl dot co dot nz
 Reported By:  lukemoynihan at gmail dot com
 Status:   Open
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows Vista
 PHP Version:  5.2.9
 New Comment:

Have the same problem on V5.2.8 running on windows XP


Previous Comments:


[2009-03-25 02:15:55] lukemoynihan at gmail dot com

FYI: I've tested this on Windows XP, Vista to get the results for 
windows, and Centos 5 for linux results



[2009-03-25 02:09:11] lukemoynihan at gmail dot com

I can confirm this is a problem using 
http://windows.php.net/downloads/snaps/php-5.3-nts-win32-VC9-x86-
latest.zip  that i downloaded now. 

The problem occurs when the symlink (typically used by Vista/Server 
2008) is a folder or a file, or a folder junction (Used by WinXP/2K) 
is used.



[2009-03-24 22:55:59] paj...@php.net

Please try using this CVS snapshot:

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

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





[2009-03-24 22:43:18] lukemoynihan at gmail dot com

Description:

PHP does not resolve symlinks (On Vista) or Junctions (windows 2000) 
on windows when including files

Create index.php and test.php as shown below, then create a symlink 
on Vista using:

mklink test2.php test.php

Note: this test case illustrates symlinks, but that Junctions created 
on NTFS volumes also have this problem.

Reproduce code:
---
index.php:

?php
include_once('test.php');
include_once('test2.php');
include_once('test2.php');

test.php:

?php
echo i'm included ;

Expected result:

Expected on Linux:

i'm included

Expected on Windows:

i'm included

Actual result:
--
Actual on Linux:

i'm included

Actual on Windows:

i'm included i'm included





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



#47767 [Opn-Asn]: include_once does not resolve windows symlinks or junctions

2009-03-25 Thread pajoye
 ID:   47767
 Updated by:   paj...@php.net
 Reported By:  lukemoynihan at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows Vista
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Ok, will see what can be done for symlink. I'm not sure 2k/xp are worst
a hack, but 2k8/vista/win7 have real symlinks support.


Previous Comments:


[2009-03-25 10:51:01] andrew at mcgl dot co dot nz

Have the same problem on V5.2.8 running on windows XP



[2009-03-25 02:15:55] lukemoynihan at gmail dot com

FYI: I've tested this on Windows XP, Vista to get the results for 
windows, and Centos 5 for linux results



[2009-03-25 02:09:11] lukemoynihan at gmail dot com

I can confirm this is a problem using 
http://windows.php.net/downloads/snaps/php-5.3-nts-win32-VC9-x86-
latest.zip  that i downloaded now. 

The problem occurs when the symlink (typically used by Vista/Server 
2008) is a folder or a file, or a folder junction (Used by WinXP/2K) 
is used.



[2009-03-24 22:55:59] paj...@php.net

Please try using this CVS snapshot:

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

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





[2009-03-24 22:43:18] lukemoynihan at gmail dot com

Description:

PHP does not resolve symlinks (On Vista) or Junctions (windows 2000) 
on windows when including files

Create index.php and test.php as shown below, then create a symlink 
on Vista using:

mklink test2.php test.php

Note: this test case illustrates symlinks, but that Junctions created 
on NTFS volumes also have this problem.

Reproduce code:
---
index.php:

?php
include_once('test.php');
include_once('test2.php');
include_once('test2.php');

test.php:

?php
echo i'm included ;

Expected result:

Expected on Linux:

i'm included

Expected on Windows:

i'm included

Actual result:
--
Actual on Linux:

i'm included

Actual on Windows:

i'm included i'm included





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



#47730 [Fbk-Opn]: PHP crashes when errorHandler throws Exception

2009-03-25 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

This segfault is also caused when any 3rd party modules are disabled.
As already said, we got several servers with very similar hardware and
OS ( including configuration ) and each of them makes PHP crash with
this snippet.

We recently upgraded from PHP 5.2.6 to PHP 5.2.9 and since this upgrade
we noticed this segfault.

Can i provide any other informations for you to help you fixing this
bug?


Previous Comments:


[2009-03-23 15:51:15] tombt081981 at hotmail dot com

I first just disabled XCache

= still seg fault , so XCache can't be the reason

Then i re-compiled with ./configure --disable-all

= still seg fault


# php -i
System = myhostname 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009
x86_64
Build Date = Mar 23 2009 16:43:14
Configure Command =  './configure'  '--disable-all'
Server API = Command Line Interface
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /usr/local/lib
Loaded Configuration File = /usr/local/lib/php-cli.ini
Scan this dir for additional .ini files = (none)
additional .ini files parsed = (none)
PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = no
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled
Registered PHP Streams = php, file, data, http, ftp
Registered Stream Socket Transports = tcp, udp, unix, udg
Registered Stream Filters = string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed

#...



[2009-03-23 15:27:39] scott...@php.net

I can't reproduce this with 5.2.9 / 5.2.10-dev, can you try a build
with everything disabled. Also make sure all third party modules are
disabled like XCache.

./configure --disable-all

# uname -a
Linux whisky 2.6.18-xen #1 SMP Tue Feb 12 06:40:50 UTC 2008 x86_64
GNU/Linux

# file sapi/cli/php
sapi/cli/php: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not
stripped

# sapi/cli/php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:13:12) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



[2009-03-23 15:11:42] tombt081981 at hotmail dot com

I get this segmentation fault, too, on a Debian 5.0 with php 5.2.9. (i
use XCache, maybe this is relevant?)



[2009-03-23 13:10:22] work at setor dot net

Have a same problem

# uname -a
Linux myhost 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31
EST 2009 x86_64 x86_64 x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:52:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Configure Command
'./configure' '--prefix=/ox/kayako/php' '--enable-mbstring'
'--with-curl' '--with-openssl' '--with-iconv' '--with-mysqli'
'--with-gd' '--with-ttf' '--enable-dbase' '--enable-soap'
'--with-apxs2=/ox/kayako/apache/bin/apxs' '--enable-fastcgi'
'--enable-force-cgi-redirect' '--with-libdir=lib64' '--with-png-dir'
'--with-jpeg-dir' '--with-mcrypt'
'--with-freetype-dir=/usr/include/freetype2' '--with-zlib' '--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-cgi'
'--enable-force-cgi-redirect' '--enable-discard-path' '--with-iconv'
'--enable-shmop' '--enable-sysvmsg' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sockets' '--with-bz2' '--with-gettext'
'--enable-zip' '--enable-pcntl' '--with-readline'



[2009-03-23 11:58:47] berblinger at krumedia dot de

i just tested the Segmentation Fault error on another machine with
similar hardware and OS, the result was the same. 
- Segmentation fault caused.

# cat debian_version
5.0
# uname -a
Linux testserver.local 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC
2009 
x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 10 2009 04:26:53)
Copyright (c) 1997-2009 The PHP Group

Both servers are configured exactly with the same configure command.



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

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



#47714 [Com]: autoloading classes inside exception_handler leads to crashes

2009-03-25 Thread saschagros at gmail dot com
 ID:   47714
 Comment by:   saschagros at gmail dot com
 Reported By:  crocodile2u at gmail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu 8.10
 PHP Version:  5.3.0beta1
 New Comment:

I can confirm this.

I am testing Drupal on PHP 5.3 and I am getting the same Fatal error:
Exception
thrown without a stack frame in Unknown on line 0 in our
exception_handler test, because we creat a new object (to log
exceptions) in the exception handler function.


Previous Comments:


[2009-03-20 06:12:40] crocodile2u at gmail dot com

All the same with this snapshot. Both crashes remain.



[2009-03-20 00:56:24] fel...@php.net

Please try using this CVS snapshot:

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

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





[2009-03-19 08:36:27] crocodile2u at gmail dot com

 The crash type depends on whether I use __autoload() or
 spl_autoload_register(). I the first case I get Fatal error: 
 Exception
 thrown without a stack frame in Unknown on line 0, while in the 
 second
 I get Fatal error: Allowed memory size of 134217728 bytes exhausted
 (tried to allocate 72 bytes) in /home/vbolshov/tmp/x.php on line 21
 Segmentation fault

I am sorry but the error messages are mixed up here. 

Correct is:
for __autoload() - Fatal error: Allowed memory size of 134217728 bytes
exhausted
(tried to allocate 72 bytes) in /home/vbolshov/tmp/x.php on line 21
Segmentation fault
for spl_autoload_register(): Fatal error: Exception
thrown without a stack frame in Unknown on line 0



[2009-03-19 08:33:12] crocodile2u at gmail dot com

Description:

When I use set_exception_handler() and attempt to create an instance of
a class inside the handler (the class is not yet loaded and needs to be
loaded with __autoload) - I get crashes.

The crash type depends on whether I use __autoload() or
spl_autoload_register(). I the first case I get Fatal error: Exception
thrown without a stack frame in Unknown on line 0, while in the second
I get Fatal error: Allowed memory size of 134217728 bytes exhausted
(tried to allocate 72 bytes) in /home/vbolshov/tmp/x.php on line 21
Segmentation fault

It must be noticed, that in case the class already had been loaded by
the moment of the exception throw - there are no errors and everything
is ok.

I am terribly sorry the the reproduce code is longer than 20 lines but
it is really simple and I think it shows all the problems.

Reproduce code:
---
?php

/*
Uncomment handler class declaration to get rid of crashes
*/

/*
class handler {
function handle($e) {
echo $e-getMessage().\n;
}
}
*/

function au($class) {
eval('class handler {
  function handle($e) {
  echo $e-getMessage().\n;
  }
  }');
}

/*
Uncomment __autoload() and comment spl_autoload_register() call to
switch between crash types
*/

/*
function __autoload($class) {
au($class);
}
*/

spl_autoload_register('au');

set_exception_handler(function($exception) {
$h = new handler();
$h-handle($exception);
});

throw new Exception('exception');

Expected result:

exception

Actual result:
--
In case we use spl_autoload_register:
--
Fatal error: Exception thrown without a stack frame in Unknown on line
0
--

In case we use __autoload:
--
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 72 bytes) in /home/vbolshov/tmp/x.php on line 21
Segmentation fault
--

Works ok when handler class declaration at the top is uncommented.





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



#47730 [Opn-Fbk]: PHP crashes when errorHandler throws Exception

2009-03-25 Thread scottmac
 ID:   47730
 Updated by:   scott...@php.net
 Reported By:  berblinger at krumedia dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Can you do

./configure --disable-all --enable-debug

And run the script through valgrind as well as through gdb.

If that fails then getting access to an account on the server might be
the easiest solution.


Previous Comments:


[2009-03-25 11:32:49] berblinger at krumedia dot de

This segfault is also caused when any 3rd party modules are disabled.
As already said, we got several servers with very similar hardware and
OS ( including configuration ) and each of them makes PHP crash with
this snippet.

We recently upgraded from PHP 5.2.6 to PHP 5.2.9 and since this upgrade
we noticed this segfault.

Can i provide any other informations for you to help you fixing this
bug?



[2009-03-23 15:51:15] tombt081981 at hotmail dot com

I first just disabled XCache

= still seg fault , so XCache can't be the reason

Then i re-compiled with ./configure --disable-all

= still seg fault


# php -i
System = myhostname 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009
x86_64
Build Date = Mar 23 2009 16:43:14
Configure Command =  './configure'  '--disable-all'
Server API = Command Line Interface
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /usr/local/lib
Loaded Configuration File = /usr/local/lib/php-cli.ini
Scan this dir for additional .ini files = (none)
additional .ini files parsed = (none)
PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = no
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled
Registered PHP Streams = php, file, data, http, ftp
Registered Stream Socket Transports = tcp, udp, unix, udg
Registered Stream Filters = string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed

#...



[2009-03-23 15:27:39] scott...@php.net

I can't reproduce this with 5.2.9 / 5.2.10-dev, can you try a build
with everything disabled. Also make sure all third party modules are
disabled like XCache.

./configure --disable-all

# uname -a
Linux whisky 2.6.18-xen #1 SMP Tue Feb 12 06:40:50 UTC 2008 x86_64
GNU/Linux

# file sapi/cli/php
sapi/cli/php: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not
stripped

# sapi/cli/php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:13:12) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



[2009-03-23 15:11:42] tombt081981 at hotmail dot com

I get this segmentation fault, too, on a Debian 5.0 with php 5.2.9. (i
use XCache, maybe this is relevant?)



[2009-03-23 13:10:22] work at setor dot net

Have a same problem

# uname -a
Linux myhost 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31
EST 2009 x86_64 x86_64 x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:52:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Configure Command
'./configure' '--prefix=/ox/kayako/php' '--enable-mbstring'
'--with-curl' '--with-openssl' '--with-iconv' '--with-mysqli'
'--with-gd' '--with-ttf' '--enable-dbase' '--enable-soap'
'--with-apxs2=/ox/kayako/apache/bin/apxs' '--enable-fastcgi'
'--enable-force-cgi-redirect' '--with-libdir=lib64' '--with-png-dir'
'--with-jpeg-dir' '--with-mcrypt'
'--with-freetype-dir=/usr/include/freetype2' '--with-zlib' '--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-cgi'
'--enable-force-cgi-redirect' '--enable-discard-path' '--with-iconv'
'--enable-shmop' '--enable-sysvmsg' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sockets' '--with-bz2' '--with-gettext'
'--enable-zip' '--enable-pcntl' '--with-readline'



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

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



#47753 [Com]: PHP crashes when in class method argument throw Exception

2009-03-25 Thread berblinger at krumedia dot de
 ID:   47753
 Comment by:   berblinger at krumedia dot de
 Reported By:  work at setor dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Guess this is - as you already mentioned - the same problem like the
bug #47730. 
If you rewrite the execute() function to something like this:
---

public function execute()
{
$tmp = $this-makeThrow();
$this-test( $tmp );
}

---

everything works fine. This segfault is only caused, when one of the
arguments of a valid function call throws an exception.


Previous Comments:


[2009-03-23 13:49:57] work at setor dot net

public function execute()
{
// this works
$pass = $this-makeThrow();
$this-test( $pass );
}

# uname -a
Linux myhost 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31
EST 2009 x86_64 x86_64 x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:52:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Configure Command
'./configure' '--prefix=/ox/kayako/php' '--enable-mbstring'
'--with-curl' '--with-openssl' '--with-iconv' '--with-mysqli'
'--with-gd' '--with-ttf' '--enable-dbase' '--enable-soap'
'--with-apxs2=/ox/kayako/apache/bin/apxs' '--enable-fastcgi'
'--enable-force-cgi-redirect' '--with-libdir=lib64' '--with-png-dir'
'--with-jpeg-dir' '--with-mcrypt'
'--with-freetype-dir=/usr/include/freetype2' '--with-zlib'
'--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-cgi'
'--enable-force-cgi-redirect' '--enable-discard-path' '--with-iconv'
'--enable-shmop' '--enable-sysvmsg' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sockets' '--with-bz2' '--with-gettext'
'--enable-zip' '--enable-pcntl' '--with-readline'


this code work fine in the same server with php 5.2.6 configured as:

'./configure' '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib64' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--without-pear' '--with-bz2' '--with-curl'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf'
'--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png'
'--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--without-mime-magic' '--without-sqlite'
'--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata'
'--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd'
'--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC'
'--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
'--disable-json' '--without-pspell'



[2009-03-23 13:44:23] work at setor dot net

Description:

Looks like this bug #47730

php chashes (Segmentation fault). See reproduce code and comments
inside for further details.


Reproduce code:
---
?php

ini_set( 'display_errors', 1 );

class ExceptionBug
{
public function execute()
{
$this-test( $this-makeThrow() );
}

private function test( $test )
{
}

private function makeThrow()
{
throw new Exception( 'test' );
}
}

$Test = new ExceptionBug();
$Test-execute();

Expected result:

Fatal error: Uncaught exception 'Exception' with message 'test' in
/data2/www/test.php:18 Stack trace: #0 /data2/www/test.php(9):
ExceptionBug-makeThrow() #1 /data2/www/test.php(23):
ExceptionBug-execute() #2 {main} thrown in /data2/www/test.php on line
18

Actual result:
--
nothing. php crashes.

Segmentation fault in cli





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



#47759 [Bgs]: file_get_contents does not decode chunk encoded data

2009-03-25 Thread marques at displague dot com
 ID:  47759
 User updated by: marques at displague dot com
 Reported By: marques at displague dot com
 Status:  Bogus
 Bug Type:HTTP related
 PHP Version: 5.2.9
 New Comment:

Chunk encoding is a requirement of HTTP/1.1 clients.  If
file_get_contents is going to claim to be able to fetch http streams,
then it needs to come forward about its limitation of HTTP/1.0 on it's
manual page. This can only be inferred by reading the HTTP wrapper
manual.  In this way I have reported a documentation bug.

Moreover, the HTTP wrapper should be made to be HTTP/1.1 capable. 
Although, in this century, lack of HTTP/1.1 support in an HTTP client is
fairly crippling, this bug can be considered a feature request.

Feel free to change the summary to more appropriately reflect one of
these two bugs.  The end result however is the same, file_get_contents
does not decode chunk encoded data.

http://php.net/file_get_contents
http://us3.php.net/manual/en/wrappers.http.php


Previous Comments:


[2009-03-24 23:50:25] il...@php.net

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

.



[2009-03-24 13:39:48] marques at displague dot com

Description:

file_get_contents() does not decode HTTP content sent with
Transfer-Encoding: chunked.  This is probably also true for fopen()
and other HTTP stream handlers in PHP.

RFC2616 section 3.6.1:
   All HTTP/1.1 applications MUST be able to receive and decode the
   chunked transfer-coding, and MUST ignore chunk-extension
extensions
   they do not understand.



Reproduce code:
---
echo file_get_contents('somechunkedurl.html');

Expected result:

This is the data in the first chunk and this is the second one


Actual result:
--
23
This is the data in the first chunk

1A
and this is the second one

0






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



#47712 [Com]: Weird behavior under high load

2009-03-25 Thread kak dot serpom dot po dot yaitsam at gmail dot com
 ID:   47712
 Comment by:   kak dot serpom dot po dot yaitsam at gmail dot com
 Reported By:  ninzya at inbox dot lv
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.3.0beta1
 New Comment:

Try to test this under PHP 5.3 with libmysql driver (not mysqlnd).


Previous Comments:


[2009-03-25 07:28:35] ninzya at inbox dot lv

In most cases this bug is being hit when working with mysql, and only
during high concurrency. When there is no concurrency, or concurrency is
not big enough, bug does not trigger. Also i forgot to mention that PHP
is installed as a module.

Downloaded QA's PHP 5.3.0RC1 and tested it with both php_mysql and
php_mysqli extensions, bug is still present.

The page that is being executed during stress test contains 14 SQL
queries, 11 of them are SELECT queries. In most cases the 5th to 7th
SELECT queries are failing to return proper data using
mysql_fetch_assoc(). When the bug triggers, the values of returned array
(usually first on first two keys in the array) are being replaced with
irrelevant to SELECT result data, contents of those values are either
NULL or data that was stored in DB, but used to appear in previous SQL
queries. In the example above you can clearly see that the value of key
'id' in array $row is 'SHARED', but shared is the value of another field
in another SQL query i used to execute. Probably, mysqlnd is somehow
sharing memory between requests, and somehow memory of another request
being processed concurrently is being passed to current request. Another
assumption may be that the mysqlnd somehow bypasses update of currently
used cached zval.

Anyway, if this is mysqlnd related, still don't know how to explain
warning with empty constant mentioned in previous report.



[2009-03-24 18:49:53] kak dot serpom dot po dot yaitsam at gmail dot
com

I guess the trouble is in MySQL Native Driver (mysqlnd). No?



[2009-03-21 22:45:24] ninzya at inbox dot lv

Tested under PHP 5.2.9-1, the problem does not exist with that version
of PHP.



[2009-03-20 12:34:59] ninzya at inbox dot lv

And here is the screenshot of the output of MySql query browser after
executing SQL query i mentioned above:
http://www.stepanov.lv/pub/mysql.jpg



[2009-03-20 12:28:51] ninzya at inbox dot lv

I got a little bit closer to the problem. Here's what happens. See this
script:

  // load page
  $sql ='SELECT id, ' .implode( ', ', $properties) .'
FROM ' .TAB_PREF .'pages
  WHERE node_id =' .$Db-escape( $nodeId, 'UINT').'
AND alt_name =' .$Db-escape( $pageAlt, 'STRING') .'
  LIMIT 0, 1;';
  if(( $row =$Db-queryFirst( $sql)) ===null)
throw new Exception( 'NOT_FOUND');

  if( $row['id'] ===null) {// THIS IS WHERE YOU SHOULD LOOK AT
trigger_error( 'Got NULL!', E_USER_WARNING);
trigger_error( 'SQL: ' .$sql, E_USER_WARNING);
ob_start();
var_dump( $row);
trigger_error( ob_get_clean(), E_USER_WARNING);
die();
  }

As you can see, i am testing if $row['id'] is null (this is unexpected
situation when this field becomes null, it's an auto column and at this
step i expect successfully fetched row), and if it is NULL, then i wish
to see the debug info for the contents of $row and overall what's going
on.

Now here is the error log when this unexpected situation is being
RANDOMLY triggered during stress test:

[20-Mar-2009 14:20:37] PHP Warning:  Got NULL! in D:\...\pages.php on
line 93

[20-Mar-2009 14:20:37] PHP Warning:  SQL: SELECT id, `title`,
`keywords`, `descr`, `template_id`
FROM pages
  WHERE node_id =11
AND alt_name ='welcome'
  LIMIT 0, 1; in D:\...\pages.php on line 94

[20-Mar-2009 14:20:37] PHP Warning:  array(5) {
  [id]=
  string(6) SHARED
  [title]=
  string(12) My test page
  [keywords]=
  string(6) asdasd
  [descr]=
  string(6) asdasd
  [template_id]=
  string(4) 8567
}
 in D:\...\pages.php on line 97

I don't know how to explain this. I guess this is mysqlnd failing this
bad.



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

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



#47712 [Com]: Weird behavior under high load

2009-03-25 Thread ninzya at inbox dot lv
 ID:   47712
 Comment by:   ninzya at inbox dot lv
 Reported By:  ninzya at inbox dot lv
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.3.0beta1
 New Comment:

I guess i can not switch between libmysql and mysqlnd in PHP 5.3. I
have no tools to compile PHP myself with the proper library. If you know
where i can find PHP 5.3RC1 with libmysql, i would test it out right
away.


Previous Comments:


[2009-03-25 12:19:04] kak dot serpom dot po dot yaitsam at gmail dot
com

Try to test this under PHP 5.3 with libmysql driver (not mysqlnd).



[2009-03-25 07:28:35] ninzya at inbox dot lv

In most cases this bug is being hit when working with mysql, and only
during high concurrency. When there is no concurrency, or concurrency is
not big enough, bug does not trigger. Also i forgot to mention that PHP
is installed as a module.

Downloaded QA's PHP 5.3.0RC1 and tested it with both php_mysql and
php_mysqli extensions, bug is still present.

The page that is being executed during stress test contains 14 SQL
queries, 11 of them are SELECT queries. In most cases the 5th to 7th
SELECT queries are failing to return proper data using
mysql_fetch_assoc(). When the bug triggers, the values of returned array
(usually first on first two keys in the array) are being replaced with
irrelevant to SELECT result data, contents of those values are either
NULL or data that was stored in DB, but used to appear in previous SQL
queries. In the example above you can clearly see that the value of key
'id' in array $row is 'SHARED', but shared is the value of another field
in another SQL query i used to execute. Probably, mysqlnd is somehow
sharing memory between requests, and somehow memory of another request
being processed concurrently is being passed to current request. Another
assumption may be that the mysqlnd somehow bypasses update of currently
used cached zval.

Anyway, if this is mysqlnd related, still don't know how to explain
warning with empty constant mentioned in previous report.



[2009-03-24 18:49:53] kak dot serpom dot po dot yaitsam at gmail dot
com

I guess the trouble is in MySQL Native Driver (mysqlnd). No?



[2009-03-21 22:45:24] ninzya at inbox dot lv

Tested under PHP 5.2.9-1, the problem does not exist with that version
of PHP.



[2009-03-20 12:34:59] ninzya at inbox dot lv

And here is the screenshot of the output of MySql query browser after
executing SQL query i mentioned above:
http://www.stepanov.lv/pub/mysql.jpg



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

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



#47770 [Fbk-Opn]: pdo::query() segmentation fault

2009-03-25 Thread shj at xenosi dot de
 ID:   47770
 User updated by:  shj at xenosi dot de
 Reported By:  shj at xenosi dot de
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Gentoo Linux 64bit
 PHP Version:  5.2.9
 New Comment:

like this?

Starting program: /usr/bin/php /down/test.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type return to continue, or q return to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
(no debugging symbols found)
Cannot find new threads: generic error
(gdb) 
(gdb) bt
#0  0x7f34747b755a in ?? () from /lib64/ld-linux-x86-64.so.2
#1  0x7f34747b2856 in ?? () from /lib64/ld-linux-x86-64.so.2
#2  0x7f34747b6d7b in ?? () from /lib64/ld-linux-x86-64.so.2
#3  0x7f3472ed4f9b in ?? () from /lib/libdl.so.2
#4  0x7f34747b2856 in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x7f3472ed530c in ?? () from /lib/libdl.so.2
#6  0x7f3472ed4f01 in dlopen () from /lib/libdl.so.2
#7  0x00524907 in php_dl ()
#8  0x0058dd83 in ?? ()
#9  0x005c038e in zend_llist_apply ()
#10 0x0058dd4a in php_ini_register_extensions ()
#11 0x00587d06 in php_module_startup ()
#12 0x0063e0fd in ?? ()
#13 0x0063e8d2 in main ()


Previous Comments:


[2009-03-25 10:21:06] ka...@php.net

I'm unable to reproduce this with your script if I replace:
$stmt = $this-class-query($this-query);
return new SHJPDOStatement($stmt);

with:
return new SHJPDOStatement($this-class-query($this-query));


I get no crash, anything in my server log, etc. using Windows 32bit,
can you generate a backtrace as described here:
http://bugs.php.net/bugs-generating-backtrace.php



[2009-03-25 07:12:07] shj at xenosi dot de

Description:

1. this is segmentation fault.
return new class($pdo-class-query($this-query));

2. this is ok.
$stmt = $pdo-class-query($this-query);
return new class($stmt);


Reproduce code:
---
http://codepad.org/wJ5O5TvG
this is bug example.
run this code on your machine.

thank you.






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



#47766 [Fbk-Opn]: php-cgi.exe crashes

2009-03-25 Thread ipseno at yahoo dot com
 ID:   47766
 User updated by:  ipseno at yahoo dot com
 Reported By:  ipseno at yahoo dot com
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Win XP SP3
 PHP Version:  5.3CVS-2009-03-24 (snap)
 New Comment:

Ok, I will make a backtrace then and post it here.
But until I do it, this is last what I found out:

Remember comment line:
// From DB

Well if I remove JUST one dot it becomes:
// From DB...
and NO crash occurs!!!

If I ADD just one dot it becomes:
// From DB.
and NO crash occurs!!!

What does it tell you, at a first glance?
I think, that it is, a specific number of string symbols, in .php file
that represent PHP(code) script itself, that brings core down


Previous Comments:


[2009-03-25 08:59:21] paj...@php.net

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

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

And how we suppose to know what you are doing then?

You can try to create a backtrace, maybe there is an obvious problem
which can be seen in it.





[2009-03-25 00:34:01] ipseno at yahoo dot com

Script has 145 lines of code and loads 5 custom classes and 3 extra
files.

What you propose is, as I've just found, most likely impossible.
Reason is that crash won't appear if I remove ANYTHING from script.

At one line I removed COMMENT!
// From DB

Which doesn't affect PHP's code in ANY way.
To my shock everythhing restored to normal.

Exactly this fact makes me unable to ISOLATE few lines of code for
crash reproduction.



[2009-03-24 23:58:25] paj...@php.net

Create the smallest possible script to reproduce the problem and post
it here.



[2009-03-24 23:42:33] ipseno at yahoo dot com

I..., m..., well.
Hm...!?

This script uses custom classes that I've built and needs to be
loaded.

Anyway... I've found out, that crash occurs in LAST line of code before
PHP's closing tag ?


new face($cont);


There are 2 ways od avoiding crash.
a) By commenting out // new face($cont);
b) By making string $cont supplied to class face shorter then 2232
letters

I can not just post / give you all code, as this script is being built
for financial biz. So it is a secret.

Crash occurs inside object of 'face' class.

What do you propose?



[2009-03-24 23:18:46] paj...@php.net

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





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

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



#47772 [NEW]: filter_var() returnes nothing for some invalid e-mails

2009-03-25 Thread saschagros at gmail dot com
From: saschagros at gmail dot com
Operating system: Ubuntu 9.04 Jaunty
PHP version:  5.3.0RC1
PHP Bug Type: Filter related
Bug description:  filter_var() returnes nothing for some invalid e-mails

Description:

filter_var incorrectly validates some invalid e-mail adresses (see
reproduce code).

Note: I am not 100% sure that this is the wrong behavior, however, it has
changed from php 5.2 and I can't find a related bug or NEWS entry.

Reproduce code:
---
var_dump(filter_var('inva...@site', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('inva...@site.', FILTER_VALIDATE_EMAIL));

Expected result:

bool(false)
bool(false)

Actual result:
--
string(13) inva...@site.
string(12) inva...@site

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



#47764 [Opn]: PDO statement blank page

2009-03-25 Thread dimas at webimpact dot com
 ID:   47764
 User updated by:  dimas at webimpact dot com
 Reported By:  dimas at webimpact dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Linux wiaspweb17 2.6.9-34.ELsmp
 PHP Version:  5.2.9
 New Comment:

Good day, yes I cannot reproduce this problem on MySQL, it looks like
its only dblib issue. I noticed it said that extension is experimental.
Is there anything can be done to have it fixed?


Previous Comments:


[2009-03-25 10:06:03] ka...@php.net

I tried with the PDO_MySQL driver but I can't reproduce the problem,
does this only happen with dblib and on Linux?



[2009-03-24 20:05:52] dimas at webimpact dot com

Thanks for a quick reply, that is the problem that absolutely no errors
loged by the server and no exceptions by PDO :-(



[2009-03-24 19:09:29] ka...@php.net

Does your webserver log show anything that could might have been more
of help here?



[2009-03-24 18:02:32] dimas at webimpact dot com

Description:

Good day,

we are using PDO and got into the funny problem, 

The code below shows that we are trying to simple reuse the statement 
but when first query with ci_id = 70 brings not result, PDO dies 
on a second execute. We see only blank page, if first query brings 
some results everything is fine.

Can u please help.

Thank you.  







Reproduce code:
---
$oDbConn = new PDO(dblib:dbname=;host=:1433,  , );
$oDbConn-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);  

$oStatement = $oDbConn-prepare('SIMPLE SELECT QUERY WHERE ci_id =
:ci_id');

$oStatement-bindParam(':ci_id', $val, PDO::PARAM_INT);
$val = 70;
$oStatement-execute(); 

$val = 1000;
$oStatement-execute(); 






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



#47730 [Com]: PHP crashes when errorHandler throws Exception

2009-03-25 Thread tombt081981 at hotmail dot com
 ID:   47730
 Comment by:   tombt081981 at hotmail dot com
 Reported By:  berblinger at krumedia dot de
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

This information might help:

I got the bug with php 5.2.9 and(!) php 5.2.6 after(!) an upgrade to
Bebian lenny 5.0. Before (debian 4) it worked fine, so this got to do
something with Debian 5 and not especially with php 5.2.9.


Previous Comments:


[2009-03-25 11:41:15] scott...@php.net

Can you do

./configure --disable-all --enable-debug

And run the script through valgrind as well as through gdb.

If that fails then getting access to an account on the server might be
the easiest solution.



[2009-03-25 11:32:49] berblinger at krumedia dot de

This segfault is also caused when any 3rd party modules are disabled.
As already said, we got several servers with very similar hardware and
OS ( including configuration ) and each of them makes PHP crash with
this snippet.

We recently upgraded from PHP 5.2.6 to PHP 5.2.9 and since this upgrade
we noticed this segfault.

Can i provide any other informations for you to help you fixing this
bug?



[2009-03-23 15:51:15] tombt081981 at hotmail dot com

I first just disabled XCache

= still seg fault , so XCache can't be the reason

Then i re-compiled with ./configure --disable-all

= still seg fault


# php -i
System = myhostname 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009
x86_64
Build Date = Mar 23 2009 16:43:14
Configure Command =  './configure'  '--disable-all'
Server API = Command Line Interface
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /usr/local/lib
Loaded Configuration File = /usr/local/lib/php-cli.ini
Scan this dir for additional .ini files = (none)
additional .ini files parsed = (none)
PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = no
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled
Registered PHP Streams = php, file, data, http, ftp
Registered Stream Socket Transports = tcp, udp, unix, udg
Registered Stream Filters = string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed

#...



[2009-03-23 15:27:39] scott...@php.net

I can't reproduce this with 5.2.9 / 5.2.10-dev, can you try a build
with everything disabled. Also make sure all third party modules are
disabled like XCache.

./configure --disable-all

# uname -a
Linux whisky 2.6.18-xen #1 SMP Tue Feb 12 06:40:50 UTC 2008 x86_64
GNU/Linux

# file sapi/cli/php
sapi/cli/php: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not
stripped

# sapi/cli/php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:13:12) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



[2009-03-23 15:11:42] tombt081981 at hotmail dot com

I get this segmentation fault, too, on a Debian 5.0 with php 5.2.9. (i
use XCache, maybe this is relevant?)



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

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



#47773 [NEW]: cURL multi crashes

2009-03-25 Thread entpman at gmail dot com
From: entpman at gmail dot com
Operating system: WIN XP SP2
PHP version:  5.2.9
PHP Bug Type: cURL related
Bug description:  cURL multi crashes

Description:

The program will work fine for hundreds of downloads then suddenly
crashes.

Reproduce code:
---
?php
$data = downloadurls(
array(
array(
'url' = 'http://www.google.com'
),
array(
'url' = 'http://www.yahoo.com'
)
)
);

// of course more urls are needs

function downloadurls($downloads,$cookie = null){   
$timeout = 30;  
$mcurl = curl_multi_init();
$agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
Gecko/2009201 Firefox/3.0.0.1;

foreach($downloads as $key=$download){ 
$url = $download['url'];
$ch = curl_init();   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
if(!empty($download['postdata'])){
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS,$download['postdata']); 
}   
if(!empty($cookie)){
@unlink($cookie);
//echo added cookie\n;
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
}
if(!empty($download['proxy'])){
curl_setopt($ch, CURLOPT_PROXY, $download['proxy']);
}
curl_multi_add_handle($mcurl, $ch);
$downloads[$key]['handle'] = $ch;   
}

do {
$n=curl_multi_exec($mcurl,$active);
usleep(100);
}   
while ($active);

foreach($downloads as $key=$download){ 
$ch = $download['handle'];
$done_content = curl_multi_getcontent($ch);
if(curl_errno($ch) == 0) {
$downloads[$key]['picture'] = $done_content;
} else {
exit('error');  
}
curl_multi_remove_handle($mcurl, $ch);
curl_close($ch);   
}

curl_multi_close($mcurl);
return $downloads;
}
?

Actual result:
--
backtrace:

php_curl.dll!_Curl_llist_insert_next()  + 0x48 bytes
php_curl.dll!_Curl_hash_add()  + 0x74 bytes 
php_curl.dll!_Curl_cache_addr()  + 0x6d bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x82 bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x14 bytes   
php_curl.dll!_Curl_getaddrinfo()  + 0x317 bytes 
msvcrt.dll!77c3a3b0()   
[Frames below may be incorrect and/or missing, no symbols loaded for
msvcrt.dll] 
kernel32.dll!7c80b683() 

-- 
Edit bug report at http://bugs.php.net/?id=47773edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47773r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47773r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47773r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47773r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47773r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47773r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=47773r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=47773r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=47773r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=47773r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=47773r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=47773r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=47773r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47773r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=47773r=php4
Daylight Savings:

#47773 [Opn-Fbk]: cURL multi crashes

2009-03-25 Thread pajoye
 ID:   47773
 Updated by:   paj...@php.net
 Reported By:  entpman at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: WIN XP SP2
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Please try using this CVS snapshot:

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

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




Previous Comments:


[2009-03-25 14:08:06] entpman at gmail dot com

Description:

The program will work fine for hundreds of downloads then suddenly
crashes.

Reproduce code:
---
?php
$data = downloadurls(
array(
array(
'url' = 'http://www.google.com'
),
array(
'url' = 'http://www.yahoo.com'
)
)
);

// of course more urls are needs

function downloadurls($downloads,$cookie = null){   
$timeout = 30;  
$mcurl = curl_multi_init();
$agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
Gecko/2009201 Firefox/3.0.0.1;

foreach($downloads as $key=$download){ 
$url = $download['url'];
$ch = curl_init();   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
if(!empty($download['postdata'])){
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS,$download['postdata']); 
}   
if(!empty($cookie)){
@unlink($cookie);
//echo added cookie\n;
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
}
if(!empty($download['proxy'])){
curl_setopt($ch, CURLOPT_PROXY, $download['proxy']);
}
curl_multi_add_handle($mcurl, $ch);
$downloads[$key]['handle'] = $ch;   
}

do {
$n=curl_multi_exec($mcurl,$active);
usleep(100);
}   
while ($active);

foreach($downloads as $key=$download){ 
$ch = $download['handle'];
$done_content = curl_multi_getcontent($ch);
if(curl_errno($ch) == 0) {
$downloads[$key]['picture'] = $done_content;
} else {
exit('error');  
}
curl_multi_remove_handle($mcurl, $ch);
curl_close($ch);   
}

curl_multi_close($mcurl);
return $downloads;
}
?

Actual result:
--
backtrace:

php_curl.dll!_Curl_llist_insert_next()  + 0x48 bytes
php_curl.dll!_Curl_hash_add()  + 0x74 bytes 
php_curl.dll!_Curl_cache_addr()  + 0x6d bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x82 bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x14 bytes   
php_curl.dll!_Curl_getaddrinfo()  + 0x317 bytes 
msvcrt.dll!77c3a3b0()   
[Frames below may be incorrect and/or missing, no symbols loaded for
msvcrt.dll] 
kernel32.dll!7c80b683() 





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



#47774 [NEW]: Integer Overflow

2009-03-25 Thread vivekanandan8 at yahoo dot com
From: vivekanandan8 at yahoo dot com
Operating system: Debian
PHP version:  5.2CVS-2009-03-25 (snap)
PHP Bug Type: Scripting Engine problem
Bug description:  Integer Overflow

Description:

Generally when integer number exceed(overflows), it is converted to
float,But for the number -2147483648 the Integer can hold, but converted to
float.   

Reproduce code:
---
?
$vValue =   (int)-2147483648;
var_dump($vValue);
$vValue = -2147483648;
var_dump($vValue);
?

Expected result:

int(-2147483648) int(-2147483648) 

Actual result:
--
int(-2147483648) float(-2147483648) 

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



#47038 [Asn-Csd]: Memory leak in include()

2009-03-25 Thread dmitry
 ID:   47038
 Updated by:   dmi...@php.net
 Reported By:  tim at digicol dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.3CVS, 6CVS (2009-01-20)
 Assigned To:  scottmac
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-01-30 15:30:25] scott...@php.net

The bug report is still marked as Assigned so obviously its not
fixed...



[2009-01-30 14:51:34] tim at digicol dot de

Sorry, I don't want to get on your nerves - just for the record, this 
still happens to me with PHP 5.3.0beta1.



[2009-01-20 11:11:51] tim at digicol dot de

Happens to me with PHP 6.0.0-dev (snapshot php6.0-200901200730.tar.bz2)

as well.



[2009-01-08 15:57:50] tim at digicol dot de

Description:

With today's PHP 5.3 snapshot, include() on my Linux box leaks memory;

I've noticed this because we're using long-running scripts with the 
PHP CLI (where Smarty's fetch/display methods call include()...). This

doesn't happen with PHP 5.2.6.

I tested with an unchanged copy of php.ini-recommended and just 
'./configure' without any options, on Debian Linux 4.0, running in 
VMware Fusion on my Intel Mac.

Thanks for looking into this, and for the great work on PHP!

Reproduce code:
---
?php

// Create an empty file
touch('empty.txt');

while (true)
{
include('empty.txt');
echo memory_get_usage() . \n;
}

?

Expected result:

No increase in memory usage.

Actual result:
--
Memory usage increases constantly, until PHP exits because the memory 
limit is exceeded.





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



#47773 [Fbk-Opn]: cURL multi crashes

2009-03-25 Thread entpman at gmail dot com
 ID:   47773
 User updated by:  entpman at gmail dot com
 Reported By:  entpman at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: WIN XP SP2
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

I tried version 5.3.0RC2-dev same results.


Previous Comments:


[2009-03-25 14:11:53] paj...@php.net

Please try using this CVS snapshot:

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

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





[2009-03-25 14:08:06] entpman at gmail dot com

Description:

The program will work fine for hundreds of downloads then suddenly
crashes.

Reproduce code:
---
?php
$data = downloadurls(
array(
array(
'url' = 'http://www.google.com'
),
array(
'url' = 'http://www.yahoo.com'
)
)
);

// of course more urls are needs

function downloadurls($downloads,$cookie = null){   
$timeout = 30;  
$mcurl = curl_multi_init();
$agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
Gecko/2009201 Firefox/3.0.0.1;

foreach($downloads as $key=$download){ 
$url = $download['url'];
$ch = curl_init();   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
if(!empty($download['postdata'])){
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS,$download['postdata']); 
}   
if(!empty($cookie)){
@unlink($cookie);
//echo added cookie\n;
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
}
if(!empty($download['proxy'])){
curl_setopt($ch, CURLOPT_PROXY, $download['proxy']);
}
curl_multi_add_handle($mcurl, $ch);
$downloads[$key]['handle'] = $ch;   
}

do {
$n=curl_multi_exec($mcurl,$active);
usleep(100);
}   
while ($active);

foreach($downloads as $key=$download){ 
$ch = $download['handle'];
$done_content = curl_multi_getcontent($ch);
if(curl_errno($ch) == 0) {
$downloads[$key]['picture'] = $done_content;
} else {
exit('error');  
}
curl_multi_remove_handle($mcurl, $ch);
curl_close($ch);   
}

curl_multi_close($mcurl);
return $downloads;
}
?

Actual result:
--
backtrace:

php_curl.dll!_Curl_llist_insert_next()  + 0x48 bytes
php_curl.dll!_Curl_hash_add()  + 0x74 bytes 
php_curl.dll!_Curl_cache_addr()  + 0x6d bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x82 bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x14 bytes   
php_curl.dll!_Curl_getaddrinfo()  + 0x317 bytes 
msvcrt.dll!77c3a3b0()   
[Frames below may be incorrect and/or missing, no symbols loaded for
msvcrt.dll] 
kernel32.dll!7c80b683() 





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



#47775 [NEW]: Not loading MSSQL DLL

2009-03-25 Thread itamarc at rogers dot com
From: itamarc at rogers dot com
Operating system: Windows 2003 Ent SP2
PHP version:  5.2.9
PHP Bug Type: Dynamic loading
Bug description:  Not loading MSSQL DLL

Description:

Trying to make PHP work with MSSQL DLL I tried to load it in my
installation but when I use print_r(get_loaded_extensions()); to check
what is loaded it wasn't.

I doubled checked the php.ini to confirm and it was also listed in there.

Reproduce code:
---
I am able to reproduce this every time I try on this installation.

Expected result:

I would expect it to list MSSQL.

Actual result:
--
It lists the following:

 [0] = bcmath [1] = calendar [2] = com_dotnet [3] = ctype [4] =
session [5] = filter [6] = ftp [7] = hash [8] = iconv [9] = json [10]
= odbc [11] = pcre [12] = Reflection [13] = date [14] = libxml [15] =
standard [16] = tokenizer [17] = zlib [18] = SimpleXML [19] = dom [20]
= SPL [21] = wddx [22] = xml [23] = xmlreader [24] = xmlwriter [25] =
ISAPI 

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



#47469 [Opn]: beginTransaction causing deadlock in SQLite3

2009-03-25 Thread rjohnson at intepro dot us
 ID:   47469
 User updated by:  rjohnson at intepro dot us
 Reported By:  rjohnson at intepro dot us
 Status:   Open
 Bug Type: PDO related
 Operating System: Windows XP SP3
 PHP Version:  5.2.8
 New Comment:

Hello.  Just curious as to if anyone has looked at this since it has
been open for a month.  It is still an issue for us with version 5.2.8
and I did not see any fixes for it in the changelog for 5.2.9.  If there
is anything you need from me, please let me know.

Thanks


Previous Comments:


[2009-02-21 19:51:57] rjohnson at intepro dot us

It looks like the multiple transaction thing might be a SQLite3
bug/feature as I am able to open 2 command-line interfaces using the
SQLite3 command-line tool and issue a BEGIN on both.  I can do an insert
with one, but the insert on the other fails with the database locked
error (just like the PDO problem).

There is still a problem in PDO, however.  When we capture a database
locked exception we have an open transaction.  If we try to commit or
rollback the open transaction the process fails with an error indicating
other transactions are open (presumably from process 1).  In my SQLite
command-line test I can commit the transaction from process 2 (where the
lock exception was encountered) while the transaction from process 1 is
open.  The problem with PDO is in the loop - if database is locked we
can't commit or rollback the open transaction, when we try to begin the
transaction in the next iteration of the loop we get this error: There
is already an active transaction.  If we handle that exception and keep
the transaction open, then the 2 scripts deadlock.  So if we could
commit or rollback the transaction from process 2  when we see that the
database is locked (as the SQLite command-line client allows) that might
work.



[2009-02-21 18:35:03] rjohnson at intepro dot us

Description:

When executing 2 separate processes that insert or update a SQLite3
database, PDO allows both to begin a transaction rather than indicating
that another transaction has locked the database.  This causes deadlock.
 Using SQLite2 we would issue a BEGIN and catch a SQLITE_BUSY, then
usleep and try again.  This worked flawlessly.

Reproduce code:
---
http://beacon.intepro.us/pdoSqliteBug.html

Expected result:

We run this code from 2 tabs in Firefox with name=0 and name=1 passed
as $_GET params.  The sleep(1) allows us enough time to execute both
processes simultaneously.

The beginTransaction in the 2nd script should detect that SQLite is
busy (the 1st transaction has a lock on the file), the code should sleep
for .25 of a second and try again until the first process is done, then
the second should complete.  Both processes should complete in roughly
20 seconds.

Actual result:
--
Both scripts run indefinitely.  If we stop the second process, the
first will complete.





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



#47776 [NEW]: -without-ldap-sasl option is ignored

2009-03-25 Thread tprohaska2 at honeywell dot com
From: tprohaska2 at honeywell dot com
Operating system: AIX 5.3 
PHP version:  5.2.9
PHP Bug Type: Compile Failure
Bug description:  -without-ldap-sasl option is ignored

Description:

configure fails while looking for sasl symbols
--without-ldap-sasl as chosen 


Reproduce code:
---
./configure \
--with-ldap=/webapp/DSRSK/lib/ldapcsdk \
--with-oci8=instantclient,/webapp/instantclient10_1 \
--with-apxs2=/webapp/apache/2.2.11/bin/apxs \
--with-config-file-path=/webapp/apache/2.2.11/conf/httpd.conf \
--with-zlib-dir=/webapp/local/lib \
--without-ldap-sasl \
--enable-shared  \
--disable-static \
--without-zlib-dir \
--without-bz2 \
--without-sqlite \


Expected result:

expect it not to fail - expect it to not look for sasl related symbols

Actual result:
--
configure:53481: checking for ldap_parse_result
configure:53509: gcc -o conftest -I/usr/include -DHAVE_LONG_LONG 
-I/webapp/DSRS
K/lib/ldapcsdk/include -L/usr/lib  -L/opt/freeware/lib -L/opt/freeware/lib
-L/we
bapp/DSRSK/lib/ldapcsdk/lib -L/webapp/DSRSK/lib/ldapcsdk/lib conftest.c
-lssl3 -
lprldap50 -lldap50 -lssldap50 -llber50 -lplds4 -lplc4 -lnspr4 -lm  -lxml2
-licon
v -lm -lxml2 -liconv -lm  15
ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init
ld: 0711-317 ERROR: Undefined symbol: .sasl_setprop
ld: 0711-317 ERROR: Undefined symbol: .sasl_client_start
ld: 0711-317 ERROR: Undefined symbol: .sasl_client_step
ld: 0711-317 ERROR: Undefined symbol: .sasl_getprop
ld: 0711-317 ERROR: Undefined symbol: .sasl_client_new
ld: 0711-317 ERROR: Undefined symbol: .sasl_dispose
ld: 0711-317 ERROR: Undefined symbol: .sasl_encode
ld: 0711-317 ERROR: Undefined symbol: .sasl_decode
ld: 0711-317 ERROR: Undefined symbol: .sasl_set_alloc
ld: 0711-317 ERROR: Undefined symbol: .sasl_client_init
ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
ld: 0711-317 ERROR: Undefined symbol: pthread_mutex_lock
...
...
...

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



#46218 [NoF-Opn]: apache2 reaches max clients limit with error in php_stdiop_set_option

2009-03-25 Thread funky2step at gmail dot com
 ID:   46218
 User updated by:  funky2step at gmail dot com
 Reported By:  funky2step at gmail dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Streams related
 Operating System: RHEL ES Rel 4 (Nahant Update 6)
 PHP Version:  5.2.6
 New Comment:

We fixed this in the end by ditching apache2 and running php5 with
apache 1.3.41
The problem has not occurred in the month or so since implementing it
and considering it used to happen at least once per day, I think this is
a decent solution.


Previous Comments:


[2009-03-13 14:23:01] mibrahim at mibrahim dot net

Same exact problem. Tested it by lowering MaxClients, apache hangs
within 1 minute. The only temporary solution is to increase MaxClients
way up, and restart the server with a cron job every period of time.



[2008-11-07 09:09:38] funky2step at googlemail dot com

I installed the latest snapshot of PHP5 (PHP 5.2.7RC3-dev) and the
problem remains. In fact it has happened twice in the space of 24
hours.
This problem doesn't just occur with this particular server and its
associated site but on all other php5.2.6 and apache2 installations.
Has no-one else seen this serious problem with busy sites using this
software?



[2008-11-06 10:38:02] funky2step at googlemail dot com

Thanks for the reply. Do you actually know if there is a problem with
the main release of php 5.2. I'm slightly cautious about installing a
snapshot because it is a busy production site. Are there any issues with
installing a snapshot?



[2008-11-01 01:00:01] php-bugs at lists dot php dot net

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



[2008-10-24 16:32:20] 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/





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

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



#47774 [Opn-Bgs]: Integer Overflow

2009-03-25 Thread mattwil
 ID:   47774
 Updated by:   matt...@php.net
 Reported By:  vivekanandan8 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Debian
 PHP Version:  5.2CVS-2009-03-25 (snap)
 New Comment:

This is the expected behavior. Happens because it's not parsed as a
single negative number, but a positive number (and 2147483648 needs to
be a float) that is then negated afterwards. So it's treated more like
-(2147483648). Hope that helps explain what's going on. :-)


Previous Comments:


[2009-03-25 14:28:33] vivekanandan8 at yahoo dot com

Description:

Generally when integer number exceed(overflows), it is converted to
float,But for the number -2147483648 the Integer can hold, but converted
to float.   

Reproduce code:
---
?
$vValue =   (int)-2147483648;
var_dump($vValue);
$vValue = -2147483648;
var_dump($vValue);
?

Expected result:

int(-2147483648) int(-2147483648) 

Actual result:
--
int(-2147483648) float(-2147483648) 





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



#47763 [Opn-Bgs]: proc_get_status-wrong PID

2009-03-25 Thread mattwil
 ID:   47763
 Updated by:   matt...@php.net
 Reported By:  ies_clan at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Windows XP SP3
 PHP Version:  5.2.9
 New Comment:

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

That's the expected behavior because cmd.exe has been used to launch
notepad. To get the result you're expecting, use the bypass_shell option
of proc_open()'s 4th parameter (http://php.net/proc_open):

$process = proc_open($cmd, $descriptorspec, $pipes,
array('bypass_shell' = TRUE));


Previous Comments:


[2009-03-24 15:44:01] ies_clan at hotmail dot com

Description:

The function proc_get_status returns a wrong PID

Reproduce code:
---
?php
$cmd = 'notepad';
$descriptorspec = array( 0 = array('pipe', 'r' ), 1 = array('pipe',
'w' ), 2 = array('pipe', 'w' ) );
$process = proc_open($cmd, $descriptorspec, $pipes);
$status = proc_get_status( $process );
echo 'PID = ', $status['pid'], \n;
passthru( 'tasklist /fi imagename eq notepad.exe');
echo \n\n;
passthru( 'tasklist /fi pid eq ' . $status['pid'] . '' );
echo \n\n;
proc_terminate($process);
?


Expected result:

PID = 2408

Abbildname  PID Sitzungsname  Sitz.-Nr.
Speichernutzung
= =  ==
===
notepad.exe2408 Console   0
2.560 K



Abbildname  PID Sitzungsname  Sitz.-Nr.
Speichernutzung
= =  ==
===
cmd.exe2336 Console   0
2.560 K




Actual result:
--
PID = 2336

Abbildname  PID Sitzungsname  Sitz.-Nr.
Speichernutzung
= =  ==
===
notepad.exe2408 Console   0
2.560 K



Abbildname  PID Sitzungsname  Sitz.-Nr.
Speichernutzung
= =  ==
===
cmd.exe2336 Console   0
2.560 K








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



#47777 [NEW]: Can't compile the pcntl extension

2009-03-25 Thread matteo at beccati dot com
From: matteo at beccati dot com
Operating system: FreeBSD 6.2
PHP version:  5.3CVS-2009-03-25 (CVS)
PHP Bug Type: Compile Failure
Bug description:  Can't compile the pcntl extension

Description:

Looks like PHP_5_3 doesn't compile on my FreeBSD 6.2 system if the pcntl
extension is enabled.

Reproduce code:
---
./configure --disable-cgi --enable-pcntl
make

Expected result:

No error :)

Actual result:
--
/usr/local/bin/bash /root/compile/php-5.3/libtool --silent
--preserve-dup-deps --mode=compile cc  -Iext/pcntl/
-I/root/compile/php-5.3/ext/pcntl/ -DPHP_ATOM_INC
-I/root/compile/php-5.3/include -I/root/compile/php-5.3/main
-I/root/compile/php-5.3 -I/root/compile/php-5.3/ext/ereg/regex
-I/usr/local/include/libxml2 -I/usr/local/include
-I/root/compile/php-5.3/ext/date/lib
-I/root/compile/php-5.3/ext/sqlite3/libsqlite -I/root/compile/php-5.3/TSRM
-I/root/compile/php-5.3/Zend-I/usr/local/include -g -O2  -c
/root/compile/php-5.3/ext/pcntl/pcntl.c -o ext/pcntl/pcntl.lo
/root/compile/php-5.3/ext/pcntl/pcntl.c: In function
`php_register_signal_constants':
/root/compile/php-5.3/ext/pcntl/pcntl.c:293: error: `CLD_EXITED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:293: error: (Each undeclared
identifier is reported only once
/root/compile/php-5.3/ext/pcntl/pcntl.c:293: error: for each function it
appears in.)
/root/compile/php-5.3/ext/pcntl/pcntl.c:294: error: `CLD_KILLED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:295: error: `CLD_DUMPED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:296: error: `CLD_TRAPPED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:297: error: `CLD_STOPPED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:298: error: `CLD_CONTINUED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:301: error: `TRAP_BRKPT'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:302: error: `TRAP_TRACE'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:305: error: `POLL_IN' undeclared
(first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:306: error: `POLL_OUT' undeclared
(first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:307: error: `POLL_MSG' undeclared
(first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:308: error: `POLL_ERR' undeclared
(first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:309: error: `POLL_PRI' undeclared
(first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:310: error: `POLL_HUP' undeclared
(first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:312: error: `ILL_ILLOPC'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:313: error: `ILL_ILLOPN'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:314: error: `ILL_ILLADR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:315: error: `ILL_ILLTRP'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:316: error: `ILL_PRVOPC'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:317: error: `ILL_PRVREG'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:318: error: `ILL_COPROC'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:319: error: `ILL_BADSTK'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:330: error: `SEGV_MAPERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:331: error: `SEGV_ACCERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:333: error: `BUS_ADRALN'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:334: error: `BUS_ADRERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:335: error: `BUS_OBJERR'
undeclared (first use in this function)
*** Error code 1


-- 
Edit bug report at http://bugs.php.net/?id=4edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=4r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=4r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=4r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=4r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=4r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=4r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=4r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=4r=needscript
Try newer version:   

#47580 [Csd-Opn]: MSSQL: Changed database context to when connecting

2009-03-25 Thread maxcamo at gmail dot com
 ID:   47580
 User updated by:  maxcamo at gmail dot com
 Reported By:  maxcamo at gmail dot com
-Status:   Closed
+Status:   Open
 Bug Type: MSSQL related
 Operating System: Win2003
 PHP Version:  5.2CVS-2009-03-05 (snap)
 New Comment:

ok but i can't connect to the db,

chaging the script like this
if ($connDb)
mssql_select_db($db, $connDb);
else
$lastmsg=mssql_get_last_message()

and...

fputs($fp, gmdate(M d Y H:i:s) . :: Try:$tries :: 
.$ServerName.::
.$lastmsg. :: . $pageName . \r\n);

i dont' get any mssql errors, but i get the same problem

I see this error randomly, or on heavy load, i think


Previous Comments:


[2009-03-09 07:32:52] maxcamo at gmail dot com

ok but i can't connect to the db,

chaging the script like this
if ($connDb)
mssql_select_db($db, $connDb);
else
$lastmsg=mssql_get_last_message()

and...

fputs($fp, gmdate(M d Y H:i:s) . :: Try:$tries :: 
.$ServerName.::
.$lastmsg. :: . $pageName . \r\n);

i dont' get any mssql errors, but i get the same problem

I see this error randomly, or on heavy load, i think



[2009-03-08 14:30:50] ka...@php.net

This is an informal notice from dblib, Microsoft's TechNet have
information about this here:
http://technet.microsoft.com/en-us/library/aa275768(SQL.80).aspx



[2009-03-05 21:27:58] maxcamo at gmail dot com

Description:

Hi,

with MSSQL 2005,Apache 2.2.11 and PHP 5.2.6 i get this error when i 
try to connect to the db

Changed database context to

The error raise up when I try to connect to the DB.

connections timeout are high

mssql.connect_timeout = 300
mssql.timeout = 300

It happen randomly, but more frequently when the site traffic si very 
high

Reproduce code:
---
$Maxtries=60;

$delayMin=5;
$delayMax=10;
$delay=rand($delayMin,$delayMax);
$log_filename=conn_failed.log;
$tries=1;

$connDb = @mssql_connect($host, $user, $pwd));
if ($connDb)
mssql_select_db($db, $connDb);

while(!$connDb){

if ($tries=$Maxtries){
//echo Database failed to respond.;
$fp = fopen($log_filename,a+);
fputs($fp, gmdate(M d Y H:i:s) . : Errore Connessione \r\n);
fclose($fp);
exit;
}

usleep($delay*$tries);
$connDb = @mssql_connect($host, $user, $pwd));
if ($connDb)
mssql_select_db($db, $connDb);

$tries++;
}

if ($tries1){
$fp = fopen($log_filename,a+);
fputs($fp, gmdate(M d Y H:i:s) . :: Try:$tries ::
.$ServerName.:: .mssql_get_last_message(). :: . $pageName .
\r\n);
fclose($fp);
}



Expected result:

Db Connection

Actual result:
--
Mar 05 2009 21:08:19:: Try:2 :: B-C2N1:: Il contesto di database è 
stato sostituito con 'dbName'. :: /index.html
Mar 05 2009 21:08:20:: Try:8 :: B-C2N1:: Il contesto di database è 
stato sostituito con 'dbName'. :: /page2.html
Mar 05 2009 21:09:26:: Try:6 :: B-C2N1:: Il contesto di database è 
stato sostituito con 'dbName'. :: /page3.html











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



#44462 [NoF-Opn]: Can't compile embed sapi on OSX

2009-03-25 Thread graham+php at nexopia dot com
 ID:   44462
 User updated by:  graham+php at nexopia dot com
 Reported By:  graham+php at nexopia dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: OSX
-PHP Version:  5.2CVS-2008-03-18
+PHP Version:  5.2CVS-2009-03-25
 New Comment:

Incidentally, this bug is now a year old, has a functioning patch that
resolves the issue, and has still not been fixed upstream.


Previous Comments:


[2009-03-17 22:49:07] graham-php at nexopia dot com

Still happening with the latest snapshot (200903172130), though the
error has changed somewhat:

/bin/sh /Users/graham/Development/php5.2-200903172130/libtool --silent
--preserve-dup-deps --mode=link gcc -O2 -I/usr/include
-I/nexopia/include  -rpath
/Users/graham/Development/php5.2-200903172130/libs -avoid-version
-module  -L/nexopia/lib  ext/libxml/libxml.lo
ext/pcre/pcrelib/pcre_chartables.lo ext/pcre/pcrelib/pcre_ucd.lo
ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo
ext/pcre/pcrelib/pcre_exec.lo ext/pcre/pcrelib/pcre_fullinfo.lo
ext/pcre/pcrelib/pcre_get.lo ext/pcre/pcrelib/pcre_globals.lo
ext/pcre/pcrelib/pcre_info.lo ext/pcre/pcrelib/pcre_maketables.lo
ext/pcre/pcrelib/pcre_newline.lo ext/pcre/pcrelib/pcre_ord2utf8.lo
ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo
ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_try_flipped.lo
ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo
ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/ctype/ctype.lo
ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo
ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo
ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo
ext/date/lib/unixtime2tm.lo ext/dom/php_dom.lo ext/dom/attr.lo
ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo
ext/dom/domexception.lo ext/dom/namelist.lo
ext/dom/processinginstruction.lo ext/dom/cdatasection.lo
ext/dom/documentfragment.lo ext/dom/domimplementation.lo
ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo
ext/dom/characterdata.lo ext/dom/documenttype.lo
ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo
ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo
ext/dom/domimplementationsource.lo ext/dom/entityreference.lo
ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo
ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo
ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/filter/filter.lo
ext/filter/sanitizing_filters.lo ext/filter/logical_filters.lo
ext/filter/callback_filter.lo ext/hash/hash.lo ext/hash/hash_md.lo
ext/hash/hash_sha.lo ext/hash/hash_ripemd.lo ext/hash/hash_haval.lo
ext/hash/hash_tiger.lo ext/hash/hash_gost.lo ext/hash/hash_snefru.lo
ext/hash/hash_whirlpool.lo ext/hash/hash_adler32.lo
ext/hash/hash_crc32.lo ext/iconv/iconv.lo ext/json/json.lo
ext/json/utf8_to_utf16.lo ext/json/utf8_decode.lo
ext/json/JSON_parser.lo ext/pdo/pdo.lo ext/pdo/pdo_dbh.lo
ext/pdo/pdo_stmt.lo ext/pdo/pdo_sql_parser.lo ext/pdo/pdo_sqlstate.lo
ext/pdo_sqlite/pdo_sqlite.lo ext/pdo_sqlite/sqlite_driver.lo
ext/pdo_sqlite/sqlite_statement.lo ext/pdo_sqlite/sqlite/src/attach.lo
ext/pdo_sqlite/sqlite/src/auth.lo ext/pdo_sqlite/sqlite/src/btree.lo
ext/pdo_sqlite/sqlite/src/build.lo ext/pdo_sqlite/sqlite/src/callback.lo
ext/pdo_sqlite/sqlite/src/date.lo ext/pdo_sqlite/sqlite/src/delete.lo
ext/pdo_sqlite/sqlite/src/expr.lo ext/pdo_sqlite/sqlite/src/func.lo
ext/pdo_sqlite/sqlite/src/hash.lo ext/pdo_sqlite/sqlite/src/insert.lo
ext/pdo_sqlite/sqlite/src/legacy.lo ext/pdo_sqlite/sqlite/src/main.lo
ext/pdo_sqlite/sqlite/src/os_unix.lo ext/pdo_sqlite/sqlite/src/os_win.lo
ext/pdo_sqlite/sqlite/src/os.lo ext/pdo_sqlite/sqlite/src/pager.lo
ext/pdo_sqlite/sqlite/src/pragma.lo ext/pdo_sqlite/sqlite/src/prepare.lo
ext/pdo_sqlite/sqlite/src/printf.lo ext/pdo_sqlite/sqlite/src/random.lo
ext/pdo_sqlite/sqlite/src/select.lo ext/pdo_sqlite/sqlite/src/table.lo
ext/pdo_sqlite/sqlite/src/tokenize.lo
ext/pdo_sqlite/sqlite/src/analyze.lo
ext/pdo_sqlite/sqlite/src/complete.lo
ext/pdo_sqlite/sqlite/src/trigger.lo ext/pdo_sqlite/sqlite/src/update.lo
ext/pdo_sqlite/sqlite/src/utf.lo ext/pdo_sqlite/sqlite/src/util.lo
ext/pdo_sqlite/sqlite/src/vacuum.lo ext/pdo_sqlite/sqlite/src/vdbeapi.lo
ext/pdo_sqlite/sqlite/src/vdbeaux.lo ext/pdo_sqlite/sqlite/src/vdbe.lo
ext/pdo_sqlite/sqlite/src/vdbemem.lo ext/pdo_sqlite/sqlite/src/where.lo
ext/pdo_sqlite/sqlite/src/parse.lo ext/pdo_sqlite/sqlite/src/opcodes.lo
ext/pdo_sqlite/sqlite/src/alter.lo ext/pdo_sqlite/sqlite/src/vdbefifo.lo
ext/pdo_sqlite/sqlite/src/vtab.lo ext/pdo_sqlite/sqlite/src/loadext.lo
ext/posix/posix.lo ext/reflection/php_reflection.lo
ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo
ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/spl/php_spl.lo
ext/spl/spl_functions.lo ext/spl/spl_engine.lo 

#47772 [Opn-Csd]: filter_var() returnes nothing for some invalid e-mails

2009-03-25 Thread iliaa
 ID:   47772
 Updated by:   il...@php.net
 Reported By:  saschagros at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Filter related
 Operating System: Ubuntu 9.04 Jaunty
 PHP Version:  5.3.0RC1
 New Comment:

This bug has been fixed in CVS.

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

Your 1st e-mail is valid, in fact many local domains on intranets 
would not have a domain extension. f...@bar is perfectly valid.

The allowance for f...@bar. is a bug and a fix for it has just been 
applied.


Previous Comments:


[2009-03-25 13:31:58] saschagros at gmail dot com

Description:

filter_var incorrectly validates some invalid e-mail adresses (see
reproduce code).

Note: I am not 100% sure that this is the wrong behavior, however, it
has changed from php 5.2 and I can't find a related bug or NEWS entry.

Reproduce code:
---
var_dump(filter_var('inva...@site', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('inva...@site.', FILTER_VALIDATE_EMAIL));

Expected result:

bool(false)
bool(false)

Actual result:
--
string(13) inva...@site.
string(12) inva...@site





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



#47766 [Opn]: php-cgi.exe crashes

2009-03-25 Thread ipseno at yahoo dot com
 ID:   47766
 User updated by:  ipseno at yahoo dot com
 Reported By:  ipseno at yahoo dot com
 Status:   Open
 Bug Type: CGI related
 Operating System: Win XP SP3
 PHP Version:  5.3CVS-2009-03-24 (snap)
 New Comment:

Thread 0 - System ID 1888Entry point  php_cgi+61ea
Create time   25.3.2009 23:08:05
Time spent in user mode   0 Days 0:0:0.46
Time spent in kernel mode 0 Days 0:0:0.78



FunctionArg 1   Arg 2   Arg 3 Source
php5!lex_scan+2c06  00c0c8e40001002f  
php5!zend_register_auto_global+7f      
  



PHP5!LEX_SCAN+2C06WARNING - DebugDiag was not able to locate debug
symbols for php5.dll, so the information below may be incomplete.

In
php-cgi__PID__2540__Date__03_25_2009__Time_11_08_11PM__531__Second_Chance_Exception_C005.dmp
the assembly instruction at php5!lex_scan+2c06 in D:\Program
Files\php\php5.dll from The PHP Group has caused an access violation
exception (0xC005) when trying to read from memory location
0x02461000 on thread 0Module Information
Image Name: D:\Program Files\php\php5.dll Symbol Type:  Export
Base address:   0x1000Time Stamp:   Tue Mar 24 15:58:10 2009 
Checksum:   0x0055c816Comments: 
COM DLL:False Company Name: The PHP Group
ISAPIExtension: False File Description: PHP Script Interpreter
ISAPIFilter:False File Version: 5.3.0RC2-dev
Managed DLL:False Internal Name:PHP Script Interpreter
VB DLL: False Legal Copyright:  Copyright © 1997-2008 The PHP Group
Loaded Image Name:  php5.dll  Legal Trademarks: PHP
Mapped Image Name:Original filename:php5.dll
Module name:php5  Private Build:
Single Threaded:False Product Name: PHP
Module Size:5,45 MBytes   Product Version:  5.3.0RC2-dev
Symbol File Name:   php5.dll  Special Build:


Previous Comments:


[2009-03-25 13:16:58] ipseno at yahoo dot com

Ok, I will make a backtrace then and post it here.
But until I do it, this is last what I found out:

Remember comment line:
// From DB

Well if I remove JUST one dot it becomes:
// From DB...
and NO crash occurs!!!

If I ADD just one dot it becomes:
// From DB.
and NO crash occurs!!!

What does it tell you, at a first glance?
I think, that it is, a specific number of string symbols, in .php file
that represent PHP(code) script itself, that brings core down



[2009-03-25 08:59:21] paj...@php.net

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

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

And how we suppose to know what you are doing then?

You can try to create a backtrace, maybe there is an obvious problem
which can be seen in it.





[2009-03-25 00:34:01] ipseno at yahoo dot com

Script has 145 lines of code and loads 5 custom classes and 3 extra
files.

What you propose is, as I've just found, most likely impossible.
Reason is that crash won't appear if I remove ANYTHING from script.

At one line I removed COMMENT!
// From DB

Which doesn't affect PHP's code in ANY way.
To my shock everythhing restored to normal.

Exactly this fact makes me unable to ISOLATE few lines of code for
crash reproduction.



[2009-03-24 23:58:25] paj...@php.net

Create the smallest possible script to reproduce the problem and post
it here.



[2009-03-24 23:42:33] ipseno at yahoo dot com

I..., m..., well.
Hm...!?

This script uses custom classes that I've built and needs to be
loaded.

Anyway... I've found out, that crash occurs in LAST line of code before
PHP's closing tag ?


new face($cont);


There are 2 ways od avoiding crash.
a) By commenting out // new face($cont);
b) By making string $cont supplied to class face shorter then 2232
letters

I can not just post / give you all code, as this script is being built
for financial biz. So it is a secret.

Crash occurs inside object of 'face' class.

What do you propose?



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

#47778 [NEW]: parse_ini_file can't define array with name on

2009-03-25 Thread fabien dot meynard at supinfo dot com
From: fabien dot meynard at supinfo dot com
Operating system: mac os x
PHP version:  5.2.9
PHP Bug Type: Unknown/Other Function
Bug description:  parse_ini_file can't define array with name on

Description:

When we use parse_ini_file function, we can't define a array with name
on

But we can't find any reference of an reserver-keyword on in
documentation

Reproduce code:
---
myArray[] = php is good
myArray[] = asp is not good

on[] = linux
on[] = macos X


print_r(parse_ini_file('file.ini'));

Expected result:

array(
  [myArray] = Array
(
  [0] = php is good
  [1] = asp is not good
)
   [on] = Array
(
  [0] = linux
  [1] = macos X
)
)

Actual result:
--
Warning: Error parsing file.ini on line 41 in index.php on line 2

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



#47779 [NEW]: Wrong value for SIG_UNBLOCK and SIG_SETMASK constants

2009-03-25 Thread mbecc...@php.net
From: mbecc...@php.net
Operating system: *
PHP version:  5.3CVS-2009-03-25 (CVS)
PHP Bug Type: PCNTL related
Bug description:  Wrong value for SIG_UNBLOCK and SIG_SETMASK constants

Description:

While chking pcntl.c because of build errors on FreeBSD 6 and test
failures on NetBSD 4, I spotted that SIG_UNBLOCK and SIG_SETMASK both have
the same value as SIG_BLOCK.

Patch w/ test available here:

http://www.beccati.com/misc/php/pcntl_sig_constants_HEAD.diff

My karma prevents me from committing directly.

Reproduce code:
---
var_dump(SIG_BLOCK);
var_dump(SIG_UNBLOCK);
var_dump(SIG_SETMASK);

Expected result:

int(0)
int(1)
int(2)

Actual result:
--
int(0)
int(0)
int(0)

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



#47780 [NEW]: [FR] dns_get_record: possibility to specify nameserver that should be queried

2009-03-25 Thread valli at icsurselva dot ch
From: valli at icsurselva dot ch
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Network related
Bug description:  [FR] dns_get_record: possibility to specify nameserver that 
should be queried

Description:

Feature request for the dns_get_record function:

It would be nice to specify an array of nameserver
IP addresses that should be queried.

Like in PEAR::Net_DNS (Net_DNS_Resolver::query()).
See $nameservers array in:
http://pear.php.net/manual/en/package.networking.net-dns.net-dns-resolver.query.php

Only with this feature would it be possible to
implement something like this.
http://centralops.net/asp/co/NsLookup.vbs.asp
(Of course it would be possible with PEAR::Net_DNS)

Reproduce code:
---
n/a

Expected result:

n/a

Actual result:
--
n/a

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



#47435 [NoF-Opn]: FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE don't work with ipv6

2009-03-25 Thread valli at icsurselva dot ch
 ID:   47435
 User updated by:  valli at icsurselva dot ch
 Reported By:  valli at icsurselva dot ch
-Status:   No Feedback
+Status:   Open
 Bug Type: Filter related
 Operating System: linux
 PHP Version:  5.*, 6CVS (2009-02-18)
 New Comment:

... just changing the status to re-open


Previous Comments:


[2009-03-11 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-03-03 06:42:20] valli at icsurselva dot ch

Yes, fc00::/7 is the one and only IPv6 private range.
But there are also a lot of reserved ranges.

FILTER_FLAG_NO_PRIV_RANGE (IP not from private ranges)
fc00::/7   // unique-local addresses (rfc4193)

FILTER_FLAG_NO_RES_RANGE (IP not from reserved ranges)
::/128 // unspecified address (rfc4291)
::1/128// loopback address (rfc4291)
fe80::/10  // link local unicast (rfc4291)
2001:db8::/32  // documentation addresses (rfc3849)
5f00::/8   // 6Bone
3ffe::/16  // 6Bone
:::0:0/96  // IPv4-Mapped addresses (rfc4291)
2001:10::/28   // ORCHID addresses (rfc4843)
::/0   // default unicast route address

FYI the following ranges are implemented for IPv4 in logical_filters.c
FILTER_FLAG_NO_PRIV_RANGE (IP not from private ranges)
10.0.0.0/8 // private use network (rfc1918)
172.16.0.0/12  // private use network (rfc1918)
192.168.0.0/16 // private use network (rfc1918)

FILTER_FLAG_NO_RES_RANGE (IP not from reserved ranges)
0.0.0.0/8  // this network (rfc1700)
169.254.0.0/16 // link local network (rfc3927)
192.0.2.0/24   // test net (rfc3330)
224.0.0.0/4// Multicast (rfc3171)
240.0.0.0/4// Reserved for Future Use (rfc1700)



[2009-03-03 01:20:16] il...@php.net

According to the RFC I saw, the indicated ranges are the only ones 
identified as private.



[2009-02-26 11:17:20] valli at icsurselva dot ch

Sorry,
I've checked the wrong file when I wrote the last comment.
Now I've seen your fixes. But there are a lot more
ranges to check (not only fc00::/7)
At least the following IPv6 ranges should match when
FILTER_FLAG_NO_RES_RANGE is set (rfc5156):
::/128 // unspecified address (rfc4291)
fe80::/10  // link local unicast (rfc4291)
2001:db8::/32  // documentation addresses (rfc3849)
5f00::/8   // 6Bone
3ffe::/16  // 6Bone



[2009-02-24 07:55:51] valli at icsurselva dot ch

Can't find any code in the snapshots
regarding this issue.
Will this be fixed in php-5.3?



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

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



#47780 [Opn-Asn]: [FR] dns_get_record: possibility to specify nameserver that should be queried

2009-03-25 Thread pajoye
 ID:   47780
 Updated by:   paj...@php.net
 Reported By:  valli at icsurselva dot ch
-Status:   Open
+Status:   Assigned
 Bug Type: Network related
 Operating System: Linux
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

I was about to enable this feature on windows but it would have
introduced some portability issues again. But I think it would be
useful.

I have a patch for windows to allow that, porting it to the other
platforms. 


Previous Comments:


[2009-03-25 22:34:17] valli at icsurselva dot ch

Description:

Feature request for the dns_get_record function:

It would be nice to specify an array of nameserver
IP addresses that should be queried.

Like in PEAR::Net_DNS (Net_DNS_Resolver::query()).
See $nameservers array in:
http://pear.php.net/manual/en/package.networking.net-dns.net-dns-resolver.query.php

Only with this feature would it be possible to
implement something like this.
http://centralops.net/asp/co/NsLookup.vbs.asp
(Of course it would be possible with PEAR::Net_DNS)

Reproduce code:
---
n/a

Expected result:

n/a

Actual result:
--
n/a





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




#47781 [NEW]: __toString() problem with an integer return

2009-03-25 Thread fabien dot meynard at supinfo dot com
From: fabien dot meynard at supinfo dot com
Operating system: macos x
PHP version:  5.2.9
PHP Bug Type: Class/Object related
Bug description:  __toString() problem with an integer return

Description:

When we want to use __toString() method for an object we can't return a
integer, that's a problem for example if we have a class named Zip and
__toString() method have to return zipcode.

I my example, seconde class represent the fix in php : we have to force
implicit conversion from integer to string

Reproduce code:
---
?php 
Class Zip
{
  protected $zipcode = 33000;

  public function __toString() 
  {
return $this-zipcode;
  }
}

$zip = new Zip();
echo  'Zip : ' .$zip;
?

// and now the fix
Class Zip2
{
  protected $zipcode = 33000;
  
  public function __toString()
  {
return (string) $this-zipcode;
  }
}
 


Expected result:

Zip : 33000

Actual result:
--
Catchable fatal error: Method Zip::__toString() must return a string value
in /Users/fabienmeynard/- on line 13


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



#47781 [Opn-Bgs]: __toString() problem with an integer return

2009-03-25 Thread felipe
 ID:   47781
 Updated by:   fel...@php.net
 Reported By:  fabien dot meynard at supinfo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: macos x
 PHP Version:  5.2.9
 New Comment:

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




Previous Comments:


[2009-03-25 22:42:08] fabien dot meynard at supinfo dot com

Description:

When we want to use __toString() method for an object we can't return a
integer, that's a problem for example if we have a class named Zip and
__toString() method have to return zipcode.

I my example, seconde class represent the fix in php : we have to force
implicit conversion from integer to string

Reproduce code:
---
?php 
Class Zip
{
  protected $zipcode = 33000;

  public function __toString() 
  {
return $this-zipcode;
  }
}

$zip = new Zip();
echo  'Zip : ' .$zip;
?

// and now the fix
Class Zip2
{
  protected $zipcode = 33000;
  
  public function __toString()
  {
return (string) $this-zipcode;
  }
}
 


Expected result:

Zip : 33000

Actual result:
--
Catchable fatal error: Method Zip::__toString() must return a string
value in /Users/fabienmeynard/- on line 13






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



#47779 [Opn-Csd]: Wrong value for SIG_UNBLOCK and SIG_SETMASK constants

2009-03-25 Thread felipe
 ID:   47779
 Updated by:   fel...@php.net
 Reported By:  mbecc...@php.net
-Status:   Open
+Status:   Closed
 Bug Type: PCNTL related
 Operating System: *
 PHP Version:  5.3CVS-2009-03-25 (CVS)
 New Comment:

This bug has been fixed in CVS.

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

Fixed in 5.3 and HEAD. Thanks.


Previous Comments:


[2009-03-25 22:32:23] mbecc...@php.net

Description:

While chking pcntl.c because of build errors on FreeBSD 6 and test
failures on NetBSD 4, I spotted that SIG_UNBLOCK and SIG_SETMASK both
have the same value as SIG_BLOCK.

Patch w/ test available here:

http://www.beccati.com/misc/php/pcntl_sig_constants_HEAD.diff

My karma prevents me from committing directly.

Reproduce code:
---
var_dump(SIG_BLOCK);
var_dump(SIG_UNBLOCK);
var_dump(SIG_SETMASK);

Expected result:

int(0)
int(1)
int(2)

Actual result:
--
int(0)
int(0)
int(0)





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



#47781 [Bgs]: __toString() problem with an integer return

2009-03-25 Thread fabien dot meynard at supinfo dot com
 ID:   47781
 User updated by:  fabien dot meynard at supinfo dot com
 Reported By:  fabien dot meynard at supinfo dot com
 Status:   Bogus
 Bug Type: Class/Object related
 Operating System: macos x
 PHP Version:  5.2.9
 New Comment:

I'm sorry but in documentation of __toString() we can't find any word
about the non-implicit conversion from integer to string.

http://fr.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring


Previous Comments:


[2009-03-25 22:46:29] fel...@php.net

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





[2009-03-25 22:42:08] fabien dot meynard at supinfo dot com

Description:

When we want to use __toString() method for an object we can't return a
integer, that's a problem for example if we have a class named Zip and
__toString() method have to return zipcode.

I my example, seconde class represent the fix in php : we have to force
implicit conversion from integer to string

Reproduce code:
---
?php 
Class Zip
{
  protected $zipcode = 33000;

  public function __toString() 
  {
return $this-zipcode;
  }
}

$zip = new Zip();
echo  'Zip : ' .$zip;
?

// and now the fix
Class Zip2
{
  protected $zipcode = 33000;
  
  public function __toString()
  {
return (string) $this-zipcode;
  }
}
 


Expected result:

Zip : 33000

Actual result:
--
Catchable fatal error: Method Zip::__toString() must return a string
value in /Users/fabienmeynard/- on line 13






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



#47770 [Com]: pdo::query() segmentation fault

2009-03-25 Thread sunhwanj at gmail dot com
 ID:   47770
 Comment by:   sunhwanj at gmail dot com
 Reported By:  shj at xenosi dot de
 Status:   Open
 Bug Type: PDO related
 Operating System: Gentoo Linux 64bit
 PHP Version:  5.2.9
 New Comment:

I wasn't able to reproduce the error either in the following systems:

mac os x 10.5.6, php 5.2.6
linux 2.6.18, php 5.1.6


Previous Comments:


[2009-03-25 12:39:46] shj at xenosi dot de

like this?

Starting program: /usr/bin/php /down/test.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type return to continue, or q return to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
(no debugging symbols found)
Cannot find new threads: generic error
(gdb) 
(gdb) bt
#0  0x7f34747b755a in ?? () from /lib64/ld-linux-x86-64.so.2
#1  0x7f34747b2856 in ?? () from /lib64/ld-linux-x86-64.so.2
#2  0x7f34747b6d7b in ?? () from /lib64/ld-linux-x86-64.so.2
#3  0x7f3472ed4f9b in ?? () from /lib/libdl.so.2
#4  0x7f34747b2856 in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x7f3472ed530c in ?? () from /lib/libdl.so.2
#6  0x7f3472ed4f01 in dlopen () from /lib/libdl.so.2
#7  0x00524907 in php_dl ()
#8  0x0058dd83 in ?? ()
#9  0x005c038e in zend_llist_apply ()
#10 0x0058dd4a in php_ini_register_extensions ()
#11 0x00587d06 in php_module_startup ()
#12 0x0063e0fd in ?? ()
#13 0x0063e8d2 in main ()



[2009-03-25 10:21:06] ka...@php.net

I'm unable to reproduce this with your script if I replace:
$stmt = $this-class-query($this-query);
return new SHJPDOStatement($stmt);

with:
return new SHJPDOStatement($this-class-query($this-query));


I get no crash, anything in my server log, etc. using Windows 32bit,
can you generate a backtrace as described here:
http://bugs.php.net/bugs-generating-backtrace.php



[2009-03-25 07:12:07] shj at xenosi dot de

Description:

1. this is segmentation fault.
return new class($pdo-class-query($this-query));

2. this is ok.
$stmt = $pdo-class-query($this-query);
return new class($stmt);


Reproduce code:
---
http://codepad.org/wJ5O5TvG
this is bug example.
run this code on your machine.

thank you.






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



#47782 [NEW]: Anomalous results from stored procedure with a PREPAREd statement

2009-03-25 Thread phpbug at smithii dot com
From: phpbug at smithii dot com
Operating system: Windows XP SP3  Debian 4.0
PHP version:  5.2.9
PHP Bug Type: MySQLi related
Bug description:  Anomalous results from stored procedure with a PREPAREd 
statement

Description:

Using MySQL 5.0.77, and calling a stored procedure with a PREPAREd
statement, execute()/bind_result()/fetch() return anomalous results.


Reproduce code:
---
Using MySQL 5.0.77, and calling any stored procedure with a PREPAREd
statement, such as:

DROP PROCEDURE IF EXISTS echo;
DELIMITER //
CREATE PROCEDURE echo(p VARCHAR(255))
BEGIN
SET @sql = CONCAT('SELECT ',QUOTE(p));
PREPARE stmt FROM @sql;
EXECUTE stmt;
DROP PREPARE stmt;
END;
//
DELIMITER ;

via this script:

?php
$mysqli = new mysqli('localhost', 'root', '', 'test');
$sql = 'CALL echo(?)';
$s = $mysqli-prepare($sql);
$i = $argv[1];
printf(i=%s\n, $i);
$s-bind_param('s', $i);
$s-execute();
$s-bind_result($o);
while ($s-fetch()) {
   printf(o=%s (%s)\n, $o, bin2hex($o));
}
$s-close();

produces anomalous results at least 50% of the time. For example:

$ php echo.php abcd
i=abcd
o=cd  ♦ (636404)

If I remove the PREPAREd statement:

DROP PROCEDURE IF EXISTS echo;
DELIMITER //
CREATE PROCEDURE echo(p VARCHAR(255))
BEGIN
SELECT p;
END;
//
DELIMITER ;

everything works fine.

Replacing execute()/bind_result()/fetch(), with query()/fetch_assoc() also
fixes the issue.

Other details:

mysqli_get_client_info=5.0.51a
mysqli_get_client_version=50051
mysqli_get_server_info=5.0.77-community-nt
mysqli_get_server_version=50077
mysqli_get_host_info=localhost via TCP/IP
mysqli_get_proto_info=10


Expected result:

$ php echo.php abcd
i=abcd
o=abcd (63646566)


Actual result:
--
$ php echo.php abcd
i=abcd
o=cd  ♦ (636404)

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



#47365 [Com]: ip2long: 32bis vs. 64bit!

2009-03-25 Thread pada at hrz dot tu-chemnitz dot de
 ID:   47365
 Comment by:   pada at hrz dot tu-chemnitz dot de
 Reported By:  flobee at gmail dot com
 Status:   No Feedback
 Bug Type: *Network Functions
 Operating System: SunOS
 PHP Version:  5.2.9RC1
 New Comment:

Hi,

I can confirm the bug on Solaris (not OpenSolaris) Version 10 x86_64

# isainfo -b
64
# uname -srvmpi
SunOS 5.10 Generic_118855-33 i86pc i386 i86pc

# Results with unpatched 64 Bit PHP 5.2.8:

# php5 -r var_dump(ip2long('example.com'));
int(4294967295) # WRONG, should be bool(false), this is not a valid IP
# php5 -r var_dump(ip2long(\1\x00x\));
int(1) # correct?
# php5 -r var_dump(ip2long('0.1'));
int(1) # correct?
# php5 -r var_dump(ip2long(''));
bool(false) # correct
# php5 -r var_dump(ip2long('0.0.0.0'));
int(0) # correct
# php5 -r var_dump(ip2long('0.0.0.1'));
int(1) # correct
# php5 -r var_dump(ip2long('1.2.3.4'));
int(16909060) # correct
# php5 -r var_dump(ip2long('4.3.2.1'));
int(67305985) # correct
# php5 -r var_dump(ip2long('255.255.255.254'));
int(4294967294) # correct
# php5 -r var_dump(ip2long('255.255.255.255'));
int(4294967295) # correct

There is a problem in PHP function ip2long() with the comparison with
INADDR_NONE on 64 bit Solaris systems, since the return value of
function inet_addr is stored in an unsigned long int variable while
struct inet_addr is only 32 bit wide.  The RETURN_FALSE branch will
never be reached when a string like example.com is supplied, since the
comparison of ip and INADDR_NONE evaluates to false (it should be true
in case of error).

# Patch worked as expected on Debian GNU/Linux squeeze x86_64 with PHP
5.2.6:

# php5 -r var_dump(ip2long('example.com'));
bool(false) # correct
# php5 -r var_dump(ip2long(\1\x00x\));
int(1) # correct?
# php5 -r var_dump(ip2long('0.1'));
int(1) # correct?
# php5 -r var_dump(ip2long(''));
bool(false) # correct
# php5 -r var_dump(ip2long('0.0.0.0'));
int(0) # correct
# php5 -r var_dump(ip2long('0.0.0.1'));
int(1) # correct
# php5 -r var_dump(ip2long('1.2.3.4'));
int(16909060) # correct
# php5 -r var_dump(ip2long('4.3.2.1'));
int(67305985) # correct
# php5 -r var_dump(ip2long('255.255.255.254'));
int(4294967294) # correct
# php5 -r var_dump(ip2long('255.255.255.255'));
int(4294967295) # correct

I propose the following patch to simplify the code and fix the problem
at the same time.  Will this code work on all platforms (Linux, Solaris,
BSD, Windows, etc.)?  Your hints and suggestions are welcome.

 start of patch 
diff -ru php-5.2.9.orig/ext/standard/basic_functions.c
php-5.2.9/ext/standard/basic_functions.c
--- php-5.2.9.orig/ext/standard/basic_functions.c 2008-12-31
12:17:44.0 +0100
+++ php-5.2.9/ext/standard/basic_functions.c  2009-03-25
19:00:15.0 +0100
@@ -97,10 +97,6 @@
 # include win32/unistd.h
 #endif

-#ifndef INADDR_NONE
-#define INADDR_NONE ((unsigned long int) -1)
-#endif
-
 #include zend_globals.h
 #include php_globals.h
 #include SAPI.h
@@ -4336,7 +4332,7 @@
 PHP_FUNCTION(ip2long)
 {
  zval **str;
- unsigned long int ip;
+ struct in_addr addr;

  if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, str) ==
FAILURE) {
WRONG_PARAM_COUNT;
@@ -4344,20 +4340,11 @@

  convert_to_string_ex(str);

- if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) ==
INADDR_NONE) {
-   /* the only special case when we should return -1 ourselves,
-* because inet_addr() considers it wrong. We return 0x
and
-* not -1 or ~0 because of 32/64bit issues.
-*/
-   if (Z_STRLEN_PP(str) == sizeof(255.255.255.255) - 1 
- !memcmp(Z_STRVAL_PP(str), 255.255.255.255,
sizeof(255.255.255.255) - 1)) {
- RETURN_LONG(0x);
-   }
-
-   RETURN_FALSE;
- }
+  if (Z_STRLEN_PP(str) == 0 || inet_pton(AF_INET, Z_STRVAL_PP(str),
addr) != 1) {
+RETURN_FALSE;
+  }

- RETURN_LONG(ntohl(ip));
+ RETURN_LONG(ntohl(addr.s_addr));
 }
 /* }}} */

 end of patch 

Kind regards,
Daniel


Previous Comments:


[2009-02-20 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-02-12 13:09:49] d...@php.net

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

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

Thank you for your interest in PHP.


Which Solaris Version. Solaris 10. On Sparc or on x86?

On OpenSolaris x86 64 bit it returns false as expected:

~/ php -r var_dump(ip2long('web.de'));  
   
bool(false)
~/ isainfo -b   

#47777 [Opn-Csd]: Can't compile the pcntl extension

2009-03-25 Thread lbarnaud
 ID:   4
 Updated by:   lbarn...@php.net
 Reported By:  matteo at beccati dot com
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: FreeBSD 6.2
 PHP Version:  5.3CVS-2009-03-25 (CVS)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-03-25 16:37:51] matteo at beccati dot com

Description:

Looks like PHP_5_3 doesn't compile on my FreeBSD 6.2 system if the
pcntl extension is enabled.

Reproduce code:
---
./configure --disable-cgi --enable-pcntl
make

Expected result:

No error :)

Actual result:
--
/usr/local/bin/bash /root/compile/php-5.3/libtool --silent
--preserve-dup-deps --mode=compile cc  -Iext/pcntl/
-I/root/compile/php-5.3/ext/pcntl/ -DPHP_ATOM_INC
-I/root/compile/php-5.3/include -I/root/compile/php-5.3/main
-I/root/compile/php-5.3 -I/root/compile/php-5.3/ext/ereg/regex
-I/usr/local/include/libxml2 -I/usr/local/include
-I/root/compile/php-5.3/ext/date/lib
-I/root/compile/php-5.3/ext/sqlite3/libsqlite
-I/root/compile/php-5.3/TSRM -I/root/compile/php-5.3/Zend   
-I/usr/local/include -g -O2  -c /root/compile/php-5.3/ext/pcntl/pcntl.c
-o ext/pcntl/pcntl.lo
/root/compile/php-5.3/ext/pcntl/pcntl.c: In function
`php_register_signal_constants':
/root/compile/php-5.3/ext/pcntl/pcntl.c:293: error: `CLD_EXITED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:293: error: (Each undeclared
identifier is reported only once
/root/compile/php-5.3/ext/pcntl/pcntl.c:293: error: for each function
it appears in.)
/root/compile/php-5.3/ext/pcntl/pcntl.c:294: error: `CLD_KILLED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:295: error: `CLD_DUMPED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:296: error: `CLD_TRAPPED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:297: error: `CLD_STOPPED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:298: error: `CLD_CONTINUED'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:301: error: `TRAP_BRKPT'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:302: error: `TRAP_TRACE'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:305: error: `POLL_IN'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:306: error: `POLL_OUT'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:307: error: `POLL_MSG'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:308: error: `POLL_ERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:309: error: `POLL_PRI'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:310: error: `POLL_HUP'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:312: error: `ILL_ILLOPC'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:313: error: `ILL_ILLOPN'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:314: error: `ILL_ILLADR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:315: error: `ILL_ILLTRP'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:316: error: `ILL_PRVOPC'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:317: error: `ILL_PRVREG'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:318: error: `ILL_COPROC'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:319: error: `ILL_BADSTK'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:330: error: `SEGV_MAPERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:331: error: `SEGV_ACCERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:333: error: `BUS_ADRALN'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:334: error: `BUS_ADRERR'
undeclared (first use in this function)
/root/compile/php-5.3/ext/pcntl/pcntl.c:335: error: `BUS_OBJERR'
undeclared (first use in this function)
*** Error code 1






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



#47767 [Asn]: include_once does not resolve windows symlinks or junctions

2009-03-25 Thread lukemoynihan at gmail dot com
 ID:   47767
 User updated by:  lukemoynihan at gmail dot com
 Reported By:  lukemoynihan at gmail dot com
 Status:   Assigned
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows Vista
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

Ok, I can understand not wanting to support Junctions, It would be 
fantastic to support symlinks though - this is bound to come up more 
as people on windows learn to use links, if you need any testing done 
for this let me know.


Previous Comments:


[2009-03-25 11:13:31] paj...@php.net

Ok, will see what can be done for symlink. I'm not sure 2k/xp are worst
a hack, but 2k8/vista/win7 have real symlinks support.



[2009-03-25 10:51:01] andrew at mcgl dot co dot nz

Have the same problem on V5.2.8 running on windows XP



[2009-03-25 02:15:55] lukemoynihan at gmail dot com

FYI: I've tested this on Windows XP, Vista to get the results for 
windows, and Centos 5 for linux results



[2009-03-25 02:09:11] lukemoynihan at gmail dot com

I can confirm this is a problem using 
http://windows.php.net/downloads/snaps/php-5.3-nts-win32-VC9-x86-
latest.zip  that i downloaded now. 

The problem occurs when the symlink (typically used by Vista/Server 
2008) is a folder or a file, or a folder junction (Used by WinXP/2K) 
is used.



[2009-03-24 22:55:59] paj...@php.net

Please try using this CVS 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/47767

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



#47783 [NEW]: Error messages often don't make sense.

2009-03-25 Thread nairbv at yahoo dot com
From: nairbv at yahoo dot com
Operating system: 
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  Error messages often don't make sense.

Description:

Error messages often don't make sense.  for example:

Catchable fatal error:  Argument 1 passed to my_function() must be an
instance of string, string given

I'd comment on this bug:
http://bugs.php.net/bug.php?id=42118

But this reporting system doesn't permit commenting on existing bugs.

The bug is NOT bogus.  The error message IS non-sense.  It's fine if
you're not going to support primitive type hinting, but the message should
say something to that effect.

Also the error is NOT catchable.  See bug:
http://bugs.php.net/bug.php?id=41948

Again, I'd comment on that bug, but I can't comment on existing bugs.

If the error can only be handled by setting an error handler, and not
caught with a catch block, the error message should say RECOVERABLE
error or handleable or something to that effect, not catchable error.

Other bad error messages include:
Can't use method return value in write context
see bug: http://bugs.php.net/bug.php?id=44565

write context is meaningless to the programmer.

On that bug, the reporter commented that the message is not helpful.  Why
was the bug closed instead of fixing the error message??



Reproduce code:
---
for the first error message:
function my_function(string $str) {}
bar('');

for the second error message:
empty($foo-getValue());

or also the code in bug #44565.



Expected result:

error messages that help the programmer.  

for the catchable error regarding type hinting:
Either something like: 
Recoverable fatal error: reference to undefined class 'string' on line
[line of type hint] or:
Recoverable fatal error:  Argument 1 passed to my_function() must be an
instance of class string, primitive string given.

For the empty($foo-getbar());write context message:
It should probably say something like cannot use method return value when
calling internal language constructs ... or something like that.

For the write context message referenced in bug 44565:
it should give the 'call-time pass-by-reference is deprecated when you
use  in foo($a);' like the documentation
(http://docs.php.net/manual/en/language.references.pass.php) says it will.


Actual result:
--
Useless (and sometimes amusing) error messages like must be an instance
of string, string given or the write context message which as far as I
know is in reference to some implementation detail internal to php.


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



#47784 [NEW]: PHP 5.3.0 RC1 NTS Installers return 2711 error

2009-03-25 Thread peaceable_whale at hotmail dot com
From: peaceable_whale at hotmail dot com
Operating system: Windows Vista
PHP version:  5.3.0RC1
PHP Bug Type: Windows Installer
Bug description:  PHP 5.3.0 RC1 NTS Installers return 2711 error

Description:

PHP 5.3.0 RC1 NTS Installers (both VC9 and VC6) return 2711 error after
selecting Other CGI.

Reproduce code:
---
Run the installers and select Other CGI to proceed

Expected result:

The setup continues

Actual result:
--
Error 2711 is returned

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



#47785 [NEW]: get_included_files resolves symlinks

2009-03-25 Thread andre at webkr dot de
From: andre at webkr dot de
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  get_included_files resolves symlinks

Description:

When a symlink is included/required, get_included_files shows the target
of the symlink. Together with Bug #46260 this makes it completely
impossible to determine how the file was really called when it was
included.

Reproduce code:
---
include('path_to/a_symlink.php');
var_dump(get_included_files());

Expected result:

An array containing a string [...]/path_to/a_symlink.php.

Actual result:
--
An array containing a string [...]/some_file.php.

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



#46767 [Asn]: FastCGI Error is returned when connecting to a MySQL server with PHP 5.3 RC1

2009-03-25 Thread peaceable_whale at hotmail dot com
 ID:   46767
 User updated by:  peaceable_whale at hotmail dot com
-Summary:  FastCGI Error is returned when connecting to a MySQL
   server with PHP 5.3 Alpha3
 Reported By:  peaceable_whale at hotmail dot com
 Status:   Assigned
 Bug Type: MySQLi related
 Operating System: win32 only
-PHP Version:  5.3.0alpha3
+PHP Version:  5.3.0RC1
 Assigned To:  mysql
 New Comment:

The problem persists in RC1.


Previous Comments:


[2009-02-02 14:06:14] peaceable_whale at hotmail dot com

No. The error occurs once the script connects to a database.

Test case:

?php
$mysqli=new mysqli(HOST,USERNAME,PASSWORD);
$connection_closed=$mysqli-close();
echo $connection_closed?Database connection has been closed
successfully:An error occurred when closing database connection;
?



[2009-02-02 13:43:30] johan...@php.net

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Does a simple mysql_connect() or mysqli_connect() work? Do simple
queries work? Do other applications than phpMyAdmin work?



[2009-02-02 13:35:42] peaceable_whale at hotmail dot com

Thanks for changing it to Assigned :)



[2009-02-02 13:33:57] paj...@php.net

oh my bad, right.

So not related (it must be the 1st report in weeks not related to 5.1
=)

 assigned to mysql



[2009-02-02 13:32:22] peaceable_whale at hotmail dot com

Well, mysqlnd is in use as it is turned on by default in the Windows
builds:

mysqli

MysqlI Support  enabled
Client API library version  mysqlnd 5.0.5-dev - 081106 - $Revision:
1.3.2.21 $
Active Persistent Links 0
Inactive Persistent Links   0
Active Links0 

mysqlnd

mysqlnd enabled
Version mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.21 $
Command buffer size 2048
Read buffer size32768
Collecting statistics   Yes
Collecting memory statisticsNo



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

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