#42636 [NEW]: Problem - loading mysql database in dreamweaver mx:

2007-09-12 Thread tony at veederline dot com dot au
From: tony at veederline dot com dot au
Operating system: windows xp
PHP version:  5.2.4
PHP Bug Type: Dynamic loading
Bug description:  Problem - loading mysql database in dreamweaver mx:

Description:

I am using dream weaver 6.0 to build a dynamic web site with php and
mysql. I try connecting to an existing database, dreamweaver can't find it.
I even went to macromedia web site and found that this is a known problem.
I,ve triple, triple checked all parameters and still no solution. I get and
successfully test conection but no tables will load. 


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


#42637 [NEW]: SoapFault : Only http and https are allowed

2007-09-12 Thread christof at sanmax dot be
From: christof at sanmax dot be
Operating system: Linux
PHP version:  5.2.4
PHP Bug Type: SOAP related
Bug description:  SoapFault :  Only http and https are allowed

Description:

When sending a request with the SoapClient, a SoapFault is produced :

Fatal error: Uncaught SoapFault exception: [HTTP] Unknown protocol. Only
http and https are allowed.

The probleem seems to be located in the php_url_parse_ex function. In
version 5.1.6 it works fine, in 5.2.4 is does not. The php scheme is null
instead of http according to our tests.

Reproduce code:
---
$base = 'http://some soap service url/service.asmx?WSDL';
$soap = new SoapClient($base, array('trace' = 1));

$login = new StdClass;
$login-userName  = 'test';
$login-passWord  = 'test';
$login-languageCode = 'NL';

$loginResult = $soap-Login($login);


Expected result:

no soapfault. In php 5.1.6 it works fine, no exception is thrown.

Actual result:
--
Fatal error: Uncaught SoapFault exception: [HTTP] Unknown protocol. Only
http and https are allowed in /home/data/websites/www/phptest.php:10
Stack trace:
#0 [internal function]: SoapClient-__doRequest('?xml version=...',
'http://demobet5...', 'http://XServer', 1, 0)
#1 [internal function]: SoapClient-__call('Login', Array)
#2 /home/data/websites/www/phptest.php(10):
SoapClient-Login(Object(stdClass))
#3 {main}
  thrown in /home/data/websites/www/phptest.php on line 10


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


#42594 [Opn]: fopen doesn't work with ocfs2 cdsl (ocfs2 == Oracle Cluster Filesystem 2)

2007-09-12 Thread i dot dastolfo at smart dot it
 ID:   42594
 User updated by:  i dot dastolfo at smart dot it
 Reported By:  i dot dastolfo at smart dot it
 Status:   Open
 Bug Type: *Directory/Filesystem functions
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

Additional elements that could help in debugging:
CDSL link are special soft links.
Issuing a stat on this files you obtain this:

File: `test' - `.cluster/hostname/{hostname}/test'

Should it be that the php filesystem related functions misinterpret
this link, that should be followed by a syscall to the VFS?


Previous Comments:


[2007-09-07 22:28:33] i dot dastolfo at smart dot it

Description:

The fopen function (and maybe other filesystem related functions) can't
handle CDSL files/directories.
CDSL stands for context dependent symbolic link and it's a feature of
Oracle Cluster FileSystem 2 (OCFS2).
While fopen works fine with regular files and directory inside an OCFS2
 filesystem, gives failed to open stream: No such file or directory
for  CDSL files. 

Reproduce code:
---
make a OCFS2 filesystem (you can setup it even with 1 node).
Create a regular file (touch test)
Transform it in a cdsl file (ocfs2cdsl -t hostname -c test)
fopen(test,w); = Warning: fopen(test) [function.fopen]: failed to
open stream: No such file or directory in ...






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


#42638 [NEW]: Inconsistent behavior file_exists() is_file() functions

2007-09-12 Thread kraghuba at in dot ibm dot com
From: kraghuba at in dot ibm dot com
Operating system: Linux and varient
PHP version:  5CVS-2007-09-12 (snap)
PHP Bug Type: Filesystem function related
Bug description:  Inconsistent behavior file_exists()  is_file() functions 

Description:

Inconsistent behaviour of file_exists()  is_file() functions when given
filename end with a trailing slash

The functions: file_exists(), is_file() return inconsistent value on
different OS when given
filename/path end with a trailing slash (/). On RHEL 5 and Windows XP that
i have, it retuns false, which is expected. 

There have been some fixes done relating to this to get the consistent
behavior( match Windows with 
Linux behavior on handling on trailing slash, Defect #42027) but I have
noticed that on different platform( linux and varient ) 
the output differ. 

I think, this is something to do with the way realpath work on different
OS.

Following are the testcases that continue to fail because of this on few
linux and other Os but not on all(I have been watching the PHP-QA list and
seen these failures): 

  1) is_file_variation4.phpt
  2) rename_variation.phpt



Reproduce code:
---
?php
  fclose( fopen(test.tmp) );
  var_dump( is_file(test.tmp/) );
  var_dump( file_exists(test.tmp/) );
  unlink(test.tmp);
?



Expected result:

bool(false)
bool(false)


Actual result:
--
Actual output ( on some of Linux and other OS, excluding Windows ):
---
bool(true)
bool(true)

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


#42619 [Com]: Problem with prepared statement

2007-09-12 Thread uwendel at mysql dot com
 ID:   42619
 Comment by:   uwendel at mysql dot com
 Reported By:  lmanseau at claurendeau dot qc dot ca
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

Stupid me, ... no bug, of course - wrong API usage. 

Prepared Statements work with unbuffered result sets by default. PS
can't tell you how many rows there are in the result set before you
either have:

 - stored the result set / turned it into a buffered result set
 - fetched all data

You have neither called mysqli_stmt_store_result() nor fetched all
results before you call mysqli_stmt_num_rows(). Therefore,
mysqli_stmt_num_rows() returns 0, which is correct.

http://www.php.net/manual/en/function.mysqli-stmt-num-rows.php

Returns the number of rows in the result set. The use of
mysqli_stmt_num_rows()  depends on whether or not you used
mysqli_stmt_store_result() to buffer the entire result set in the
statement handle.

If you use mysqli_stmt_store_result(), mysqli_stmt_num_rows() may be
called immediately. 

See also
http://dev.mysql.com/doc/refman/5.1/en/mysql-stmt-num-rows.html


Previous Comments:


[2007-09-11 15:10:46] lmanseau at claurendeau dot qc dot ca

Here is the SQL definition:

CREATE TABLE test1 (
  c1 int(4) unsigned zerofill NOT NULL auto_increment,
  c2 varchar(10) default NULL,
  c3 double(4,2) default NULL,
  PRIMARY KEY  (c1)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

Code with problem:

// Opening connection
include ('../mysql/param.inc');
$db = new mysqli($hote, $util, $mpas, $base); 
if (!$db) {
echo No connection!;
exit();
}
echo 'Non Prepared Requestbr /';  //WORK WELL
$sql = select * from test1; 
$rqp = $db-query($sql); 
echo 'Rows = '.$rqp-num_rows.'br /';

echo 'br /Prepared Requestbr /'; //DON'T WORK
$sql = select * from ch9books; 
$rqp = $db-prepare($sql);
$rqp-execute();
echo 'Rows = '.$rqp-num_rows.'br /';

// Closing connection 
$db-close();


And the results...


Non Prepared Request
Rows = 6

Prepared Request
Rows = 0



[2007-09-11 08:52:29] uwendel at mysql dot com

Please provide a reproducible test case, including SQL definitions and
the other statements you mention, if they are needed for a minimum
test case.

Thanks!



[2007-09-10 20:50:48] lmanseau at claurendeau dot qc dot ca

Description:

I try to execute a prepared statement with mysqli. I use PHP 5.2.0 with
MySQL 5.0.27

After some tests, prepared statements with MySQL instructions  such as
(INSERT, DELETE and UPDATE) work very well.

The only case problem which I pointed out, it is the instruction SELECT
that does not seem to react of good manner

-   SELECT * FROM table1 – don’t work
-   SELECT C1, C2 FROM table1 - don’t work

I have no error message!!!

Reproduce code:
---
$db = new mysqli($hote, $util, $mpas, $base);  
if (!$db) { 
   echo No connection with BD; 
   exit(); 
} 

//WORK WELL 
echo 'Non prepared statementbr /'; 
$sql = select * from ch9books;  
$rqp = $db-query($sql);  
echo 'books = '.$rqp-num_rows.'br /'; 


//DON’T WORK
echo 'br /Prepared statementbr /'; 
$sql = select * from ch9books;  
$rqp = $db-prepare($sql); 
$rqp-execute(); 
echo 'books = '.$rqp-num_rows.'br /'; 

$rqp-close();


Expected result:

Non prepared statement
Books = 6 



Actual result:
--
Prepared statement 
Books = 0






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


#42639 [NEW]: include in if-expression problem

2007-09-12 Thread koraktor at web dot de
From: koraktor at web dot de
Operating system: Windows XP SP2
PHP version:  5.2.4
PHP Bug Type: Scripting Engine problem
Bug description:  include in if-expression problem

Description:

Included code in an if-expression is only available in the if-branch not
the if-expression itself.

Reproduce code:
---
if(file_exists(code_to_include.php)
 include(code_to_include.php)
 check_included_code())
{
  task();
}

Expected result:

Included code from code_to_include.php should be accessible in
check_included_code() and anything afterwards.

Actual result:
--
Included code from code_to_include.php is accessible in task(), but not
in check_included_code().

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


#42619 [Opn-Bgs]: Problem with prepared statement

2007-09-12 Thread uw
 ID:   42619
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lmanseau at claurendeau dot qc dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

Wrong usage of API, ext/mysqli acts as described in the manual


Previous Comments:


[2007-09-12 08:39:42] uwendel at mysql dot com

Stupid me, ... no bug, of course - wrong API usage. 

Prepared Statements work with unbuffered result sets by default. PS
can't tell you how many rows there are in the result set before you
either have:

 - stored the result set / turned it into a buffered result set
 - fetched all data

You have neither called mysqli_stmt_store_result() nor fetched all
results before you call mysqli_stmt_num_rows(). Therefore,
mysqli_stmt_num_rows() returns 0, which is correct.

http://www.php.net/manual/en/function.mysqli-stmt-num-rows.php

Returns the number of rows in the result set. The use of
mysqli_stmt_num_rows()  depends on whether or not you used
mysqli_stmt_store_result() to buffer the entire result set in the
statement handle.

If you use mysqli_stmt_store_result(), mysqli_stmt_num_rows() may be
called immediately. 

See also
http://dev.mysql.com/doc/refman/5.1/en/mysql-stmt-num-rows.html



[2007-09-11 15:10:46] lmanseau at claurendeau dot qc dot ca

Here is the SQL definition:

CREATE TABLE test1 (
  c1 int(4) unsigned zerofill NOT NULL auto_increment,
  c2 varchar(10) default NULL,
  c3 double(4,2) default NULL,
  PRIMARY KEY  (c1)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

Code with problem:

// Opening connection
include ('../mysql/param.inc');
$db = new mysqli($hote, $util, $mpas, $base); 
if (!$db) {
echo No connection!;
exit();
}
echo 'Non Prepared Requestbr /';  //WORK WELL
$sql = select * from test1; 
$rqp = $db-query($sql); 
echo 'Rows = '.$rqp-num_rows.'br /';

echo 'br /Prepared Requestbr /'; //DON'T WORK
$sql = select * from ch9books; 
$rqp = $db-prepare($sql);
$rqp-execute();
echo 'Rows = '.$rqp-num_rows.'br /';

// Closing connection 
$db-close();


And the results...


Non Prepared Request
Rows = 6

Prepared Request
Rows = 0



[2007-09-11 08:52:29] uwendel at mysql dot com

Please provide a reproducible test case, including SQL definitions and
the other statements you mention, if they are needed for a minimum
test case.

Thanks!



[2007-09-10 20:50:48] lmanseau at claurendeau dot qc dot ca

Description:

I try to execute a prepared statement with mysqli. I use PHP 5.2.0 with
MySQL 5.0.27

After some tests, prepared statements with MySQL instructions  such as
(INSERT, DELETE and UPDATE) work very well.

The only case problem which I pointed out, it is the instruction SELECT
that does not seem to react of good manner

-   SELECT * FROM table1 – don’t work
-   SELECT C1, C2 FROM table1 - don’t work

I have no error message!!!

Reproduce code:
---
$db = new mysqli($hote, $util, $mpas, $base);  
if (!$db) { 
   echo No connection with BD; 
   exit(); 
} 

//WORK WELL 
echo 'Non prepared statementbr /'; 
$sql = select * from ch9books;  
$rqp = $db-query($sql);  
echo 'books = '.$rqp-num_rows.'br /'; 


//DON’T WORK
echo 'br /Prepared statementbr /'; 
$sql = select * from ch9books;  
$rqp = $db-prepare($sql); 
$rqp-execute(); 
echo 'books = '.$rqp-num_rows.'br /'; 

$rqp-close();


Expected result:

Non prepared statement
Books = 6 



Actual result:
--
Prepared statement 
Books = 0






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


#42640 [NEW]: error in date_parse function

2007-09-12 Thread david at zschille dot net
From: david at zschille dot net
Operating system: Win XP
PHP version:  5CVS-2007-09-12 (snap)
PHP Bug Type: Date/time related
Bug description:  error in date_parse function

Description:

In the php manual is written that the parameter for date_parse should be a
Date in format accepted by strtotime() and it returns array on success
or FALSE on failure. So if i give a not valid format to the function i
expect a FALSE. 

Also interesting is the behavior of date_parse when i give the string
19044-05-09 to it. It produces no error and no warning message and seems
to be valid!? But the string is also valid for strtotime(). Has this
function also an error or is this string really valid?

Reproduce code:
---
var_dump( date_parse( 'abc123' ) );

Expected result:

bool false

Actual result:
--
array(13) {
  [year]=
  bool(false)
  [month]=
  bool(false)
  [day]=
  bool(false)
  [hour]=
  bool(false)
  [minute]=
  bool(false)
  [second]=
  bool(false)
  [fraction]=
  bool(false)
  [warning_count]=
  int(0)
  [warnings]=
  array(0) {
  }
  [error_count]=
  int(4)
  [errors]=
  array(4) {
[0]=
string(47) The timezone could not be found in the database
[3]=
string(20) Unexpected character
[4]=
string(20) Unexpected character
[5]=
string(20) Unexpected character
  }
  [is_localtime]=
  bool(true)
  [zone_type]=
  int(0)
}

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


#42548 [Com]: PROCEDURE xxx can't return a result set in the given context (works in 5.2.3!!)

2007-09-12 Thread uwendel at mysql dot com
 ID:   42548
 Comment by:   uwendel at mysql dot com
 Reported By:  garethjo at usc dot edu
 Status:   Assigned
 Bug Type: MySQLi related
 Operating System: Windows XP, Windows 2003
 PHP Version:  5.2.4
 Assigned To:  georg
 New Comment:

Your code snippets does not show proper usage of mysqli_multi_query().


Stored Procedures that return n result sets will return n + 1 result
sets. In your case, it's two result sets to fetch and eat up before you
can reuse the line. The error message from the server is exactly about
that. Proper usage of mysqli_multi_query() looks like this:

if (mysqli_multi_query($link, 'CALL p()')) {
  do {
if ($res = mysqli_store_result($link)) {
 while ($row = mysqli_fetch_assoc($res))
   var_dump($row);
 mysqli_free_result($res);
}
 } while (mysqli_more_results($link)  mysqli_next_result($link));

} else {
  printf(Cannot call SP, [%d] %s\n, 
mysqli_errno($link), mysqli_error($link));
}

I see you replacing mysqli_[real_]query() with mysqli_multi_query() but
I do not see the more_results()/next_result() loop etc. You continue
using the syntax for SPs which do not return a result set.

Ulf


Previous Comments:


[2007-09-11 17:44:25] al dot smith at aeschi dot ch dot eu dot org

$query = CALL count_runs(.$row[id]., .$minyear.,
.$maxyear.);
$db-multi_query($query) or die (Error in query: $query.  .
$db-error);

This was my query.



[2007-09-11 15:54:04] garethjo at usc dot edu

No it doesn't, I tried it with both before sending in the bug report.



[2007-09-11 10:00:30] uwendel at mysql dot com

Does using mysqli_multi_query() work for you? Currently you are using
mysqli_real_query() to call the SP. See also,
http://dev.mysql.com/doc/refman/5.1/en/call.html. If a stored procedure
produces result sets, you must use mysqli_multi_query(). 

Ulf



[2007-09-09 10:42:13] [EMAIL PROTECTED]

Georg (or whoever maintains mysqli nowadays), check this out. Seems
like some regression bug between 5.2.3 / 5.2.4 crept in..



[2007-09-07 18:00:17] al dot smith at aeschi dot ch dot eu dot org

I'm seeing this exact bug as well. Rolling back to 5.2.3 fixes the
problem.

For me, executing the CALL() statement within a mysql client session
works just fine...



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

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


#42641 [NEW]: ob_start(): inconsistent behaviour with undefined callbacks

2007-09-12 Thread robin_fernandes at uk dot ibm dot com
From: robin_fernandes at uk dot ibm dot com
Operating system: Windows
PHP version:  5CVS-2007-09-12 (snap)
PHP Bug Type: Output Control
Bug description:  ob_start(): inconsistent behaviour with undefined callbacks

Description:

ob_start() can initialize multiple output buffers in a single call using a
comma delimited list of output callbacks, as follows:
  ob_start('f,f,f');
where function f() is a defined function.

However, behaviour when passing an undefined callback is inconsistent:
  ob_start('non_existent,f');
returns false and initializes no output buffers, whereas
  ob_start('non_existent,f,f');
returns true and initializes 2 output buffers with f as a callback.

Using arrays, the behaviour is consistent. The following both return false
and initialize no output buffers:
  ob_start(array('non_existent', 'f'));
  ob_start(array('non_existent', 'f', 'f'));

Tested on Windows XP on PHP 5.2.5-dev (cli) (built: Sep 12 2007 04:04:36).

Reproduce code:
---
?php
function f($str) {
  return $str;
}
function checkAndClean() {
  print_r(ob_list_handlers());
  while (ob_get_level()0) {
ob_end_flush();
  }
}
var_dump(ob_start(array('non_existent', 'f')));
checkAndClean();
var_dump(ob_start(array('non_existent', 'f', 'f')));
checkAndClean();
var_dump(ob_start('non_existent,f'));
checkAndClean();
var_dump(ob_start('non_existent,f,f'));  //bug: expecting false with no
output buffers. Actually returns true and initialises 2 output buffers.
checkAndClean();
?

Expected result:

bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)

Actual result:
--
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(true)
Array
(
[0] = f
[1] = f
)

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


#42642 [NEW]: PHP sybase_conect Crash when compiled with with-sybase and with-ldap and syba

2007-09-12 Thread roberto dot valsania at mail dot wind dot it
From: roberto dot valsania at mail dot wind dot it
Operating system: FEDORA CORE 7 
PHP version:  5CVS-2007-09-12 (snap)
PHP Bug Type: Sybase (dblib) related
Bug description:  PHP sybase_conect Crash when compiled with –with-sybase and 
–with-ldap and syba

Description:

PHP sybase_conect Crash when compiled with –with-sybase and –with-ldap and
sybase name resolution is done via LDAP

If PHP is compiled without ldap extension all works. 
If Sybase resolution is done via interface file and not via LDAP all
works

To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error instead
of a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?





Reproduce code:
---
To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error (because
it don't find the ldap server correct configuration) instead of a stack
trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?

Expected result:

an error or a sucessfull connection

Actual result:
--
A segmentation fault .
Here the backtrace :

[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...
Using host libthread_db library /lib/libthread_db.so.1.
warning: not using untrusted file
/root/Development/php5.2-200709120830/.gdbinit
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from /usr/lib/libldap-2.3.so.0
(gdb) bt
#0  0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
#1  0x00473092 in ldap_send_initial_request () from
/usr/lib/libldap-2.3.so.0
#2  0x00468248 in ldap_sasl_bind () from /usr/lib/libldap-2.3.so.0
#3  0x0066bc75 in ldap_simple_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0/lib3p/libsybaseldap.so
#4  0x00267473 in gdd_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdldap.so.15.0.3
#5  0x00153f5d in drv_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#6  0x00153ab3 in dcl___bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#7  0x00153b7a in dcl__bind_sync ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#8  0x0015a11f in dcl_sess_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#9  0x00145663 in db__initnet ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#10 0x0013077b in dbopen ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#11 0x082ac4e4 in php_sybase_do_connect (ht=3, return_value=0xa2c6ed8,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1,
persistent=0)
at
/root/Development/php5.2-200709120830/ext/sybase/php_sybase_db.c:520
#12 0x082ac73f in zif_sybase_connect (ht=3, return_value=0xa2c6ed8,
---Type return to continue, or q return to quit---
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at
/root/Development/php5.2-200709120830/ext/sybase/php_sybase_db.c:571
#13 0x08338f4c in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff1e474)
at /root/Development/php5.2-200709120830/Zend/zend_vm_execute.h:200
#14 0x0833e81d in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbff1e474)
at /root/Development/php5.2-200709120830/Zend/zend_vm_execute.h:1681
#15 0x08338aad in execute (op_array=0xa2c60b8)
at /root/Development/php5.2-200709120830/Zend/zend_vm_execute.h:92
#16 0x08313d1b in 

#42642 [Opn]: PHP sybase_conect Crash when compiled with with-sybase and with-ldap and syba

2007-09-12 Thread roberto dot valsania at mail dot wind dot it
 ID:   42642
 User updated by:  roberto dot valsania at mail dot wind dot it
 Reported By:  roberto dot valsania at mail dot wind dot it
 Status:   Open
 Bug Type: Sybase (dblib) related
 Operating System: FEDORA CORE 7
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

Note that to have ldap support sybase client shuld be 12.5.1 or 15.
I made test with Sybase OpenClient 15
The same configuration ( enable ldap and sybase ) with php 5.1.6 and
fedora core 5 works


Previous Comments:


[2007-09-12 09:31:47] roberto dot valsania at mail dot wind dot it

Description:

PHP sybase_conect Crash when compiled with –with-sybase and –with-ldap
and sybase name resolution is done via LDAP

If PHP is compiled without ldap extension all works. 
If Sybase resolution is done via interface file and not via LDAP all
works

To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
instead of a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?





Reproduce code:
---
To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
(because it don't find the ldap server correct configuration) instead of
a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?

Expected result:

an error or a sucessfull connection

Actual result:
--
A segmentation fault .
Here the backtrace :

[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...
Using host libthread_db library /lib/libthread_db.so.1.
warning: not using untrusted file
/root/Development/php5.2-200709120830/.gdbinit
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
(gdb) bt
#0  0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
#1  0x00473092 in ldap_send_initial_request () from
/usr/lib/libldap-2.3.so.0
#2  0x00468248 in ldap_sasl_bind () from /usr/lib/libldap-2.3.so.0
#3  0x0066bc75 in ldap_simple_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0/lib3p/libsybaseldap.so
#4  0x00267473 in gdd_bind ()
   from
/sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdldap.so.15.0.3
#5  0x00153f5d in drv_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#6  0x00153ab3 in dcl___bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#7  0x00153b7a in dcl__bind_sync ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#8  0x0015a11f in dcl_sess_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#9  0x00145663 in db__initnet ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#10 0x0013077b in dbopen ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#11 0x082ac4e4 in php_sybase_do_connect (ht=3, return_value=0xa2c6ed8,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1,
persistent=0)
at
/root/Development/php5.2-200709120830/ext/sybase/php_sybase_db.c:520
#12 0x082ac73f in zif_sybase_connect (ht=3, return_value=0xa2c6ed8,
---Type return to continue, or q return to quit---
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at
/root/Development/php5.2-200709120830/ext/sybase/php_sybase_db.c:571
#13 0x08338f4c in zend_do_fcall_common_helper_SPEC

#42602 [Bgs]: Memory leak occurs when exec() function is used on Windows platform

2007-09-12 Thread jani
 ID:   42602
 Updated by:   [EMAIL PROTECTED]
 Reported By:  melmack3 at gmail dot com
 Status:   Bogus
 Bug Type: Performance problem
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

comment from melmack via email:

You were right. I have fixed the problem.
The problem was caused by an additional firewall installed on both
computers with Windows XP used by me for testing process. When I
uninstalled it, the problem disappeared.

Apparently the firewall prevented running the scripts and left the
cmd.exe hanging around..



Previous Comments:


[2007-09-09 10:12:50] [EMAIL PROTECTED]

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





[2007-09-09 09:37:38] melmack3 at gmail dot com

Description:

A simple PHP script (attached below) which executes empty Windows batch
file 1000 times causes ~10 MB memory leak.

Reproduce code:
---
?php

for($i=0;$i1000;$i++)
{
  exec(test.bat);
}

?

//test.bat is just an empty file.

Expected result:

Batch file test.bat should be executed 1000 times and amount of used
memory should not increase when PHP script has finished.

Actual result:
--
Batch file is executed properly but PHP script causes about 10 MB
memory leak. It can be observed by usage of performance system monitor.
However, this amount of memory is not taken by a certain process - it
simply disappears. PHP function memory_get_usage() also does not
indicate the leak.  

Memory leak is observable only on Windows platform 
(tested on Windows XP). On Linux everything works OK.

This problems occurs in all available enviroments :
- IIS Webserver.
- Apache webserver
- PHP command line interpreter





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


#41899 [Com]: Can't open files with leading relative path of '..' and '..' is not readable

2007-09-12 Thread ian at onlineloop dot com
 ID:   41899
 Comment by:   ian at onlineloop dot com
 Reported By:  geoffwa at cs dot rmit dot edu dot au
 Status:   Assigned
 Bug Type: Streams related
 Operating System: Solaris 10
 PHP Version:  5.2.3
 Assigned To:  tony2001
 New Comment:

Verified that this is still not working in 5.2.4.

We made a system available on a Sun E3500, partially for the purposes
of fixing this bug.  The last login from anyone from the PHP team was on
5 July 2007.

Is there any time plan to fix this bug?  We are running on Solaris 10
and are stuck on PHP 5.1.6 because of this problem, so the situation for
us is critical.


Previous Comments:


[2007-08-14 15:21:39] wdierkes at 5dollarwhitebox dot org

I have verified that this is *NOT* fixed in the latest CVS snapshot. 
Tested on Redhat Enterprise Linux 4 i386.  Can we can an ETA on an
official patch?



[2007-07-07 02:04:42] geoffwa at cs dot rmit dot edu dot au

No idea if this is correct but it fixes it:
diff -ur ./php5.2-200707060030/main/safe_mode.c
./php-5.2-snap/main/safe_mode.c
--- ./php5.2-200707060030/main/safe_mode.c  2007-01-13
00:30:58.0 +1100
+++ ./php-5.2-snap/main/safe_mode.c 2007-07-07 11:42:10.804129000
+1000
@@ -86,7 +86,8 @@
 * If that fails, passthrough and check directory...
 */
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
-   expand_filepath(filename, path TSRMLS_CC);
+   // VCWD_STAT() can handle relative paths right?
+   strlcpy(path, filename, MAXPATHLEN);
ret = VCWD_STAT(path, sb);
if (ret  0) {
if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS)
{
diff -ur ./php5.2-200707060030/main/streams/plain_wrapper.c
./php-5.2-snap/main/streams/plain_wrapper.c
--- ./php5.2-200707060030/main/streams/plain_wrapper.c  2007-04-19
00:31:35.0 +1000
+++ ./php-5.2-snap/main/streams/plain_wrapper.c 2007-07-07
11:58:57.673891000 +1000
@@ -888,9 +888,10 @@
return NULL;
}

-   if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) ==
NULL) {
-   return NULL;
-   }
+   //if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) ==
NULL) {
+   //  return NULL;
+   //}
+   realpath = estrndup(filename, strlen(filename));

if (persistent) {
spprintf(persistent_id, 0, streams_stdio_%d_%s,
open_flags, realpath);



[2007-07-06 16:04:30] geoffwa at cs dot rmit dot edu dot au

It's still broken in CVS (my bad - forgot to remove the workaround
patch we had).

virtual_file_ex() get called several times, with the last
invocation being:

virtual_file_ex(state = 0xffbfdf9c,
path = 0xffbfe018 ../b/file,
verify_path = (nil),
use_realpath = 1)
called from function expand_filepath
virtual_file_ex returns 1

Having written a rather grandoise summary of stepping through
virtual_file_ex() I think the problem might be in php_checkuid_ex().



[2007-07-06 15:16:04] [EMAIL PROTECTED]

Thanks, but I need to do it myself in order to understand it.

I know quite well that realpath() on Solaris is badly broken, that's
known issue and Sun is not going to do anything about as far as I
understand.
The problem is that we need to invent a workaround for it so that we
don't break working realpath() implementations.
And to do that I need to reproduce it myself and investigate it using
GDB.



[2007-07-06 15:00:30] geoffwa at cs dot rmit dot edu dot au

Doing a bit of tracing of expand_filepath nets:

(from PHP-5.2.3)
expand_filepath(filepath = 0xffbff5f4 test2.php,
real_path = 0xffbfee20 )
called from function php_execute_script
expand_filepath returns 0xffbfee20 /home/g/geoffwa/test/test2.php
expand_filepath(filepath = 0xffbfdec0 ./a,
real_path = 0xffbfe2c4 )
called from function php_checkuid_ex
expand_filepath returns 0xffbfe2c4 /home/g/geoffwa/test/a
expand_filepath(filepath = 0xffbfe108 ./a/b/file,
real_path = 0xffbfe50c )
called from function php_checkuid_ex
expand_filepath returns 0xffbfe50c /home/g/geoffwa/test/a/b/file
expand_filepath(filepath = 0xffbfe098 ./a,
real_path = 0xffbfe49c )
called from function php_checkuid_ex
expand_filepath returns 0xffbfe49c /home/g/geoffwa/test/a
expand_filepath(filepath = 0xffbfe028 ./a,
real_path = 0xffbfe42c )
called from function php_checkuid_ex
expand_filepath returns 0xffbfe42c /home/g/geoffwa/test/a

#42642 [Opn-Fbk]: sybase_connect crashes when compiled with with-sybase and with-ldap

2007-09-12 Thread jani
 ID:   42642
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roberto dot valsania at mail dot wind dot it
-Status:   Open
+Status:   Feedback
 Bug Type: Sybase (dblib) related
 Operating System: FEDORA CORE 7
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

Did you have same sybase libs in the other system too?
It seems to me that there's simply a conflict between openldap and
sybase's own ldap implementation and there's not much we can do about
that..


Previous Comments:


[2007-09-12 09:44:39] roberto dot valsania at mail dot wind dot it

Note that to have ldap support sybase client shuld be 12.5.1 or 15.
I made test with Sybase OpenClient 15
The same configuration ( enable ldap and sybase ) with php 5.1.6 and
fedora core 5 works



[2007-09-12 09:31:47] roberto dot valsania at mail dot wind dot it

Description:

PHP sybase_conect Crash when compiled with –with-sybase and –with-ldap
and sybase name resolution is done via LDAP

If PHP is compiled without ldap extension all works. 
If Sybase resolution is done via interface file and not via LDAP all
works

To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
instead of a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?





Reproduce code:
---
To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
(because it don't find the ldap server correct configuration) instead of
a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?

Expected result:

an error or a sucessfull connection

Actual result:
--
A segmentation fault .
Here the backtrace :

[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...
Using host libthread_db library /lib/libthread_db.so.1.
warning: not using untrusted file
/root/Development/php5.2-200709120830/.gdbinit
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
(gdb) bt
#0  0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
#1  0x00473092 in ldap_send_initial_request () from
/usr/lib/libldap-2.3.so.0
#2  0x00468248 in ldap_sasl_bind () from /usr/lib/libldap-2.3.so.0
#3  0x0066bc75 in ldap_simple_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0/lib3p/libsybaseldap.so
#4  0x00267473 in gdd_bind ()
   from
/sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdldap.so.15.0.3
#5  0x00153f5d in drv_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#6  0x00153ab3 in dcl___bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#7  0x00153b7a in dcl__bind_sync ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#8  0x0015a11f in dcl_sess_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#9  0x00145663 in db__initnet ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#10 0x0013077b in dbopen ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#11 0x082ac4e4 in php_sybase_do_connect (ht=3, return_value=0xa2c6ed8,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1,
persistent=0)
at

#41822 [Asn]: includes produce permission denied errors (bug #39351 not fixed on SPARC)

2007-09-12 Thread ian at onlineloop dot com
 ID:   41822
 User updated by:  ian at onlineloop dot com
 Reported By:  ian at onlineloop dot com
 Status:   Assigned
 Bug Type: *Directory/Filesystem functions
 Operating System: Solaris 10
 PHP Version:  5.2CVS-20070627
 Assigned To:  tony2001
 New Comment:

Verified that this is still not working in 5.2.4, nor in the latest CVS
version, php5.2-200709121030.

We made a system available on a Sun E3500, partially for the purposes
of fixing this bug.  The last login from anyone from the PHP team was on
5 July 2007.

Is there any time plan to fix this bug?  We are running on Solaris 10
and are stuck on PHP 5.1.6 because of this problem, so the situation
for us is critical.


Previous Comments:


[2007-06-27 13:46:06] ian at onlineloop dot com

CVS version still produces the error.



[2007-06-27 13:27:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2007-06-27 13:17:44] ian at onlineloop dot com

Description:

When including files in directories that have access only permissions
(no read or write), includes fail with a permission denied when trying
things like
include ('../include_me.inc');
Directory permissions for the webserver process are access only (--x).
When including an absolute path, or relative path descending into the
directory tree, include works ok eg:
include ('access_only/level2/include_me.inc');

The return value of is_readable('../include_me.inc'); returns true,
however include() fails.

Everything works find up to and including PHP 5.1.6, as of PHP 5.2.0
this problem occurs.

Anthony D. has access to our SPARC system and a test area in which this
bug is reproduced has been set up.  He should contact me at my work
email address for further information.


Expected result:

The files should be included, as they were in versions prior to and in 
5.1.6.

Actual result:
--
Warning: include(../include_me.inc) [function.include]: failed to open
stream: Permission denied in /access_only/level2/index.php on line 15






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


#42639 [Opn-Fbk]: include in if-expression problem

2007-09-12 Thread jani
 ID:   42639
 Updated by:   [EMAIL PROTECTED]
 Reported By:  koraktor at web dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP SP2
 PHP Version:  5.2.4
 New Comment:

You do realize that include is a language construct and not a regular
function? Please provide short but _complete_ example script which shows
the problem clearly.


Previous Comments:


[2007-09-12 08:44:02] koraktor at web dot de

Description:

Included code in an if-expression is only available in the if-branch
not the if-expression itself.

Reproduce code:
---
if(file_exists(code_to_include.php)
 include(code_to_include.php)
 check_included_code())
{
  task();
}

Expected result:

Included code from code_to_include.php should be accessible in
check_included_code() and anything afterwards.

Actual result:
--
Included code from code_to_include.php is accessible in task(), but
not in check_included_code().





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


#42640 [Opn-Fbk]: error in date_parse function

2007-09-12 Thread jani
 ID:   42640
 Updated by:   [EMAIL PROTECTED]
 Reported By:  david at zschille dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Date/time related
 Operating System: Win XP
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

Can you please clarify what is the problem? As you can see, there are
errors in the output for abc123..and yes, 19044-05-09 is valid date.
Just very far in the future.


Previous Comments:


[2007-09-12 08:50:08] david at zschille dot net

Description:

In the php manual is written that the parameter for date_parse should
be a Date in format accepted by strtotime() and it returns array on
success or FALSE on failure. So if i give a not valid format to the
function i expect a FALSE. 

Also interesting is the behavior of date_parse when i give the string
19044-05-09 to it. It produces no error and no warning message and
seems to be valid!? But the string is also valid for strtotime(). Has
this function also an error or is this string really valid?

Reproduce code:
---
var_dump( date_parse( 'abc123' ) );

Expected result:

bool false

Actual result:
--
array(13) {
  [year]=
  bool(false)
  [month]=
  bool(false)
  [day]=
  bool(false)
  [hour]=
  bool(false)
  [minute]=
  bool(false)
  [second]=
  bool(false)
  [fraction]=
  bool(false)
  [warning_count]=
  int(0)
  [warnings]=
  array(0) {
  }
  [error_count]=
  int(4)
  [errors]=
  array(4) {
[0]=
string(47) The timezone could not be found in the database
[3]=
string(20) Unexpected character
[4]=
string(20) Unexpected character
[5]=
string(20) Unexpected character
  }
  [is_localtime]=
  bool(true)
  [zone_type]=
  int(0)
}





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


#42641 [Opn-Fbk]: ob_start(): inconsistent behaviour with undefined callbacks

2007-09-12 Thread jani
 ID:   42641
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robin_fernandes at uk dot ibm dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

Let's start with the prototype for this function:

bool ob_start ( [callback $output_callback [, int $chunk_size [, bool
$erase]]] )

The first parameter is callback type, so it expects either a string
(function name) or array (object, method).

More information about callback pseudo-type: 
http://www.php.net/callback

I don't know where you got the idea that you can pass multiple
callbacks in there. It's not said to work like that anywhere in the
manual at least. :)

Please fix your example script accordingly (and tune up your
display_errors / error_reporting levels..).


Previous Comments:


[2007-09-12 09:15:35] robin_fernandes at uk dot ibm dot com

Description:

ob_start() can initialize multiple output buffers in a single call
using a comma delimited list of output callbacks, as follows:
  ob_start('f,f,f');
where function f() is a defined function.

However, behaviour when passing an undefined callback is inconsistent:
  ob_start('non_existent,f');
returns false and initializes no output buffers, whereas
  ob_start('non_existent,f,f');
returns true and initializes 2 output buffers with f as a callback.

Using arrays, the behaviour is consistent. The following both return
false and initialize no output buffers:
  ob_start(array('non_existent', 'f'));
  ob_start(array('non_existent', 'f', 'f'));

Tested on Windows XP on PHP 5.2.5-dev (cli) (built: Sep 12 2007
04:04:36).

Reproduce code:
---
?php
function f($str) {
  return $str;
}
function checkAndClean() {
  print_r(ob_list_handlers());
  while (ob_get_level()0) {
ob_end_flush();
  }
}
var_dump(ob_start(array('non_existent', 'f')));
checkAndClean();
var_dump(ob_start(array('non_existent', 'f', 'f')));
checkAndClean();
var_dump(ob_start('non_existent,f'));
checkAndClean();
var_dump(ob_start('non_existent,f,f'));  //bug: expecting false with no
output buffers. Actually returns true and initialises 2 output buffers.
checkAndClean();
?

Expected result:

bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)

Actual result:
--
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(true)
Array
(
[0] = f
[1] = f
)





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


#42634 [Opn-Fbk]: Apache 2.2.6 + PHP 5.2.4 = 302

2007-09-12 Thread jani
 ID:   42634
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at transpect dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Gentoo Linux
 PHP Version:  5.2.4
 New Comment:

Are you sure you have installed PHP correctly? That same combination
works just fine for me..


Previous Comments:


[2007-09-12 01:42:12] php at transpect dot com

Description:

Apache 2.2.6 with php 5.2.3's libphp5.so works fine. But with 5.2.4
Apache starts without error, but every request to the server (whether to
a PHP or HTML page) results in a blank page in the browser, and a 302
(redirect) rather than a 200 response in the log. In all respects this
is the same system except for the switch between 5.2.3 and 5.2.4.


Reproduce code:
---
These are the configuration options used - building by hand in each
case:

HTTPD
./configure --enable-so --enable-ssl --enable-rewrite
PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--disable-cgi







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


#42631 [Opn-Fbk]: mssql_connect causes stack smashing attack protection

2007-09-12 Thread jani
 ID:   42631
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gabe at mudbugmedia dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: Gentoo Linux 2.6.17-hardened-r1
 PHP Version:  5.2.4
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

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




Previous Comments:


[2007-09-11 20:31:51] gabe at mudbugmedia dot com

Description:

When executing a PHP script over Apache 2.2 SAPI (not CGI), 
mssql_connect() causes Apache to exit with the following in the 
syslog:

apache2: stack smashing attack in function tds_write_packet - 
terminated

This occurs only after successfully connecting to a valid MSSQL 
server, but before authentication information is verified; supplying 
invalid username/password will still cause the error to trigger.  
However, entering in a non-listening IP to connect to will return 
false and continue execution.

Gentoo developers identified this bug as PHP instead of Apache, as 
Apache is not responsible for the calling of the tds_write_packet() 
function

Bug originally submitted here, but was reclassified as being UPSTREAM:
http://bugs.gentoo.org/show_bug.cgi?id=191988


an strace of the process (capture started after initial connect 
`netstat -p` after connection was the only way I could determine which

apache process to strace):
Process 11348 attached - interrupt to quit
poll([{fd=1027, events=POLLIN, revents=POLLIN}], 1, 30) = 1
read(1027, Host: kokiri.org\r\n, 8000) = 18
poll([{fd=1027, events=POLLIN, revents=POLLIN}], 1, 30) = 1
read(1027, \r\n, 8000)= 2
gettimeofday({1189537767, 899761}, NULL) = 0
gettimeofday({1189537767, 899905}, NULL) = 0
stat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
open(/www/.htaccess, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file

or directory)
open(/www/kokiri.org/.htaccess, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open(/www/kokiri.org/htdocs/.htaccess, O_RDONLY|O_LARGEFILE) = 1028
fstat64(1028, {st_mode=S_IFREG|0664, st_size=79, ...}) = 0
read(1028, RewriteEngine on\n\nRewriteRule ro..., 4096) = 79
read(1028, , 4096)= 0
close(1028) = 0
open(/www/kokiri.org/htdocs/findwork.php/.htaccess, 
O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) =

0
rt_sigaction(SIGPROF, {0x503ec97b, [PROF], SA_RESTORER|SA_RESTART, 
0x50aeab68}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
getcwd(/, 4095)   = 2
chdir(/www/kokiri.org/htdocs) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={30, 0}}, NULL) =

0
rt_sigaction(SIGPROF, {0x503ec97b, [PROF], SA_RESTORER|SA_RESTART, 
0x50aeab68}, {0x503ec97b, [PROF], SA_RESTORER|SA_RESTART, 0x50aeab68},

8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
lstat64(/www, {st_mode=S_IFDIR|0775, st_size=16384, ...}) = 0
lstat64(/www/kokiri.org, {st_mode=S_IFDIR|0775, st_size=4096, ...}) 
= 0
lstat64(/www/kokiri.org/htdocs, {st_mode=S_IFDIR|0775, st_size=4096,

...}) = 0
lstat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
lstat64(/www, {st_mode=S_IFDIR|0775, st_size=16384, ...}) = 0
lstat64(/www/kokiri.org, {st_mode=S_IFDIR|0775, st_size=4096, ...}) 
= 0
lstat64(/www/kokiri.org/htdocs, {st_mode=S_IFDIR|0775, st_size=4096,

...}) = 0
lstat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
lstat64(/www, {st_mode=S_IFDIR|0775, st_size=16384, ...}) = 0
lstat64(/www/kokiri.org, {st_mode=S_IFDIR|0775, st_size=4096, ...}) 
= 0
lstat64(/www, {st_mode=S_IFDIR|0775, st_size=16384, ...}) = 0
lstat64(/www/kokiri.org, {st_mode=S_IFDIR|0775, st_size=4096, ...}) 
= 0
lstat64(/www/kokiri.org/htdocs, {st_mode=S_IFDIR|0775, st_size=4096,

...}) = 0
lstat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
lstat64(/www, {st_mode=S_IFDIR|0775, st_size=16384, ...}) = 0
lstat64(/www/kokiri.org, {st_mode=S_IFDIR|0775, st_size=4096, ...}) 
= 0
lstat64(/www/kokiri.org/htdocs, {st_mode=S_IFDIR|0775, st_size=4096,

...}) = 0
lstat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
stat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
lstat64(/www, {st_mode=S_IFDIR|0775, st_size=16384, ...}) = 0
lstat64(/www/kokiri.org, {st_mode=S_IFDIR|0775, st_size=4096, ...}) 
= 0
lstat64(/www/kokiri.org/htdocs, {st_mode=S_IFDIR|0775, st_size=4096,

...}) = 0
lstat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0

#39651 [Asn-Csd]: proc_open() descriptor spec for STDOUT append starts writing from beginning

2007-09-12 Thread nlopess
 ID:   39651
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rherror404 at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Program Execution
 Operating System: win32 only
-PHP Version:  5? 4? 6?
+PHP Version:  5
 Assigned To:  nlopess
 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.

the append mode is now emulated using a fseek().


Previous Comments:


[2007-09-05 13:53:35] [EMAIL PROTECTED]

Nuno, please check the version field here. It must never be '*' like it
was before I set it to something meaningful. If you can reproduce this
with PHP 5.2.4, set the version to it.



[2007-01-01 15:25:19] [EMAIL PROTECTED]

I do verify the bug, but I wasn't able to fix it.
The problem is that I think windows doesn't support the append mode
when using HANDLEs. So, when we call _get_osfhandle() to convert the fd
to an HANDLE, windows loose this information. (yes, we need to convert
to an handle because CreateProcess() requires it).
I'm leacing open as someone might have some idea (no, I don't know how
to emulate it, as after forking we loose the control over the new
process..)



[2006-11-27 23:09:11] [EMAIL PROTECTED]

Not reproducible on Linux.



[2006-11-27 22:49:38] rherror404 at gmail dot com

Description:

Defining the descriptor spec for STDOUT for a call to proc_open() to
append to a file instead starts writing from beginning (not at the end
as one would expect).

C:\WINDOWS\Tempphp launch1.php

Reproduce code:
---
C:\WINDOWS\Temptype launch1.php
?
$dspec = array(0 = array(pipe, r)
, 1 = array(file, 'C:\WINDOWS\TEMP\launch_stdout.txt', a)
, 2 = array(file, 'C:\WINDOWS\TEMP\launch_stderr.txt', a)
);
$i = 5; $inputpackage = serialize($i);
$proc = proc_open('php C:\WINDOWS\TEMP\launch2.php', $dspec, $pipes);
if ( is_resource($proc) ) {fwrite($pipes[0], $inputpackage);
fclose($pipes[0]);
proc_close($proc);}
$i = 2; $inputpackage = serialize($i);
$proc = proc_open('php C:\WINDOWS\TEMP\launch2.php', $dspec, $pipes);
if ( is_resource($proc) ) {fwrite($pipes[0], $inputpackage);
fclose($pipes[0]);
proc_close($proc);}
exit();
?
C:\WINDOWS\Temptype launch2.php
?
function tostdout( $x ) {echo date('[Y-m-d H:i:s (T P)]') .  PID  .
getmypid(
) .  $x\r\n;}
$inbuffer = fgets(STDIN, 8192);
$i = unserialize($inbuffer);
for ( $j = 0; $j  $i; $j++ ) {tostdout($j : $i); sleep(1);}
exit();
?
C:\WINDOWS\Temp

Expected result:

C:\WINDOWS\Temptype launch_stdout.txt
[2006-11-27 16:33:53 (CST -06:00)] PID 4492 0 : 5
[2006-11-27 16:33:54 (CST -06:00)] PID 4492 1 : 5
[2006-11-27 16:33:55 (CST -06:00)] PID 4492 2 : 5
[2006-11-27 16:33:56 (CST -06:00)] PID 4492 3 : 5
[2006-11-27 16:33:57 (CST -06:00)] PID 4492 4 : 5
[2006-11-27 16:33:58 (CST -06:00)] PID 6808 0 : 2
[2006-11-27 16:33:59 (CST -06:00)] PID 6808 1 : 2

/*
I would expect the second process to append its output
to (the end of) the output of the first process.
*/

Actual result:
--
C:\WINDOWS\Temptype launch_stdout.txt
[2006-11-27 16:33:58 (CST -06:00)] PID 6808 0 : 2
[2006-11-27 16:33:59 (CST -06:00)] PID 6808 1 : 2
[2006-11-27 16:33:55 (CST -06:00)] PID 4492 2 : 5
[2006-11-27 16:33:56 (CST -06:00)] PID 4492 3 : 5
[2006-11-27 16:33:57 (CST -06:00)] PID 4492 4 : 5

/*
The second process has over-written lines one and two
of the output of the first process.
*/





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


#42640 [Fbk-Opn]: error in date_parse function

2007-09-12 Thread david at zschille dot net
 ID:   42640
 User updated by:  david at zschille dot net
 Reported By:  david at zschille dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Date/time related
 Operating System: Win XP
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

The PHP manual says about the return values: Returns array on success
or FALSE on failure. You can see here that it returns not FALSE but an
array. Is the error in the manual or in the behavior of the function?

To the string 19044-05-09: it get parsed as 19:04:00 2004-05-09. This
is not correct.


Previous Comments:


[2007-09-12 11:09:59] [EMAIL PROTECTED]

Can you please clarify what is the problem? As you can see, there are
errors in the output for abc123..and yes, 19044-05-09 is valid date.
Just very far in the future.



[2007-09-12 08:50:08] david at zschille dot net

Description:

In the php manual is written that the parameter for date_parse should
be a Date in format accepted by strtotime() and it returns array on
success or FALSE on failure. So if i give a not valid format to the
function i expect a FALSE. 

Also interesting is the behavior of date_parse when i give the string
19044-05-09 to it. It produces no error and no warning message and
seems to be valid!? But the string is also valid for strtotime(). Has
this function also an error or is this string really valid?

Reproduce code:
---
var_dump( date_parse( 'abc123' ) );

Expected result:

bool false

Actual result:
--
array(13) {
  [year]=
  bool(false)
  [month]=
  bool(false)
  [day]=
  bool(false)
  [hour]=
  bool(false)
  [minute]=
  bool(false)
  [second]=
  bool(false)
  [fraction]=
  bool(false)
  [warning_count]=
  int(0)
  [warnings]=
  array(0) {
  }
  [error_count]=
  int(4)
  [errors]=
  array(4) {
[0]=
string(47) The timezone could not be found in the database
[3]=
string(20) Unexpected character
[4]=
string(20) Unexpected character
[5]=
string(20) Unexpected character
  }
  [is_localtime]=
  bool(true)
  [zone_type]=
  int(0)
}





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


#42625 [Opn-Fbk]: When mysql and mysqli enabled both together, php cli hangs

2007-09-12 Thread jani
 ID:   42625
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jama at mk dot cvut dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: MySQL related
 Operating System: Gentoo/Linux
 PHP Version:  5.2.4
 New Comment:

Why are you using --enable-maintainer-zts in your configure line? You
really don't need this for CLI/CGI..


Previous Comments:


[2007-09-11 18:48:11] jama at mk dot cvut dot cz

Description:

when compiled vanilla php-5.2.4 with this params
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
it's ok

when added mysql support too
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
it's bad even sapi/cli/php -i hangs forever on futex call

strace sapi/cli/php -i

write(1, questions about PHP licensing, p..., 63questions about PHP
licensing, please contact [EMAIL PROTECTED]
) = 63
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) =
0
futex(0x2adbeb81cac0, FUTEX_WAIT, 2, NULL unfinished ...

The same behavior with php5.2-200709110830.


Reproduce code:
---
tar xjvf php-5.2.4.tar.bz2
mv php-5.2.4 php-5.2.4-mysqli
cp -r php-5.2.4-mysqli php-5.2.4-mysql-mysqli
cd php-5.2.4-mysql-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
make
sapi/cli/php -i #HANGS HERE#

cd ../php-5.2.4-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
make
sapi/cli/php -i #DOESN'T HANG HERE#

Diff between those 2 build dirs on my pc..
http://pastebin.com/m9c448da

Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop,
gcc-4.2.2-alpha20070905/amd64-vanilla, glibc-2.6.1-r0,
2.6.23-rc5-git1-JaMa x86_64)
=
System uname: 2.6.23-rc5-git1-JaMa x86_64 AMD Athlon(tm) 64 Processor
3700+
Timestamp of tree: Tue, 11 Sep 2007 10:01:01 +
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python: 2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS=amd64 ~amd64
CBUILD=x86_64-pc-linux-gnu
CFLAGS=-O2 -march=k8



Expected result:

php cli working

Actual result:
--
php cli hanging on every occasion





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


#41899 [Com]: Can't open files with leading relative path of '..' and '..' is not readable

2007-09-12 Thread ian at onlineloop dot com
 ID:   41899
 Comment by:   ian at onlineloop dot com
 Reported By:  geoffwa at cs dot rmit dot edu dot au
 Status:   Assigned
 Bug Type: Streams related
 Operating System: Solaris 10
 PHP Version:  5.2.3
 Assigned To:  tony2001
 New Comment:

I've tried the patch offered by Geoff.  It seems to work just fine for
us too in the cvs version from today (php5.2-200709121030).


Previous Comments:


[2007-09-12 10:38:34] ian at onlineloop dot com

Verified that this is still not working in 5.2.4.

We made a system available on a Sun E3500, partially for the purposes
of fixing this bug.  The last login from anyone from the PHP team was on
5 July 2007.

Is there any time plan to fix this bug?  We are running on Solaris 10
and are stuck on PHP 5.1.6 because of this problem, so the situation for
us is critical.



[2007-08-14 15:21:39] wdierkes at 5dollarwhitebox dot org

I have verified that this is *NOT* fixed in the latest CVS snapshot. 
Tested on Redhat Enterprise Linux 4 i386.  Can we can an ETA on an
official patch?



[2007-07-07 02:04:42] geoffwa at cs dot rmit dot edu dot au

No idea if this is correct but it fixes it:
diff -ur ./php5.2-200707060030/main/safe_mode.c
./php-5.2-snap/main/safe_mode.c
--- ./php5.2-200707060030/main/safe_mode.c  2007-01-13
00:30:58.0 +1100
+++ ./php-5.2-snap/main/safe_mode.c 2007-07-07 11:42:10.804129000
+1000
@@ -86,7 +86,8 @@
 * If that fails, passthrough and check directory...
 */
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
-   expand_filepath(filename, path TSRMLS_CC);
+   // VCWD_STAT() can handle relative paths right?
+   strlcpy(path, filename, MAXPATHLEN);
ret = VCWD_STAT(path, sb);
if (ret  0) {
if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS)
{
diff -ur ./php5.2-200707060030/main/streams/plain_wrapper.c
./php-5.2-snap/main/streams/plain_wrapper.c
--- ./php5.2-200707060030/main/streams/plain_wrapper.c  2007-04-19
00:31:35.0 +1000
+++ ./php-5.2-snap/main/streams/plain_wrapper.c 2007-07-07
11:58:57.673891000 +1000
@@ -888,9 +888,10 @@
return NULL;
}

-   if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) ==
NULL) {
-   return NULL;
-   }
+   //if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) ==
NULL) {
+   //  return NULL;
+   //}
+   realpath = estrndup(filename, strlen(filename));

if (persistent) {
spprintf(persistent_id, 0, streams_stdio_%d_%s,
open_flags, realpath);



[2007-07-06 16:04:30] geoffwa at cs dot rmit dot edu dot au

It's still broken in CVS (my bad - forgot to remove the workaround
patch we had).

virtual_file_ex() get called several times, with the last
invocation being:

virtual_file_ex(state = 0xffbfdf9c,
path = 0xffbfe018 ../b/file,
verify_path = (nil),
use_realpath = 1)
called from function expand_filepath
virtual_file_ex returns 1

Having written a rather grandoise summary of stepping through
virtual_file_ex() I think the problem might be in php_checkuid_ex().



[2007-07-06 15:16:04] [EMAIL PROTECTED]

Thanks, but I need to do it myself in order to understand it.

I know quite well that realpath() on Solaris is badly broken, that's
known issue and Sun is not going to do anything about as far as I
understand.
The problem is that we need to invent a workaround for it so that we
don't break working realpath() implementations.
And to do that I need to reproduce it myself and investigate it using
GDB.



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

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


#42624 [Opn-Fbk]: fwrite to a Stream create a wrong checksum

2007-09-12 Thread jani
 ID:   42624
 Updated by:   [EMAIL PROTECTED]
 Reported By:  philipp at caha dot info
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

See Example 2368. Using TCP server sockets on page:

http://www.php.net/stream_socket_server

Try with that example. And make sure there aren't any
firewalls/proxies/etc. interfering.


Previous Comments:


[2007-09-11 17:28:30] philipp at caha dot info

Description:

I write Data to a Socket, but it comes some incorrect checksum (dump
with tcpdump)

Dump :

00:16:76:df:12:eb (oui Unknown)  00:04:23:c1:72:23 (oui Unknown),
ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl  64, id 63018, offset
0, flags [DF], proto: TCP (6), length: 50) 10.10.1.22.dnsix 
mk089144217176.a1.net.sbl: P, cksum 0x3e85 (incorrect (- 0x261b),
1:11(10) ack 118 win 5840 urg 10
0x:  4500 0032 f62a 4000 4006 063b 0a0a 0116
0x0010:  5990 d9b0 005a 040f 1cc2 054c 0005 0ecc
0x0020:  5038 16d0 3e85 000a 3031 3334 3036 3936
0x0030:  3233

Reproduce code:
---
$socket = stream_socket_server('tcp://10.10.1.22:90', $errno,
$errstr);
$conn = @stream_socket_accept($socket, 1);
$message = fread($conn, 8192);
$answer = 0134069623;
fwrite($conn, $answer);
fclose ($conn);
fclose($socket);






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


#42547 [Opn-Fbk]: ext/iconv/iconv.c:2426: undefined reference to `libiconv_open'

2007-09-12 Thread jani
 ID:   42547
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dawidpachla at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: CentOS 5 with DirectAdmin
 PHP Version:  5.2.4
 New Comment:

This is wrong way to pass base install dir:
-with-curl=/usr/local/lib 

This is the correct way:

-with-curl=/usr/local

Fix these in your configure line. (There is no --with/--enable option
in PHP configure that expects it to have /lib in the path!)


Previous Comments:


[2007-09-11 20:27:06] dawidpachla at gmail dot com

it's /usr/local/lib



[2007-09-05 13:24:13] [EMAIL PROTECTED]

You seem to have libiconv in your system. Where is it located and is
that location in LD_LIBRARY_PATH? (or /etc/ld.so.conf* file or
directory..)




[2007-09-04 19:01:00] dawidpachla at gmail dot com

Description:

I use CentOS 5 with newest DirecAdmin, apache2, mod_security and php
5.2.3 (when I upgraded from 4.4.7 to 5.2.3 everything was ok).

Everything is compiling fine until:

 reference to `libiconv'
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1211:
undefined reference to `libiconv'
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1242:
undefined reference to `libiconv'
ext/iconv/.libs/iconv.o:/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1286:
more undefined references to `libiconv' follow
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:2426:
undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

This is my configuration file:

./configure \
--with-apxs2 \
--with-curl \
--with-curl=/usr/local/lib \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit








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


#42642 [Fbk-Opn]: sybase_connect crashes when compiled with with-sybase and with-ldap

2007-09-12 Thread roberto dot valsania at mail dot wind dot it
 ID:   42642
 User updated by:  roberto dot valsania at mail dot wind dot it
 Reported By:  roberto dot valsania at mail dot wind dot it
-Status:   Feedback
+Status:   Open
 Bug Type: Sybase (dblib) related
 Operating System: FEDORA CORE 7
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

As i wrote i have the same sybase libs ( with ldap resolution) but the
old PHP 5.1.6 ( on FEDORA CORE 5) and it works.
I could try to compile this PHP with the FEDORA CORE 5 ( and the old
openldap libs ) and see what happen


Previous Comments:


[2007-09-12 11:05:23] [EMAIL PROTECTED]

Did you have same sybase libs in the other system too?
It seems to me that there's simply a conflict between openldap and
sybase's own ldap implementation and there's not much we can do about
that..



[2007-09-12 09:44:39] roberto dot valsania at mail dot wind dot it

Note that to have ldap support sybase client shuld be 12.5.1 or 15.
I made test with Sybase OpenClient 15
The same configuration ( enable ldap and sybase ) with php 5.1.6 and
fedora core 5 works



[2007-09-12 09:31:47] roberto dot valsania at mail dot wind dot it

Description:

PHP sybase_conect Crash when compiled with –with-sybase and –with-ldap
and sybase name resolution is done via LDAP

If PHP is compiled without ldap extension all works. 
If Sybase resolution is done via interface file and not via LDAP all
works

To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
instead of a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?





Reproduce code:
---
To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
(because it don't find the ldap server correct configuration) instead of
a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?

Expected result:

an error or a sucessfull connection

Actual result:
--
A segmentation fault .
Here the backtrace :

[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...
Using host libthread_db library /lib/libthread_db.so.1.
warning: not using untrusted file
/root/Development/php5.2-200709120830/.gdbinit
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
(gdb) bt
#0  0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
#1  0x00473092 in ldap_send_initial_request () from
/usr/lib/libldap-2.3.so.0
#2  0x00468248 in ldap_sasl_bind () from /usr/lib/libldap-2.3.so.0
#3  0x0066bc75 in ldap_simple_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0/lib3p/libsybaseldap.so
#4  0x00267473 in gdd_bind ()
   from
/sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdldap.so.15.0.3
#5  0x00153f5d in drv_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#6  0x00153ab3 in dcl___bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#7  0x00153b7a in dcl__bind_sync ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#8  0x0015a11f in dcl_sess_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#9  

#42502 [Opn-Asn]: GCC no longer implements varargs.h

2007-09-12 Thread jani
 ID:   42502
 Updated by:   [EMAIL PROTECTED]
 Reported By:  supportnew at byethost dot com
-Status:   Open
+Status:   Assigned
 Bug Type: mbstring related
 Operating System: debian linux 4
 PHP Version:  5.2.4
 Assigned To:  hirokawa
 New Comment:

Rui, feedback given.


Previous Comments:


[2007-09-11 20:44:55] supportnew at byethost dot com

ahh , the file 

main/php_config.h exists , and

the following values are present

/* Define if stdarg.h is available */
/* #undef HAVE_STDARG_PROTOTYPES */


/* Define if you have the stdarg.h header file.  */
#define HAVE_STDARG_H 1



[2007-09-11 20:39:39] supportnew at byethost dot com

Hi ,

 find -name config.h
./ext/pcre/pcrelib/config.h
./ext/pdo_sqlite/sqlite/src/config.h
./ext/bcmath/libbcmath/src/config.h
./ext/mbstring/libmbfl/config.h
./ext/mbstring/oniguruma/win32/config.h
./ext/mbstring/oniguruma/config.h
./ext/sqlite/libsqlite/src/config.h

I cant see a file called main/config.h could this be the cause ? 

This is a direct extract from php-5.2.4.tar.bz2 sources.



[2007-09-04 14:06:54] [EMAIL PROTECTED]

Please show me if HAVE_STDARG_PROTOTYPES and HAVE_STDARG_H are
 defined or not in your main/config.h

I think that HAVE_STDARG_PROTOTYPES isn't properly defined.
If it is not defined stdarg.h is not existing in you include path.




[2007-09-03 08:17:14] [EMAIL PROTECTED]

Assigned to the mbstring maintainer.



[2007-08-31 18:07:51] supportnew at byethost dot com

Description:

When compiling the stable 5.2.4 branch of php the compile process dies
at the same point.


I have tried this on 3 seperate servers (using the different versions
of GCC )

Reproduce code:
---
download stable, configure with

./configure  --prefix=/usr/phpapache2
--with-apxs2=/usr/local/apache2/bin/apxs --disable-cgi
--with-config-file-path=/etc/php4/apache --enable-inline-optimization
--enable-memory-limit --disable-debug --disable-rpath --disable-static
--with-layout=GNU --with-pear=/usr/share/php --enable-calendar
--enable-track-vars --enable-trans-sid --enable-bcmath --without-bz2
--disable-ctype --with-iconv --enable-exif --disable-ftp --with-gettext
--enable-mbstring --disable-sockets --disable-wddx --with-xsl
--with-expat-dir=/usr --disable-yp --with-zlib --without-pgsql
--without-openssl --with-zip=/usr --disable-dbx
--with-exec-dir=/usr/lib/php4/libexec --with-mcrypt --without-sybase-ct
--with-mysql=/usr --with-zlib-dir=/usr --with-gd=/usr/local/gd
--with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr
--with-ttf=shared,/usr --with-t1lib --with-freetype-dir=/usr
--enable-gd-native-ttf --with-sqlite --with-mysqli --with-xsl
--enable-ctype --with-pdo-mysql --without-pdo-sqlite --with-pspell

using 

gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


config.log can be found here

http://byet.org/config.log

Expected result:

no errors.

Actual result:
--
In file included from
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:37:
/usr/lib/gcc/i486-linux-gnu/4.1.2/include/varargs.h:4:2: error: #error
GCC no longer implements varargs.h.
/usr/lib/gcc/i486-linux-gnu/4.1.2/include/varargs.h:5:2: error: #error
Revise your code to use stdarg.h.
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c: In function
'onig_error_code_to_str':
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:196: error: expected
declaration specifiers before 'va_dcl'
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:265: error: expected
'=', ',', ';', 'asm' or '__attribute__' before 'OnigUChar'
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:271: error: expected
declaration specifiers before 'va_dcl'
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:270: error:
declaration for parameter 'fmt' but no such parameter
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:269: error:
declaration for parameter 'pat_end' but no such parameter
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:268: error:
declaration for parameter 'pat' but no such parameter
/root/php-5.2.4/ext/mbstring/oniguruma/regerror.c:267: error:
declaration for parameter 'enc' but no such parameter

#42639 [Fbk-Opn]: include in if-expression problem

2007-09-12 Thread koraktor at web dot de
 ID:   42639
 User updated by:  koraktor at web dot de
 Reported By:  koraktor at web dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP SP2
 PHP Version:  5.2.4
 New Comment:

Yes, I know that include is a language construct. But in fact, while
writing a small example, I realized that there is another problem...

While my original code complains about a missing class (which should
have been included), this simple test code causes the following error:
Failed opening '' for inclusion. IMHO this hints that the parser
neglects a strict syntax check for this construction. The closing
bracket of the if-expression seems to start the include, while binary
and () does not. So this bug seems to be associated with #28845 -
which is fixed.

e.g.
if((include(code_to_include.php))  ...) works.

But my syntax should either throw a syntax error (instead of an
inclusion error) or it should be understood by the parser.


Previous Comments:


[2007-09-12 11:07:04] [EMAIL PROTECTED]

You do realize that include is a language construct and not a regular
function? Please provide short but _complete_ example script which shows
the problem clearly.



[2007-09-12 08:44:02] koraktor at web dot de

Description:

Included code in an if-expression is only available in the if-branch
not the if-expression itself.

Reproduce code:
---
if(file_exists(code_to_include.php)
 include(code_to_include.php)
 check_included_code())
{
  task();
}

Expected result:

Included code from code_to_include.php should be accessible in
check_included_code() and anything afterwards.

Actual result:
--
Included code from code_to_include.php is accessible in task(), but
not in check_included_code().





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


#42642 [Opn]: sybase_connect crashes when compiled with with-sybase and with-ldap

2007-09-12 Thread roberto dot valsania at mail dot wind dot it
 ID:   42642
 User updated by:  roberto dot valsania at mail dot wind dot it
 Reported By:  roberto dot valsania at mail dot wind dot it
 Status:   Open
 Bug Type: Sybase (dblib) related
 Operating System: FEDORA CORE 7
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

New Tests with different openldap libs :

With fedora 5 and openldap 2.3.19-4 - works
With fedora 7 and openldap 2.3.34-3 - crash

All the other sybase utility works well in all the environments ( eg .
isql )


Previous Comments:


[2007-09-12 12:29:26] roberto dot valsania at mail dot wind dot it

As i wrote i have the same sybase libs ( with ldap resolution) but the
old PHP 5.1.6 ( on FEDORA CORE 5) and it works.
I could try to compile this PHP with the FEDORA CORE 5 ( and the old
openldap libs ) and see what happen



[2007-09-12 11:05:23] [EMAIL PROTECTED]

Did you have same sybase libs in the other system too?
It seems to me that there's simply a conflict between openldap and
sybase's own ldap implementation and there's not much we can do about
that..



[2007-09-12 09:44:39] roberto dot valsania at mail dot wind dot it

Note that to have ldap support sybase client shuld be 12.5.1 or 15.
I made test with Sybase OpenClient 15
The same configuration ( enable ldap and sybase ) with php 5.1.6 and
fedora core 5 works



[2007-09-12 09:31:47] roberto dot valsania at mail dot wind dot it

Description:

PHP sybase_conect Crash when compiled with –with-sybase and –with-ldap
and sybase name resolution is done via LDAP

If PHP is compiled without ldap extension all works. 
If Sybase resolution is done via interface file and not via LDAP all
works

To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
instead of a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?





Reproduce code:
---
To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
(because it don't find the ldap server correct configuration) instead of
a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?

Expected result:

an error or a sucessfull connection

Actual result:
--
A segmentation fault .
Here the backtrace :

[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...
Using host libthread_db library /lib/libthread_db.so.1.
warning: not using untrusted file
/root/Development/php5.2-200709120830/.gdbinit
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
(gdb) bt
#0  0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
#1  0x00473092 in ldap_send_initial_request () from
/usr/lib/libldap-2.3.so.0
#2  0x00468248 in ldap_sasl_bind () from /usr/lib/libldap-2.3.so.0
#3  0x0066bc75 in ldap_simple_bind ()
   from /sbrdbms/sybase/OpenClient15/OCS-15_0/lib3p/libsybaseldap.so
#4  0x00267473 in gdd_bind ()
   from
/sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdldap.so.15.0.3
#5  0x00153f5d in drv_bind ()
   from 

#42634 [Fbk-Opn]: Apache 2.2.6 + PHP 5.2.4 = 302

2007-09-12 Thread php at transpect dot com
 ID:   42634
 User updated by:  php at transpect dot com
 Reported By:  php at transpect dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Gentoo Linux
 PHP Version:  5.2.4
 New Comment:

Hi Jani, I used the same standard installation steps for PHP 5.2.3 and
5.2.4 - and also now php5.2-200709120230, which also produces this
strange 302 result. I configure as above, make, make test (all versions
failed a couple of tests and I sent in the reports), make install (then
eliminate the redundant module load that make install keeps putting in
httpd.conf - it should check first).

I'm sure he combination works for most people, or there'd be other
reports of trouble by now. That something different in the PHP module
could cause HTML pages to load wrong seems like there has to be an
Apache bug involved - it shouldn't be possible for a module to cause a
misfire in stuff it shouldn't even handle. There must be something
peculiar to my system, but I'm really scratching my head on what could
cause it to work fine with 5.2.3 but serve 302's rather than pages with
5.2.4.


Previous Comments:


[2007-09-12 11:39:10] [EMAIL PROTECTED]

Are you sure you have installed PHP correctly? That same combination
works just fine for me..



[2007-09-12 01:42:12] php at transpect dot com

Description:

Apache 2.2.6 with php 5.2.3's libphp5.so works fine. But with 5.2.4
Apache starts without error, but every request to the server (whether to
a PHP or HTML page) results in a blank page in the browser, and a 302
(redirect) rather than a 200 response in the log. In all respects this
is the same system except for the switch between 5.2.3 and 5.2.4.


Reproduce code:
---
These are the configuration options used - building by hand in each
case:

HTTPD
./configure --enable-so --enable-ssl --enable-rewrite
PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--disable-cgi







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


#42642 [Opn]: sybase_connect crashes when compiled with with-sybase and with-ldap

2007-09-12 Thread roberto dot valsania at mail dot wind dot it
 ID:   42642
 User updated by:  roberto dot valsania at mail dot wind dot it
 Reported By:  roberto dot valsania at mail dot wind dot it
 Status:   Open
 Bug Type: Sybase (dblib) related
 Operating System: FEDORA CORE 7
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

I made some another tests with the same environment ( Fedora core 7 and
openldap 2.3.34-3 and sybase ldap names resolution):
- perl with dbi/dbd modules works.
- php works if compiled with 
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ 
( that means without phpldap extension)

It seems more some kind of incompatibility between php ldap and sybase
ldap


Previous Comments:


[2007-09-12 13:16:27] roberto dot valsania at mail dot wind dot it

New Tests with different openldap libs :

With fedora 5 and openldap 2.3.19-4 - works
With fedora 7 and openldap 2.3.34-3 - crash

All the other sybase utility works well in all the environments ( eg .
isql )



[2007-09-12 12:29:26] roberto dot valsania at mail dot wind dot it

As i wrote i have the same sybase libs ( with ldap resolution) but the
old PHP 5.1.6 ( on FEDORA CORE 5) and it works.
I could try to compile this PHP with the FEDORA CORE 5 ( and the old
openldap libs ) and see what happen



[2007-09-12 11:05:23] [EMAIL PROTECTED]

Did you have same sybase libs in the other system too?
It seems to me that there's simply a conflict between openldap and
sybase's own ldap implementation and there's not much we can do about
that..



[2007-09-12 09:44:39] roberto dot valsania at mail dot wind dot it

Note that to have ldap support sybase client shuld be 12.5.1 or 15.
I made test with Sybase OpenClient 15
The same configuration ( enable ldap and sybase ) with php 5.1.6 and
fedora core 5 works



[2007-09-12 09:31:47] roberto dot valsania at mail dot wind dot it

Description:

PHP sybase_conect Crash when compiled with –with-sybase and –with-ldap
and sybase name resolution is done via LDAP

If PHP is compiled without ldap extension all works. 
If Sybase resolution is done via interface file and not via LDAP all
works

To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
instead of a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?





Reproduce code:
---
To reproduce :

1)  Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap  

Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com 

Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
(because it don't find the ldap server correct configuration) instead of
a stack trace

2)  Run the following simple php script
?php

$my_server='DBA_SUN_TEST' ;
$passwd='xx';
$login='sa';


$db=sybase_connect($my_server,$login, $passwd) ;
sybase_close($db);

?

Expected result:

an error or a sucessfull connection

Actual result:
--
A segmentation fault .
Here the backtrace :

[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux-gnu...
Using host libthread_db library /lib/libthread_db.so.1.
warning: not using untrusted file
/root/Development/php5.2-200709120830/.gdbinit
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from

#42641 [Fbk-Opn]: Further info

2007-09-12 Thread robin_fernandes at uk dot ibm dot com
 ID:   42641
 User updated by:  robin_fernandes at uk dot ibm dot com
-Summary:  ob_start(): inconsistent behaviour with undefined
   callbacks
 Reported By:  robin_fernandes at uk dot ibm dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Output Control
 Operating System: Windows
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

Hi,

Thanks for your reply. As documentation isn't always complete/up to
date, I looked at the implementation of ob_start() to understand its
behaviour.

The code in the 5.2 version of php_ob_init() in output.c splits strings
on ',' and attempts to process each part seaparately (line 485). For
arrays, if a pair does not represent a method, a comment explicitly
states init all array elements recursively (line 516).

The prototype in the 5.2 code currently looks like this:
bool ob_start([ string|array user_function [, int chunk_size [, bool
erase]]])

The following testcase shows this behaviour in action:
http://pastebin.com/f4f15a025

Regarding tuning up the error message display params, I'm currently
using: error_reporting  = E_ALL | E_STRICT / display_errors = 1 . Would
you expect see warnings/notices with my testcase?

I'll happily raise a documentation bug to ensure this is covered.
Alternatively, perhaps the fact that this behaviour is available is
itself a bug? Note that this is raised against php5 (not 6 where the
output buffering implementation seems to be a bit different).


Previous Comments:


[2007-09-12 11:17:04] [EMAIL PROTECTED]

Let's start with the prototype for this function:

bool ob_start ( [callback $output_callback [, int $chunk_size [, bool
$erase]]] )

The first parameter is callback type, so it expects either a string
(function name) or array (object, method).

More information about callback pseudo-type: 
http://www.php.net/callback

I don't know where you got the idea that you can pass multiple
callbacks in there. It's not said to work like that anywhere in the
manual at least. :)

Please fix your example script accordingly (and tune up your
display_errors / error_reporting levels..).



[2007-09-12 09:15:35] robin_fernandes at uk dot ibm dot com

Description:

ob_start() can initialize multiple output buffers in a single call
using a comma delimited list of output callbacks, as follows:
  ob_start('f,f,f');
where function f() is a defined function.

However, behaviour when passing an undefined callback is inconsistent:
  ob_start('non_existent,f');
returns false and initializes no output buffers, whereas
  ob_start('non_existent,f,f');
returns true and initializes 2 output buffers with f as a callback.

Using arrays, the behaviour is consistent. The following both return
false and initialize no output buffers:
  ob_start(array('non_existent', 'f'));
  ob_start(array('non_existent', 'f', 'f'));

Tested on Windows XP on PHP 5.2.5-dev (cli) (built: Sep 12 2007
04:04:36).

Reproduce code:
---
?php
function f($str) {
  return $str;
}
function checkAndClean() {
  print_r(ob_list_handlers());
  while (ob_get_level()0) {
ob_end_flush();
  }
}
var_dump(ob_start(array('non_existent', 'f')));
checkAndClean();
var_dump(ob_start(array('non_existent', 'f', 'f')));
checkAndClean();
var_dump(ob_start('non_existent,f'));
checkAndClean();
var_dump(ob_start('non_existent,f,f'));  //bug: expecting false with no
output buffers. Actually returns true and initialises 2 output buffers.
checkAndClean();
?

Expected result:

bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)

Actual result:
--
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(true)
Array
(
[0] = f
[1] = f
)





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


#42641 [Opn]: ob_start(): inconsistent behaviour with undefined callbacks

2007-09-12 Thread robin_fernandes at uk dot ibm dot com
 ID:   42641
 User updated by:  robin_fernandes at uk dot ibm dot com
-Summary:  Further info
 Reported By:  robin_fernandes at uk dot ibm dot com
 Status:   Open
 Bug Type: Output Control
 Operating System: Windows
 PHP Version:  5CVS-2007-09-12 (snap)
 New Comment:

Accidentally changed the summary - changing it back.


Previous Comments:


[2007-09-12 14:06:29] robin_fernandes at uk dot ibm dot com

Hi,

Thanks for your reply. As documentation isn't always complete/up to
date, I looked at the implementation of ob_start() to understand its
behaviour.

The code in the 5.2 version of php_ob_init() in output.c splits strings
on ',' and attempts to process each part seaparately (line 485). For
arrays, if a pair does not represent a method, a comment explicitly
states init all array elements recursively (line 516).

The prototype in the 5.2 code currently looks like this:
bool ob_start([ string|array user_function [, int chunk_size [, bool
erase]]])

The following testcase shows this behaviour in action:
http://pastebin.com/f4f15a025

Regarding tuning up the error message display params, I'm currently
using: error_reporting  = E_ALL | E_STRICT / display_errors = 1 . Would
you expect see warnings/notices with my testcase?

I'll happily raise a documentation bug to ensure this is covered.
Alternatively, perhaps the fact that this behaviour is available is
itself a bug? Note that this is raised against php5 (not 6 where the
output buffering implementation seems to be a bit different).



[2007-09-12 11:17:04] [EMAIL PROTECTED]

Let's start with the prototype for this function:

bool ob_start ( [callback $output_callback [, int $chunk_size [, bool
$erase]]] )

The first parameter is callback type, so it expects either a string
(function name) or array (object, method).

More information about callback pseudo-type: 
http://www.php.net/callback

I don't know where you got the idea that you can pass multiple
callbacks in there. It's not said to work like that anywhere in the
manual at least. :)

Please fix your example script accordingly (and tune up your
display_errors / error_reporting levels..).



[2007-09-12 09:15:35] robin_fernandes at uk dot ibm dot com

Description:

ob_start() can initialize multiple output buffers in a single call
using a comma delimited list of output callbacks, as follows:
  ob_start('f,f,f');
where function f() is a defined function.

However, behaviour when passing an undefined callback is inconsistent:
  ob_start('non_existent,f');
returns false and initializes no output buffers, whereas
  ob_start('non_existent,f,f');
returns true and initializes 2 output buffers with f as a callback.

Using arrays, the behaviour is consistent. The following both return
false and initialize no output buffers:
  ob_start(array('non_existent', 'f'));
  ob_start(array('non_existent', 'f', 'f'));

Tested on Windows XP on PHP 5.2.5-dev (cli) (built: Sep 12 2007
04:04:36).

Reproduce code:
---
?php
function f($str) {
  return $str;
}
function checkAndClean() {
  print_r(ob_list_handlers());
  while (ob_get_level()0) {
ob_end_flush();
  }
}
var_dump(ob_start(array('non_existent', 'f')));
checkAndClean();
var_dump(ob_start(array('non_existent', 'f', 'f')));
checkAndClean();
var_dump(ob_start('non_existent,f'));
checkAndClean();
var_dump(ob_start('non_existent,f,f'));  //bug: expecting false with no
output buffers. Actually returns true and initialises 2 output buffers.
checkAndClean();
?

Expected result:

bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)

Actual result:
--
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(false)
Array
(
)
bool(true)
Array
(
[0] = f
[1] = f
)





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


#42631 [Fbk-Opn]: mssql_connect causes stack smashing attack protection

2007-09-12 Thread gabe at mudbugmedia dot com
 ID:   42631
 User updated by:  gabe at mudbugmedia dot com
 Reported By:  gabe at mudbugmedia dot com
-Status:   Feedback
+Status:   Open
 Bug Type: MSSQL related
 Operating System: Gentoo Linux 2.6.17-hardened-r1
 PHP Version:  5.2.4
 New Comment:

Same behavior occurs on the supplied dev link downloaded on 2007-09-12

configure settings for compile:

'./configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--
mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--
sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--
with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-
php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' 
'--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' 
'--with-curl' '--without-curlwrappers' '--disable-dbase' '--disable-
exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--
disable-ftp' '--with-gettext' '--without-gmp' '--disable-hash' '--
without-iconv' '--disable-ipv6' '--disable-json' '--without-kerberos' 
'--enable-mbstring' '--with-mcrypt' '--without-mhash' '--without-msql'

'--with-mssql' '--without-ncurses' '--with-openssl' '--with-openssl-
dir=/usr' '--disable-pcntl' '--disable-pdo' '--without-pgsql' '--
without-pspell' '--without-recode' '--disable-reflection' '--disable-
simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--
disable-sockets' '--disable-spl' '--without-sybase' '--without-sybase-
ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--
without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-
xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--without-xsl' '-
-disable-zip' '--with-zlib' '--disable-debug' '--without-cdb' '--
without-db4' '--without-flatfile' '--without-gdbm' '--without-inifile'

'--without-qdbm' '--without-freetype-dir' '--without-t1lib' '--
disable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--
without-xpm-dir' '--with-gd' '--with-mysql=/usr' '--with-mysql-
sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-readline'

'--without-libedit' '--without-mm' '--without-sqlite' '--with-pic'


Previous Comments:


[2007-09-12 11:40:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2007-09-11 20:31:51] gabe at mudbugmedia dot com

Description:

When executing a PHP script over Apache 2.2 SAPI (not CGI), 
mssql_connect() causes Apache to exit with the following in the 
syslog:

apache2: stack smashing attack in function tds_write_packet - 
terminated

This occurs only after successfully connecting to a valid MSSQL 
server, but before authentication information is verified; supplying 
invalid username/password will still cause the error to trigger.  
However, entering in a non-listening IP to connect to will return 
false and continue execution.

Gentoo developers identified this bug as PHP instead of Apache, as 
Apache is not responsible for the calling of the tds_write_packet() 
function

Bug originally submitted here, but was reclassified as being UPSTREAM:
http://bugs.gentoo.org/show_bug.cgi?id=191988


an strace of the process (capture started after initial connect 
`netstat -p` after connection was the only way I could determine which

apache process to strace):
Process 11348 attached - interrupt to quit
poll([{fd=1027, events=POLLIN, revents=POLLIN}], 1, 30) = 1
read(1027, Host: kokiri.org\r\n, 8000) = 18
poll([{fd=1027, events=POLLIN, revents=POLLIN}], 1, 30) = 1
read(1027, \r\n, 8000)= 2
gettimeofday({1189537767, 899761}, NULL) = 0
gettimeofday({1189537767, 899905}, NULL) = 0
stat64(/www/kokiri.org/htdocs/findwork.php, {st_mode=S_IFREG|0664, 
st_size=175, ...}) = 0
open(/www/.htaccess, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file

or directory)
open(/www/kokiri.org/.htaccess, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open(/www/kokiri.org/htdocs/.htaccess, O_RDONLY|O_LARGEFILE) = 1028
fstat64(1028, {st_mode=S_IFREG|0664, st_size=79, ...}) = 0
read(1028, RewriteEngine on\n\nRewriteRule ro..., 4096) = 79
read(1028, , 4096)= 0
close(1028) = 0
open(/www/kokiri.org/htdocs/findwork.php/.htaccess, 
O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) =

0
rt_sigaction(SIGPROF, {0x503ec97b, [PROF], SA_RESTORER|SA_RESTART, 
0x50aeab68}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
getcwd(/, 4095)   = 2
chdir(/www/kokiri.org/htdocs) = 0
setitimer(ITIMER_PROF, {it_interval={0, 

#42634 [Opn]: Apache 2.2.6 + PHP 5.2.4 = 302

2007-09-12 Thread php at transpect dot com
 ID:   42634
 User updated by:  php at transpect dot com
 Reported By:  php at transpect dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Gentoo Linux
 PHP Version:  5.2.4
 New Comment:

Here are the tests failed by 5.2.4 on my system, just in case they are
pertinent:

Bug #16069 (ICONV transliteration failure)
[ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Bug #41567 (json_encode() double conversion is inconsistent with PHP)
[ext/json/tests/bug41567.phpt]
Test lstat() and stat() functions: usage variations - effects of
touch() on link [ext/standard/tests/file/lstat_stat_variation6.phpt]


Previous Comments:


[2007-09-12 13:55:18] php at transpect dot com

Hi Jani, I used the same standard installation steps for PHP 5.2.3 and
5.2.4 - and also now php5.2-200709120230, which also produces this
strange 302 result. I configure as above, make, make test (all versions
failed a couple of tests and I sent in the reports), make install (then
eliminate the redundant module load that make install keeps putting in
httpd.conf - it should check first).

I'm sure he combination works for most people, or there'd be other
reports of trouble by now. That something different in the PHP module
could cause HTML pages to load wrong seems like there has to be an
Apache bug involved - it shouldn't be possible for a module to cause a
misfire in stuff it shouldn't even handle. There must be something
peculiar to my system, but I'm really scratching my head on what could
cause it to work fine with 5.2.3 but serve 302's rather than pages with
5.2.4.



[2007-09-12 11:39:10] [EMAIL PROTECTED]

Are you sure you have installed PHP correctly? That same combination
works just fine for me..



[2007-09-12 01:42:12] php at transpect dot com

Description:

Apache 2.2.6 with php 5.2.3's libphp5.so works fine. But with 5.2.4
Apache starts without error, but every request to the server (whether to
a PHP or HTML page) results in a blank page in the browser, and a 302
(redirect) rather than a 200 response in the log. In all respects this
is the same system except for the switch between 5.2.3 and 5.2.4.


Reproduce code:
---
These are the configuration options used - building by hand in each
case:

HTTPD
./configure --enable-so --enable-ssl --enable-rewrite
PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--disable-cgi







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


#42634 [Opn]: Apache 2.2.6 + PHP 5.2.4 = 302

2007-09-12 Thread php at transpect dot com
 ID:   42634
 User updated by:  php at transpect dot com
 Reported By:  php at transpect dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Gentoo Linux
 PHP Version:  5.2.4
 New Comment:

Maybe narrowing it down:

PHP 5.2.4 built against Apache 2.2.4 works - both with Apache 2.2.4 and
2.2.6. (The PHP 5.2.3 module that works with both Apaches was also built
against Apache 2.2.4.) So the bug only enters building PHP 5.2.4 (and
last night's snapshot) against Apache 2.2.6.


Previous Comments:


[2007-09-12 14:36:16] php at transpect dot com

Here are the tests failed by 5.2.4 on my system, just in case they are
pertinent:

Bug #16069 (ICONV transliteration failure)
[ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Bug #41567 (json_encode() double conversion is inconsistent with PHP)
[ext/json/tests/bug41567.phpt]
Test lstat() and stat() functions: usage variations - effects of
touch() on link [ext/standard/tests/file/lstat_stat_variation6.phpt]



[2007-09-12 13:55:18] php at transpect dot com

Hi Jani, I used the same standard installation steps for PHP 5.2.3 and
5.2.4 - and also now php5.2-200709120230, which also produces this
strange 302 result. I configure as above, make, make test (all versions
failed a couple of tests and I sent in the reports), make install (then
eliminate the redundant module load that make install keeps putting in
httpd.conf - it should check first).

I'm sure he combination works for most people, or there'd be other
reports of trouble by now. That something different in the PHP module
could cause HTML pages to load wrong seems like there has to be an
Apache bug involved - it shouldn't be possible for a module to cause a
misfire in stuff it shouldn't even handle. There must be something
peculiar to my system, but I'm really scratching my head on what could
cause it to work fine with 5.2.3 but serve 302's rather than pages with
5.2.4.



[2007-09-12 11:39:10] [EMAIL PROTECTED]

Are you sure you have installed PHP correctly? That same combination
works just fine for me..



[2007-09-12 01:42:12] php at transpect dot com

Description:

Apache 2.2.6 with php 5.2.3's libphp5.so works fine. But with 5.2.4
Apache starts without error, but every request to the server (whether to
a PHP or HTML page) results in a blank page in the browser, and a 302
(redirect) rather than a 200 response in the log. In all respects this
is the same system except for the switch between 5.2.3 and 5.2.4.


Reproduce code:
---
These are the configuration options used - building by hand in each
case:

HTTPD
./configure --enable-so --enable-ssl --enable-rewrite
PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--disable-cgi







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


#42547 [Fbk-Opn]: ext/iconv/iconv.c:2426: undefined reference to `libiconv_open'

2007-09-12 Thread dawidpachla at gmail dot com
 ID:   42547
 User updated by:  dawidpachla at gmail dot com
 Reported By:  dawidpachla at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: CentOS 5 with DirectAdmin
 PHP Version:  5.2.4
 New Comment:

I edited the configure file, so it looks like that:

#!/bin/sh
./configure \
--with-apxs2 \
--with-curl \
--with-curl=/usr/local \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit \
--enable-libxml


But I still get the same error when i try to compile it:

/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1242:
undefined   
  reference to `libiconv'
ext/iconv/.libs/iconv.o:/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/

   iconv.c:1286: more undefined references to `libiconv' follow
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:2426:
undefined   
  reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[EMAIL PROTECTED] customapache]#


Previous Comments:


[2007-09-12 11:57:02] [EMAIL PROTECTED]

This is wrong way to pass base install dir:
-with-curl=/usr/local/lib 

This is the correct way:

-with-curl=/usr/local

Fix these in your configure line. (There is no --with/--enable option
in PHP configure that expects it to have /lib in the path!)



[2007-09-11 20:27:06] dawidpachla at gmail dot com

it's /usr/local/lib



[2007-09-05 13:24:13] [EMAIL PROTECTED]

You seem to have libiconv in your system. Where is it located and is
that location in LD_LIBRARY_PATH? (or /etc/ld.so.conf* file or
directory..)




[2007-09-04 19:01:00] dawidpachla at gmail dot com

Description:

I use CentOS 5 with newest DirecAdmin, apache2, mod_security and php
5.2.3 (when I upgraded from 4.4.7 to 5.2.3 everything was ok).

Everything is compiling fine until:

 reference to `libiconv'
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1211:
undefined reference to `libiconv'
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1242:
undefined reference to `libiconv'
ext/iconv/.libs/iconv.o:/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:1286:
more undefined references to `libiconv' follow
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/usr/local/directadmin/customapache/php-5.2.4/ext/iconv/iconv.c:2426:
undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

This is my configuration file:

./configure \
--with-apxs2 \
--with-curl \
--with-curl=/usr/local/lib \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit








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


#39858 [Com]: Lost connection to MySQL server during query by a repeated call stored proced

2007-09-12 Thread timo at hhesse dot de
 ID:   39858
 Comment by:   timo at hhesse dot de
 Reported By:  develar at gmail dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows XP SP2
 PHP Version:  5.2.0
 Assigned To:  wez
 New Comment:

Well, months pass by and nothing happens... ;-(


Previous Comments:


[2007-07-14 20:12:41] nitel_defect at yahoo dot com

What's the status of this bug?
I mean the part about any query ran after a fetchAll from a stored
procedure call, saying that there are still unfetched results. And that
happens even with a nextRowset call :)
The bug still exists in the last library from snaps, on Windows.



[2007-07-10 13:38:46] matt dot keeble at gmail dot com

As an update to this, I'm not sure that this is a bug in PHP at all - I
believe it's a bug with MySQL. Have stumbled across this bug report
today after receiving MySQL lost connections from the MySQL command
line, and from Navicat Terminal - in both cases there was no PHP
involved at all, just an SP that calls a function in a loop which
subsequently calls another function. The SP returns the first row, but
then dies with the error message and goes into an irretrievable loop (in
Navicat).

Don't know if this will help, but thought I would share...



[2007-06-21 12:58:38] timo at hhesse dot de

Well, this is very disappointing. A new PHP version is out and this
stupid bug has not been fixed although a solution seems to be found by
mike at we11er dot co dot uk.

I can't use PHP5 without this hacked dll on our servers. Seems like no
one feels responsible for developers on windows servers. 
There's no bug on linux so what are you talking about...?



[2007-05-18 21:12:31] paulsidekick at gmail dot com

I am still not able to issue two stored procedures in a row using PDO
and mysql 5.0.31, php 5.2.1 and windows server 2003 when using the php
pdo_mysql.dll extension.  Is there any fix for this planned?  It has
been a very long time since it was first noted. If there is a solution
other than using a hacked DLL with no source code, can somebody please
advice.  This is the simplest way to see it happen.

$stmt = $myPdoConnection-query(CALL myStoredProc ('x',  'y'));

//this returns results
print_r($stmt-fetchAll());

//this does not - says mysql lost connection
print_r($stmt-fetchAll());

If I do this with SELECT statements instead I get no problem.  I
believe that there is an additional row set send back with stored
procedures from mysql that needs to be interated over in order to issue
the next statement.  However, I cannot access them with 

$stmt-nextRowset();

as I get Warning: PDOStatement::nextRowset()
[function.PDOStatement-nextRowset]: SQLSTATE[HYC00]: Optional feature
not implemented in 

Please help.



[2007-04-09 19:13:53] jaylehvee at srgtampa dot com

I am using this modified DLL, above, and it works great, in most
regards. The core issue still exists, however. Mulitple calls to stored
procedures are still causing db connection loss. I've had to go
lazy-load kuh-ray-zee on my objects to avoid connection failures. I
shouldn't have to use the wrong patterns in order to work around a
faulty db driver.

Mike, any chance you can post your hacked source somewhere?



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

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


#41350 [Com]: Error in my_thread_global_end()

2007-09-12 Thread Chicken at TheMooFarm dot com
 ID:   41350
 Comment by:   Chicken at TheMooFarm dot com
 Reported By:  graham at directhostinguk dot com
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.3
 Assigned To:  scottmac
 New Comment:

This is sucking real hard

I am using 
Mysql Ver5.041-community-nt
apache_2.2.4-win32-x86-no_ssl
php-5.2.4-win32-installer.msi

TRIED ALSO from Mysql's site
php_5.2.0_mysqli_5.0.27-win32.zip

I do a install of PHP Version 5.2.4
I only enable 3 extensions

[PHP_CURL]
extension=php_curl.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_MYSQL]
extension=php_mysqli.dll

I have tried replacing the Mysql DLL shipping with PHP
with the Mysql Connectoid and the DLL that ships with Mysql
libmysql.dll

The GD2 Extension Loads
the Curl and Mysql Dlls CHOKE

APACHE ERROR LOG
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\Apache2\\php\\ext\\php_curl.dll' - The specified module could not
be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\Apache2\\php\\ext\\php_mysqli.dll' - The specified module could not
be found.\r\n in Unknown on line 0



If PHP can load GD without problems

but it cant load Curl or Mysql or Mysqli
It sounds like a problem in the compiled source code


Previous Comments:


[2007-09-11 12:01:38] thorsten at phpmyfaq dot de

It's the Apache 2.0 Handler on my system.

We're doing a SELECT query on a really big 2 GB table with PEAR::MDB2
with ext/mysql.



[2007-09-10 22:49:49] [EMAIL PROTECTED]

ISAPI, CGI, CLI or FCGI?

How are you producing it do you have to do anything specific or does
everything produce it?

I can't reproduce this on my test box apart from with -i / -m but thats
since been fixed in CVS by dmitry.



[2007-09-10 05:49:03] thorsten at phpmyfaq dot de

This bug still occurs with PHP 5.2.4 and libmysql.dll from PHP 5.2.4
package and from MySQL 5.0.45 package when using ext/mysql.



[2007-09-05 19:03:29] richard at vottle dot com

Temporary dyslexia mixed in with too many archived versions of PHP and
you are bound to get things mixed up. 

Taking libmysql.dll from php v 5.2.1 (and not 5.1.2) and replacing the
libmysql.dll in php 5.2.2-4 works fine.

Would still be nice to have a proper working copy in the actual release
though ;)



[2007-09-05 14:40:58] richard at vottle dot com

I am having the same problem with PHP 5.2.4. I have tried replacing
libmysql.dll from PHP 5.1.2, and also took the libmysql.dll from my
instance of MySQL 5.0.15-nt - nothing is solving the problem except
reverting back to PHP 5.1.2 in its entirity.



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

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


#42643 [NEW]: CLI segfaults if using ATTR_PERSISTENT agenst mysql

2007-09-12 Thread jkkn at tv2 dot dk
From: jkkn at tv2 dot dk
Operating system: Red Hat Enterprise Linux E
PHP version:  5.2.4
PHP Bug Type: PDO related
Bug description:  CLI segfaults if using ATTR_PERSISTENT agenst mysql

Description:

If ATTR_PERSISTENT is set to true and running a php-script using the CLI.
The script segmentation faults at the end of execution (not during)


Reproduce code:
---
?php
$pdo = new PDO('mysql:host=;dbname=', '', '',
array(PDO::ATTR_PERSISTENT = true));
$pdo-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$x = $pdo-prepare('SELECT 1');
$x-execute();
$row = $x-fetch();

var_dump($row);
?

Expected result:

No segmentation faults.

Actual result:
--
Script runs fine, but segmentation faults after execution.

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


#41350 [Com]: Error in my_thread_global_end()

2007-09-12 Thread Chicken at TheMooFarm dot com
 ID:   41350
 Comment by:   Chicken at TheMooFarm dot com
 Reported By:  graham at directhostinguk dot com
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.3
 Assigned To:  scottmac
 New Comment:

Forgot to add

PHP was installed by the MIS
php-5.2.4-win32-installer.msi

but then I copied over the missing DLLs
by downloading the ZIP 
php-5.2.4-Win32.zip

why are there missing dlls in the MSI install anyway ?¿?

I know I am complaining a lot (this stuff is free after all)
but isnt this a release version shouldnt a msi install the dlls heh
:o)

anyway 
GD seems to load
GD Version  bundled (2.0.34 compatible)  in phpinfo

Hope there is a fix soon
lots of people trying to have XP development computers
so they can design their CMS / Blog sites really need access
to what is working on their servers.


Previous Comments:


[2007-09-12 15:25:36] Chicken at TheMooFarm dot com

This is sucking real hard

I am using 
Mysql Ver5.041-community-nt
apache_2.2.4-win32-x86-no_ssl
php-5.2.4-win32-installer.msi

TRIED ALSO from Mysql's site
php_5.2.0_mysqli_5.0.27-win32.zip

I do a install of PHP Version 5.2.4
I only enable 3 extensions

[PHP_CURL]
extension=php_curl.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_MYSQL]
extension=php_mysqli.dll

I have tried replacing the Mysql DLL shipping with PHP
with the Mysql Connectoid and the DLL that ships with Mysql
libmysql.dll

The GD2 Extension Loads
the Curl and Mysql Dlls CHOKE

APACHE ERROR LOG
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\Apache2\\php\\ext\\php_curl.dll' - The specified module could not
be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\Apache2\\php\\ext\\php_mysqli.dll' - The specified module could not
be found.\r\n in Unknown on line 0



If PHP can load GD without problems

but it cant load Curl or Mysql or Mysqli
It sounds like a problem in the compiled source code



[2007-09-11 12:01:38] thorsten at phpmyfaq dot de

It's the Apache 2.0 Handler on my system.

We're doing a SELECT query on a really big 2 GB table with PEAR::MDB2
with ext/mysql.



[2007-09-10 22:49:49] [EMAIL PROTECTED]

ISAPI, CGI, CLI or FCGI?

How are you producing it do you have to do anything specific or does
everything produce it?

I can't reproduce this on my test box apart from with -i / -m but thats
since been fixed in CVS by dmitry.



[2007-09-10 05:49:03] thorsten at phpmyfaq dot de

This bug still occurs with PHP 5.2.4 and libmysql.dll from PHP 5.2.4
package and from MySQL 5.0.45 package when using ext/mysql.



[2007-09-05 19:03:29] richard at vottle dot com

Temporary dyslexia mixed in with too many archived versions of PHP and
you are bound to get things mixed up. 

Taking libmysql.dll from php v 5.2.1 (and not 5.1.2) and replacing the
libmysql.dll in php 5.2.2-4 works fine.

Would still be nice to have a proper working copy in the actual release
though ;)



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

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


#42645 [NEW]: getdate/mktime does not always add/subtract dst offset

2007-09-12 Thread carstenklein at yahoo dot de
From: carstenklein at yahoo dot de
Operating system: Linux Ubuntu Feisty Fawn
PHP version:  5.2.4
PHP Bug Type: Date/time related
Bug description:  getdate/mktime does not always add/subtract dst offset

Description:

getdate() a/o mktime() do not always add/subtract the currently valid dst
offset. Actually, they do only add the dst offset under certain conditions,
but not always and not to all possible normal time/summer time, summer
time/normal time transitions.

see below code for an example on how to reprocude the erroneous behaviour.
the lines being marked with good/failure represent the lines where the
dst offset has been added. As you can see, it happens not for all possible
dates since 1970-1-1, at least in the local configuration being set to
CET/CEST.

BTW: opposed to what is expected, CEST to CET transitions do not seem to
work at all, I was unable to setup a scenario where the dst offset would
have been subtracted from the resulting timestamp. It seems as if the
mktime() or timelib functions do not take dst into account when
transitioning a date from summer time to normal time.

I would therefore like mktime and the timelib to no longer try to guess
the actual current time and automatically add the required dst offsets to
either date and time as it is prone to error as one can clearly see in the
below example outputs of below program fragment. Additionally, the results
often are non reproducible and may seem quite random. If you don't believe,
go and try for yourself, change the number of days to be added to the start
date from 20 to for example 10 or other reasonable values. Furthermore, try
to play with the starting date, make it some date in February instead of
for example March, but make sure that you transition the date beyond the
last Sunday in March, 1:00am. As you can see, the results will vary
greatly.

Of course one could always double check the results returned by mktime,
however, this is a lot of special casing etc. Therefore I urge you to at
least provide a timezone offset less version of mktime in order to at least
get some reproducible results.

And, using the seventh optional parameter to mktime() makes no difference
at all, besides that, it is considered deprecated.


similar bug reports, all having been closed so far:

http://bugs.php.net/bug.php?id=245
http://bugs.php.net/bug.php?id=741



Reproduce code:
---
?php
function addDuration( $date, $durationArray ) {
$t = getdate( $date ); $t[ year ] += $durationArray[ years ];
$t[ mon ] += $durationArray[ months ]; $t[ mday ] += $durationArray[
days ];
$t[ hours ] += $durationArray[ hours ]; $t[ minutes ] +=
$durationArray[ minutes ]; $t[ seconds ] += $durationArray[ seconds
];
return mktime( $t[ hours ], $t[ minutes ], $t[ seconds ],
$t[ mon ], $t[ mday ], $t[ year ] );
}
function durationToString( $durationArray ) {
return P . $durationArray[ years ] . Y . $durationArray[
months ] . M . $durationArray[ days ] . D . T . $durationArray[
hours ] . : . $durationArray[ minutes ] . : . $durationArray[
seconds ];
}
echo Testing Normal Time to DST Transition:\n;
for( $y = 1902; $y  2038; $y++ ) {
for( $x = 14; $x  32; $x++ ) {
$d = strtotime( $y-03-$x 02:30:30 ); echo ( date( Y-m-d
H:i:s, $d ) ) . \t;
$durationArray = array( years = 0, months = 0,
days = 20, hours = 0, minutes = 0, seconds = 0 ); echo +\t .
durationToString( $durationArray ) . \t+\t;
$t = addDuration( $d, $durationArray ); $td = getdate( $t
); echo date( Y-m-d H:i:s, $t ) . ( $td[ hours ] == 3 ?   -  FAILURE
:  ) . \n;
} }
echo Testing DST to Normal Time Transition:\n;
for( $y = 2037; $y  1901; $y-- ) {
for( $x = 24; $x  32; $x++ ) {
$d = strtotime( $y-10-$x 00:00:10 ); echo ( date( Y-m-d
H:i:s, $d ) ) . \t;
$durationArray = array( years = 0, months = 0,
days = 1, hours = 0, minutes = 0, seconds = 0 ); echo +\t .
durationToString( $durationArray ) . \t+\t;
$t = addDuration( $d, $durationArray ); $td = getdate( $t
); echo date( Y-m-d H:i:s, $t ) . ( $td[ hours ] == 23 ?   - 
FAILURE :  ) . \n;
} }
?


Expected result:

1981-03-25 02:30:30 + P0Y0M20DT0:0:0 + 1981-04-14 03:30:30
1981-03-26 02:30:30 + P0Y0M20DT0:0:0 + 1981-04-15 03:30:30
1981-03-27 02:30:30 + P0Y0M20DT0:0:0 + 1981-04-16 03:30:30
1981-03-28 02:30:30 + P0Y0M20DT0:0:0 + 1981-04-17 03:30:30
1981-03-29 03:30:30 + P0Y0M20DT0:0:0 + 1981-04-18 03:30:30  -  FAILURE
1981-03-30 02:30:30 + P0Y0M20DT0:0:0 + 1981-04-19 02:30:30
1981-03-31 02:30:30 + P0Y0M20DT0:0:0 + 1981-04-20 02:30:30
1982-03-14 02:30:30 + P0Y0M20DT0:0:0 + 1982-04-03 02:30:30
1982-03-15 02:30:30 + P0Y0M20DT0:0:0 + 1982-04-04 02:30:30
1982-03-16 02:30:30 + P0Y0M20DT0:0:0 + 1982-04-05 02:30:30
1982-03-17 02:30:30 + P0Y0M20DT0:0:0 + 1982-04-06 02:30:30

* what is marked failure is actually the last sunday in march, 1981


Actual result:
--

#42625 [Com]: When mysql and mysqli enabled both together, php cli hangs

2007-09-12 Thread Martin dot Jansa at mk dot cvut dot cz
 ID:   42625
 Comment by:   Martin dot Jansa at mk dot cvut dot cz
 Reported By:  jama at mk dot cvut dot cz
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Gentoo/Linux
 PHP Version:  5.2.4
 New Comment:

It hangs only with mysql, mysqli AND --enable-maintainer-zts.

I don't want to disable maintainer-zts, because I'm not using only
cli/cgi in real installation. :)

This 3 configure parameters is the smallest subset of those I'm
normally using.


Previous Comments:


[2007-09-12 11:50:41] [EMAIL PROTECTED]

Why are you using --enable-maintainer-zts in your configure line? You
really don't need this for CLI/CGI..



[2007-09-11 18:48:11] jama at mk dot cvut dot cz

Description:

when compiled vanilla php-5.2.4 with this params
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
it's ok

when added mysql support too
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
it's bad even sapi/cli/php -i hangs forever on futex call

strace sapi/cli/php -i

write(1, questions about PHP licensing, p..., 63questions about PHP
licensing, please contact [EMAIL PROTECTED]
) = 63
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) =
0
futex(0x2adbeb81cac0, FUTEX_WAIT, 2, NULL unfinished ...

The same behavior with php5.2-200709110830.


Reproduce code:
---
tar xjvf php-5.2.4.tar.bz2
mv php-5.2.4 php-5.2.4-mysqli
cp -r php-5.2.4-mysqli php-5.2.4-mysql-mysqli
cd php-5.2.4-mysql-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
make
sapi/cli/php -i #HANGS HERE#

cd ../php-5.2.4-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
make
sapi/cli/php -i #DOESN'T HANG HERE#

Diff between those 2 build dirs on my pc..
http://pastebin.com/m9c448da

Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop,
gcc-4.2.2-alpha20070905/amd64-vanilla, glibc-2.6.1-r0,
2.6.23-rc5-git1-JaMa x86_64)
=
System uname: 2.6.23-rc5-git1-JaMa x86_64 AMD Athlon(tm) 64 Processor
3700+
Timestamp of tree: Tue, 11 Sep 2007 10:01:01 +
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python: 2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS=amd64 ~amd64
CBUILD=x86_64-pc-linux-gnu
CFLAGS=-O2 -march=k8



Expected result:

php cli working

Actual result:
--
php cli hanging on every occasion





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


#42548 [Asn]: PROCEDURE xxx can't return a result set in the given context (works in 5.2.3!!)

2007-09-12 Thread garethjo at usc dot edu
 ID:   42548
 User updated by:  garethjo at usc dot edu
 Reported By:  garethjo at usc dot edu
 Status:   Assigned
 Bug Type: MySQLi related
 Operating System: Windows XP, Windows 2003
 PHP Version:  5.2.4
 Assigned To:  georg
 New Comment:

This is the example of the code from my initial bug report reworked to
use the multi_query.  It uses the same database setup script as the
original script in the first bug report and produces the same error:


// BUG TEST START  --
$mysqli = mysqli_init();
$mysqli-real_connect('localhost', 'root', 'root_pass', 'test');
if (mysqli_connect_errno())
{
printf(Connect failed: %s\n, mysqli_connect_error());
exit();
}

if($mysqli-multi_query (CALL spGetProducts();))
{
do
{
if($objResult = $mysqli-store_result())
{
while($row = $objResult-fetch_assoc())
{
print $row[strProductName].
.$row[douProductPrice].br\r\n;
}
$objResult-close();
if($mysqli-more_results())
{
print BR;
}

}
else
{
print no results found;
}
}while ( $mysqli-next_result());

}
else
{   
print $mysqli-error;
}
$mysqli-close();
?


Previous Comments:


[2007-09-12 08:55:24] uwendel at mysql dot com

Your code snippets does not show proper usage of mysqli_multi_query().


Stored Procedures that return n result sets will return n + 1 result
sets. In your case, it's two result sets to fetch and eat up before you
can reuse the line. The error message from the server is exactly about
that. Proper usage of mysqli_multi_query() looks like this:

if (mysqli_multi_query($link, 'CALL p()')) {
  do {
if ($res = mysqli_store_result($link)) {
 while ($row = mysqli_fetch_assoc($res))
   var_dump($row);
 mysqli_free_result($res);
}
 } while (mysqli_more_results($link)  mysqli_next_result($link));

} else {
  printf(Cannot call SP, [%d] %s\n, 
mysqli_errno($link), mysqli_error($link));
}

I see you replacing mysqli_[real_]query() with mysqli_multi_query() but
I do not see the more_results()/next_result() loop etc. You continue
using the syntax for SPs which do not return a result set.

Ulf



[2007-09-11 17:44:25] al dot smith at aeschi dot ch dot eu dot org

$query = CALL count_runs(.$row[id]., .$minyear.,
.$maxyear.);
$db-multi_query($query) or die (Error in query: $query.  .
$db-error);

This was my query.



[2007-09-11 15:54:04] garethjo at usc dot edu

No it doesn't, I tried it with both before sending in the bug report.



[2007-09-11 10:00:30] uwendel at mysql dot com

Does using mysqli_multi_query() work for you? Currently you are using
mysqli_real_query() to call the SP. See also,
http://dev.mysql.com/doc/refman/5.1/en/call.html. If a stored procedure
produces result sets, you must use mysqli_multi_query(). 

Ulf



[2007-09-09 10:42:13] [EMAIL PROTECTED]

Georg (or whoever maintains mysqli nowadays), check this out. Seems
like some regression bug between 5.2.3 / 5.2.4 crept in..



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

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


#42646 [NEW]: php-cgi.exe doesn't load/use Per Directory Values from windows registry

2007-09-12 Thread simon at bleif dot de
From: simon at bleif dot de
Operating system: Windows Server 2003 R2 x64
PHP version:  5.2.4
PHP Bug Type: *Configuration Issues
Bug description:  php-cgi.exe doesn't load/use Per Directory Values from 
windows registry

Description:

When running PHP via php-cgi.exe using CGI/FastCGI, Per Directory Values
are not read from the windows registry.

Reproduce code:
---
Simply run PHP in CGI/FastCGI mode using php-cgi.exe and use regmon to
monitor the accessed registry keys.

Already configured Per Directory Values working correctly via
php5isapi.dll are not being loaded and are - as a result - not applied in
CGI/FastCGI-mode.
They are applied fine using php5isapi.dll/ISAPI-mode.

Expected result:

The relevant values should be loaded from the registry and should be
applied as described here:
http://de3.php.net/manual/en/configuration.changes.php#configuration.changes.windows.

Actual result:
--
The relevant registry keys are not loaded from the registry and the
settings configured there are not being applied.

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


#42629 [Opn-Ana]: Dynamically loaded PHP extensions need symbols exported

2007-09-12 Thread kalowsky
 ID:   42629
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jdolecek at NetBSD dot org
-Status:   Open
+Status:   Analyzed
 Bug Type: Dynamic loading
 Operating System: Mac OS X 10.4.10
 PHP Version:  5.2.4
 New Comment:

When this code was originally written, PDO didn't exist and as such the
choice to use the PRIVATE option was made to keep the namespace the
least polluted possible.  Having not tested the patch, the changes make
sense and probably should be applied provided they don't cause any
adverse affects to other files included.


Previous Comments:


[2007-09-11 20:05:20] jdolecek at NetBSD dot org

Description:

Some PHP extensions expect to have symbols from other PHP extensions
available. This is the case for PDO drivers (which use symbols from PDO
extension) and XSL (which uses symbols from DOM extension).

Extensions are loaded with dlopen(..., RTLD_GLOBAL) on platforms with
dlopen() (i.e. most unices). On Mac OS X, NSLinkModule() is used instead
of dlopen(), but with 'private' option, which hides symbols of
dynamically loaded extensions from other dynamically loaded code.

Due to this symbol hiding, PDO and DOM needed to be compiled into base
PHP binary, otherwise the dependant extension couldn't be dynamically
loaded since expected symbols are not found. PDO configure script even
intentionally silently disables compilation of dynamically loaded PDO
module on MacOSX/Darwin because of this.

Following patch makes it possible to load also PDO and DOM dynamically
on Mac OS X and thus PHP extensions work all the same way as on other
UNIX systems:

--- Zend/zend_extensions.c.orig 2007-09-11 22:00:50.0 +0200
+++ Zend/zend_extensions.c
@@ -243,7 +243,7 @@ void *zend_mh_bundle_load(char* bundle_p
return NULL;
}

-   bundle_handle = NSLinkModule(bundle_image, bundle_path,
NSLINKMODULE_OPTION_PRIVATE);
+   bundle_handle = NSLinkModule(bundle_image, bundle_path,
NSLINKMODULE_OPTION_NONE);
NSDestroyObjectFileImage(bundle_image);

/* call the init function of the bundle */








Reproduce code:
---
Compile PDO (after fix to configure script) as dynamic extensions, as
well as pdo_mysq, and add into php.ini lines:

extension=pdo.so
extension=pdo_mysql.so

then run:

php -m | grep -i pdo

Expected result:

PDO
pdo_mysql


Actual result:
--
dyld: lazy symbol binding failed: Symbol not found:
_php_pdo_declare_long_constant
  Referenced from: /Users/Shared/pkg/lib/php/20040412/pdo_mysql.so
  Expected in: flat namespace

dyld: Symbol not found: _php_pdo_declare_long_constant
  Referenced from: /Users/Shared/pkg/lib/php/20040412/pdo_mysql.so
  Expected in: flat namespace

Trace/BPT trap






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


#42645 [Opn]: getdate/mktime does not always add/subtract dst offset

2007-09-12 Thread carstenklein at yahoo dot de
 ID:   42645
 User updated by:  carstenklein at yahoo dot de
 Reported By:  carstenklein at yahoo dot de
 Status:   Open
 Bug Type: Date/time related
 Operating System: Linux Ubuntu Feisty Fawn
 PHP Version:  5.2.4
 New Comment:

Small err on my behalf, where it reads:

result often are non reproducible and may seem quite random

it must read:

result are reproducible but may seem quite random

and

Therefore I urge you to at least provide a timezone offset less
version of mktime in order to at least get some reproducible results.

it should read

Therefore I urge you to at least provide a timezone offset less
version of mktime and let the user do the rest.



A provable solution would be to take the seventh, now deprecated
parameter to mktime and make it a flag indicating wether or not offsets
will be applied to the resulting date/time.


Previous Comments:


[2007-09-12 16:06:37] carstenklein at yahoo dot de

Description:

getdate() a/o mktime() do not always add/subtract the currently valid
dst offset. Actually, they do only add the dst offset under certain
conditions, but not always and not to all possible normal time/summer
time, summer time/normal time transitions.

see below code for an example on how to reprocude the erroneous
behaviour. the lines being marked with good/failure represent the
lines where the dst offset has been added. As you can see, it happens
not for all possible dates since 1970-1-1, at least in the local
configuration being set to CET/CEST.

BTW: opposed to what is expected, CEST to CET transitions do not seem
to work at all, I was unable to setup a scenario where the dst offset
would have been subtracted from the resulting timestamp. It seems as if
the mktime() or timelib functions do not take dst into account when
transitioning a date from summer time to normal time.

I would therefore like mktime and the timelib to no longer try to guess
the actual current time and automatically add the required dst offsets
to either date and time as it is prone to error as one can clearly see
in the below example outputs of below program fragment. Additionally,
the results often are non reproducible and may seem quite random. If you
don't believe, go and try for yourself, change the number of days to be
added to the start date from 20 to for example 10 or other reasonable
values. Furthermore, try to play with the starting date, make it some
date in February instead of for example March, but make sure that you
transition the date beyond the last Sunday in March, 1:00am. As you can
see, the results will vary greatly.

Of course one could always double check the results returned by mktime,
however, this is a lot of special casing etc. Therefore I urge you to at
least provide a timezone offset less version of mktime in order to at
least get some reproducible results.

And, using the seventh optional parameter to mktime() makes no
difference at all, besides that, it is considered deprecated.


similar bug reports, all having been closed so far:

http://bugs.php.net/bug.php?id=245
http://bugs.php.net/bug.php?id=741



Reproduce code:
---
?php
function addDuration( $date, $durationArray ) {
$t = getdate( $date ); $t[ year ] += $durationArray[ years
]; $t[ mon ] += $durationArray[ months ]; $t[ mday ] +=
$durationArray[ days ];
$t[ hours ] += $durationArray[ hours ]; $t[ minutes ] +=
$durationArray[ minutes ]; $t[ seconds ] += $durationArray[
seconds ];
return mktime( $t[ hours ], $t[ minutes ], $t[ seconds ],
$t[ mon ], $t[ mday ], $t[ year ] );
}
function durationToString( $durationArray ) {
return P . $durationArray[ years ] . Y . $durationArray[
months ] . M . $durationArray[ days ] . D . T .
$durationArray[ hours ] . : . $durationArray[ minutes ] . : .
$durationArray[ seconds ];
}
echo Testing Normal Time to DST Transition:\n;
for( $y = 1902; $y  2038; $y++ ) {
for( $x = 14; $x  32; $x++ ) {
$d = strtotime( $y-03-$x 02:30:30 ); echo ( date(
Y-m-d H:i:s, $d ) ) . \t;
$durationArray = array( years = 0, months = 0,
days = 20, hours = 0, minutes = 0, seconds = 0 ); echo +\t
. durationToString( $durationArray ) . \t+\t;
$t = addDuration( $d, $durationArray ); $td = getdate(
$t ); echo date( Y-m-d H:i:s, $t ) . ( $td[ hours ] == 3 ?   - 
FAILURE :  ) . \n;
} }
echo Testing DST to Normal Time Transition:\n;
for( $y = 2037; $y  1901; $y-- ) {
for( $x = 24; $x  32; $x++ ) {
$d = strtotime( $y-10-$x 00:00:10 ); echo ( date(
Y-m-d H:i:s, $d ) ) . \t;
$durationArray = array( years = 0, months = 0,
days = 1, hours = 0, minutes = 0, seconds = 0 ); echo +\t
. durationToString( $durationArray ) . \t+\t;
$t = addDuration( $d, $durationArray ); $td = getdate(
$t ); echo date( Y-m-d H:i:s, $t ) . ( $td[ hours ] == 23 ?   - 
FAILURE :  ) . 

#42643 [Opn-Csd]: CLI segfaults if using ATTR_PERSISTENT agenst mysql

2007-09-12 Thread iliaa
 ID:   42643
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jkkn at tv2 dot dk
-Status:   Open
+Status:   Closed
 Bug Type: PDO related
 Operating System: Red Hat Enterprise Linux E
 PHP Version:  5.2.4
 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:


[2007-09-12 15:29:53] jkkn at tv2 dot dk

Description:

If ATTR_PERSISTENT is set to true and running a php-script using the
CLI.
The script segmentation faults at the end of execution (not during)


Reproduce code:
---
?php
$pdo = new PDO('mysql:host=;dbname=', '', '',
array(PDO::ATTR_PERSISTENT = true));
$pdo-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$x = $pdo-prepare('SELECT 1');
$x-execute();
$row = $x-fetch();

var_dump($row);
?

Expected result:

No segmentation faults.

Actual result:
--
Script runs fine, but segmentation faults after execution.





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


#42647 [NEW]: unexpected results from parse_str()

2007-09-12 Thread dev at glossword dot info
From: dev at glossword dot info
Operating system: Windows XP
PHP version:  5.2.4
PHP Bug Type: URL related
Bug description:  unexpected results from parse_str()

Description:

Hi. Before to make this post, I have read all previous bugs related to
`parse_str()` and user comments in documentation for `parse_str()`
function. Perhaps, this is not a bug but consistent behavior... Anyway,
it didn't work as expected and it makes a trouble for me.

Reproduce code:
---
$str1 = 'arg1=123arg2=quot;Companyamp;Sonsquot; #039;90';
$str2 = 'arg1=123arg2=CompanySons \'90';

parse_str($str1, $array1);
parse_str( html_entity_decode($str1), $array2 );
parse_str($str2, $array3);
parse_str( html_entity_decode($str2), $array4 );

print_r( $array1 );
print_r( $array2 );
print_r( $array3 );
print_r( $array4 );

Expected result:

Array
(
[arg1] = 123
[arg2] = quot;Companyamp;Sonsquot; #039;90
)
Array
(
[arg1] = 123
[arg2] = CompanySons '90
)
...

Actual result:
--
Array
(
[arg1] = 123
[arg2] = 
[quot;Company] = 
[amp;Sons] = 
[quot;_] = 
[#039;90] = 
)
Array
(
[arg1] = 123
[arg2] = Company
[Sons_] = 
[#039;90] = 
)
Array
(
[arg1] = 123
[arg2] = Company
[Sons_'90] = 
)
Array
(
[arg1] = 123
[arg2] = Company
[Sons_'90] = 
)

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


#42647 [Opn]: unexpected results from parse_str()

2007-09-12 Thread dev at glossword dot info
 ID:   42647
 User updated by:  dev at glossword dot info
 Reported By:  dev at glossword dot info
 Status:   Open
 Bug Type: URL related
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

Oh, as for $array3 and $array4 - it is correct. $array2 is partially
correct.


Previous Comments:


[2007-09-12 18:27:58] dev at glossword dot info

Description:

Hi. Before to make this post, I have read all previous bugs related to
`parse_str()` and user comments in documentation for `parse_str()`
function. Perhaps, this is not a bug but consistent behavior...
Anyway, it didn't work as expected and it makes a trouble for me.

Reproduce code:
---
$str1 = 'arg1=123arg2=quot;Companyamp;Sonsquot; #039;90';
$str2 = 'arg1=123arg2=CompanySons \'90';

parse_str($str1, $array1);
parse_str( html_entity_decode($str1), $array2 );
parse_str($str2, $array3);
parse_str( html_entity_decode($str2), $array4 );

print_r( $array1 );
print_r( $array2 );
print_r( $array3 );
print_r( $array4 );

Expected result:

Array
(
[arg1] = 123
[arg2] = quot;Companyamp;Sonsquot; #039;90
)
Array
(
[arg1] = 123
[arg2] = CompanySons '90
)
...

Actual result:
--
Array
(
[arg1] = 123
[arg2] = 
[quot;Company] = 
[amp;Sons] = 
[quot;_] = 
[#039;90] = 
)
Array
(
[arg1] = 123
[arg2] = Company
[Sons_] = 
[#039;90] = 
)
Array
(
[arg1] = 123
[arg2] = Company
[Sons_'90] = 
)
Array
(
[arg1] = 123
[arg2] = Company
[Sons_'90] = 
)





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


#42616 [Fbk-Opn]: CLI crashes

2007-09-12 Thread ashish_chap at yahoo dot co dot in
 ID:   42616
 User updated by:  ashish_chap at yahoo dot co dot in
 Reported By:  ashish_chap at yahoo dot co dot in
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

I had tried that but still facing the same issue... anythoughts???


Previous Comments:


[2007-09-11 07:35:15] [EMAIL PROTECTED]

Start with reinstalling everything but before install, remove ALL
existing dll/exe/php.ini files from your system.



[2007-09-10 18:12:09] ashish_chap at yahoo dot co dot in

Description:

I have installed php 5.2.4 when I run a simple command on command
prompt as 
echo ?php echo('hi');?|php I get the following error.. following
whihc the PHP CLI crashes. I have tried with the latest snapshot but no
luck. Can any one please help?

Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
PHP Notice:  Constant XML_ELEMENT_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_ATTRIBUTE_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_TEXT_NODE already defined in Unknown on line
0
PHP Notice:  Constant XML_CDATA_SECTION_NODE already defined in Unknown
on line
0
PHP Notice:  Constant XML_ENTITY_REF_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_ENTITY_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_PI_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_COMMENT_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_DOCUMENT_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_DOCUMENT_TYPE_NODE already defined in Unknown
on line
0
PHP Notice:  Constant XML_DOCUMENT_FRAG_NODE already defined in Unknown
on line
0
PHP Notice:  Constant XML_NOTATION_NODE already defined in Unknown on
line 0
PHP Notice:  Constant XML_HTML_DOCUMENT_NODE already defined in Unknown
on line
0
PHP Notice:  Constant XML_DTD_NODE already defined in Unknown on line
0
PHP Notice:  Constant XML_ELEMENT_DECL_NODE already defined in Unknown
on line 0

PHP Notice:  Constant XML_ATTRIBUTE_DECL_NODE already defined in
Unknown on line
 0
PHP Notice:  Constant XML_ENTITY_DECL_NODE already defined in Unknown
on line 0
PHP Notice:  Constant XML_NAMESPACE_DECL_NODE already defined in
Unknown on line
 0
PHP Notice:  Constant XML_LOCAL_NAMESPACE already defined in Unknown on
line 0
PHP Notice:  Constant XML_ATTRIBUTE_CDATA already defined in Unknown on
line 0
PHP Notice:  Constant XML_ATTRIBUTE_ID already defined in Unknown on
line 0
PHP Notice:  Constant XML_ATTRIBUTE_IDREF already defined in Unknown on
line 0
PHP Notice:  Constant XML_ATTRIBUTE_IDREFS already defined in Unknown
on line 0
PHP Notice:  Constant XML_ATTRIBUTE_ENTITY already defined in Unknown
on line 0
PHP Notice:  Constant XML_ATTRIBUTE_NMTOKEN already defined in Unknown
on line 0

PHP Notice:  Constant XML_ATTRIBUTE_NMTOKENS already defined in Unknown
on line
0
PHP Notice:  Constant XML_ATTRIBUTE_ENUMERATION already defined in
Unknown on li
ne 0
PHP Notice:  Constant XML_ATTRIBUTE_NOTATION already defined in Unknown
on line
0
PHP Warning:  require_once(SAM/php_sam.php): failed to open stream: No
such file
 or directory in sam_factory on line 1
PHP Fatal error:  require_once(): Failed opening required
'SAM/php_sam.php' (inc
lude_path='.;C:\php5\pear') in sam_factory on line 1
Could not startup.
Error in my_thread_global_end(): 2 threads didn't exit

Expected result:

The simple command should return without any error

Actual result:
--
The PHP CLI crashes with the error stated.





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


#39003 [Csd]: __autoload unnecessarily called for type hinting

2007-09-12 Thread stas
 ID:   39003
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christoph at ziegenberg dot de
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: WinXP SP2
 PHP Version:  5.1.6
 New Comment:

For what it worth, the expected behavior is *not* to try autoloading
when checking if existing variable belongs to non-existing class,
because it is obvious that existing object can not belong to
non-existing class. I checked with 5.2.4, it works correctly. 


Previous Comments:


[2006-10-02 11:07:38] [EMAIL PROTECTED]

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

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





[2006-10-02 10:42:37] [EMAIL PROTECTED]

It's just a doc problem Tony... he's doing an instance of with an
unknown class. That gives an error message before the instance of runs
and can show it's error message.



[2006-10-02 09:39:28] [EMAIL PROTECTED]

Not a bug here, this is expected so marking as doc problem.



[2006-10-01 06:51:19] christoph at ziegenberg dot de

My version of the manual says this (from the example code):

// Fatal Error: Argument 1 must be an instance of OtherClass
$foo = new stdClass;
$myclass-test($foo);

So I should get the error Fatal error: Argument 1 passed to test()
must be an instance of OtherClassName, called in [...], but I get the
error Fatal error: Class 'OtherClassName' not found in [...].

Of course these are both fatal errors, but the one hand I expect
another behaviour for the autoloader function as described and on the
other hand the correct error message would help to debug the code,
because the current error only refers to the __autoloader() function (so
you have to use debug_backtrace()/debug_print_backtrace()).



[2006-10-01 06:07:57] judas dot iscariote at gmail dot com

if this is the expected behaviuor ( at least, not the behaviuor I
expect ;) ) it is not mentioned in the manual, so either the manual or
the engine needs to be corrected ;-)



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

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


#42615 [Fbk-Opn]: session ext as shared breaks ext/standard/tests/file/bug27508.phpt

2007-09-12 Thread igor at ypass dot net
 ID:   42615
 User updated by:  igor at ypass dot net
 Reported By:  igor at ypass dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Solaris 10 x86
 PHP Version:  5.2.4
 New Comment:

Yeah, this error comes from 'make test'.  I just tried to make it
easier for you. :)  I added -v to run-tests in Makefile.

=
TEST /src/php-5.2.4/ext/standard/tests/file/bug27508.phpt
TEST 2718/3739 [ext/standard/tests/file/bug27508.phpt]
CONTENT_LENGTH  =
CONTENT_TYPE=
PATH_TRANSLATED = /src/php-5.2.4/ext/standard/tests/file/bug27508.php
QUERY_STRING=
REDIRECT_STATUS = 1
REQUEST_METHOD  = GET
SCRIPT_FILENAME = /src/php-5.2.4/ext/standard/tests/file/bug27508.php
HTTP_COOKIE =
COMMAND /src/php-5.2.4/sapi/cli/php -c '/src/php-5.2.4/tmp-php.ini' -d
output_handler= -d open_basedir= -d safe_mode=0 -d
disable_functions= -d output_buffering=Off -d error_reporting=8191
-d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d
html_errors=0 -d track_errors=1 -d report_memleaks=1 -d
report_zend_debug=0 -d docref_root= -d docref_ext=.html -d
error_prepend_string= -d error_append_string= -d
auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0
-d extension_dir=/src/php-5.2.4/modules/ -d extension=openssl.so -d
extension=zlib.so -d extension=bcmath.so -d extension=bz2.so -d
extension=calendar.so -d extension=ctype.so -d extension=dba.so -d
extension=dom.so -d extension=exif.so -d extension=ftp.so -d
extension=gd.so -d extension=gettext.so -d extension=gmp.so -d
extension=hash.so -d extension=iconv.so -d extension=imap.so -d
extension=json.so -d extension=ldap.so -d extension=mbstring.so -d
extension=mcrypt.so -d extension=mhash.so -d
extension=mime_magic.so -d extension=mysql.so -d
extension=mysqli.so -d extension=ncurses.so -d extension=pcntl.so
-d extension=pdo_sqlite.so -d extension=posix.so -d
extension=pspell.so -d extension=readline.so -d
extension=session.so -d extension=shmop.so -d extension=snmp.so -d
extension=soap.so -d extension=sockets.so -d extension=sqlite.so
-d extension=sysvmsg.so -d extension=sysvsem.so -d
extension=sysvshm.so -d extension=tidy.so -d extension=wddx.so -d
extension=xmlreader.so -d extension=xmlrpc.so -d
extension=xmlwriter.so -d extension=xsl.so -d extension=zip.so -d
session.auto_start=0 -d tidy.clean_output=0 -d
zlib.output_compression=Off -f
/src/php-5.2.4/ext/standard/tests/file/bug27508.php  21

Fatal error: Out of memory (allocated 170917888) (tried to allocate
166985750 bytes) in /src/php-5.2.4/run-tests.php on line 896
make: [test] Error 255 (ignored)


Previous Comments:


[2007-09-11 11:36:41] [EMAIL PROTECTED]

How about running simply 'make test' ? In 5.2.4 there is no such make
line you have pasted here..



[2007-09-11 11:01:02] [EMAIL PROTECTED]

See bug #27508 (just note to get the friendly url here :)



[2007-09-10 17:57:00] igor at ypass dot net

Description:

The command below works fine without -d extension=session.so.  This
issue was not present in 5.2.3 with the same build options.

Reproduce code:
---
/src/php-5.2.4/sapi/cli/php -c '/src/php-5.2.4/tmp-php.ini' -d
output_handler= -d open_basedir= -d safe_mode=0 -d
disable_functions= -d output_buffering=Off -d error_reporting=8191
-d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d
html_errors=0 -d track_errors=1 -d report_memleaks=1 -d
report_zend_debug=0 -d docref_root= -d docref_ext=.html -d
error_prepend_string= -d error_append_string= -d
auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0
-d extension_dir=/src/php-5.2.4/modules/ \
-d extension=session.so \
-d session.auto_start=0 -d tidy.clean_output=0 -d
zlib.output_compression=Off -f
/src/php-5.2.4/ext/standard/tests/file/bug27508.php


Expected result:

bool(false) refcount(1)
0
bool(false) refcount(1)
line1
line2
line3


Actual result:
--
Warning: fopen(): URL using bad/illegal format or missing URL in
/src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 8

Warning: fopen(/tmp/foo7oaaaG): failed to open stream: No such file or
directory in /src/php-5.2.4/ext/standard/tests/file/bug27508.php on line
8

Warning: fwrite(): supplied argument is not a valid stream resource in
/src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 20

Warning: fwrite(): supplied argument is not a valid stream resource in
/src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 20

Warning: fwrite(): supplied argument is not a valid stream resource in
/src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 20

Warning: feof(): supplied argument is not a valid stream resource in
/src/php-5.2.4/ext/standard/tests/file/bug27508.php on line 30
bool(false) 

#42649 [NEW]: preg_match_all doesn't capture more than 99998 bytes

2007-09-12 Thread stronk7 at moodle dot org
From: stronk7 at moodle dot org
Operating system: potentially any
PHP version:  5.2.4
PHP Bug Type: PCRE related
Bug description:  preg_match_all doesn't capture more than 8 bytes

Description:

Trying to capture more than 8 bytes from one string captures nothing.
Same behavior happens also in other PCRE functions.

You can see more test results in the original place where was reported:
http://tracker.moodle.org/browse/MDL-11237

Reproduce code:
---
?php

/// Change this if you want, but 9 is the limit in my system (Darwin
mbp 8.10.1)
$numchars = 9;

/// Test begins here
echo 'PHP: ' . phpversion() . 'br /';
echo 'OS: ' . php_uname() . 'br /';
$all = '';

for($i=0; $i$numchars-2; $i++) {
$all .= 'x';
}
$all = '@' . $all . '@';
preg_match_all('/@(.*?)@/is', $all, $results);
if ($results[0]) {
echo 'OK, preg_match_all() has been able to capture one text of '
. strlen($results[0][0]) . ' bytes.br /';
} else {
echo 'ERROR, preg_match_all() has NOT been able to capture one
text of ' . strlen($all) . ' bytes.br /';
}

?

Expected result:

It should show:

OK, preg_match_all() has been able to capture one text of 9 bytes

Actual result:
--
ERROR, preg_match_all() has NOT been able to capture one text of 9
bytes

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


#42649 [Opn]: preg_match_all doesn't capture more than 99998 bytes

2007-09-12 Thread stronk7 at moodle dot org
 ID:   42649
 User updated by:  stronk7 at moodle dot org
 Reported By:  stronk7 at moodle dot org
 Status:   Open
 Bug Type: PCRE related
 Operating System: potentially any
 PHP Version:  5.2.4
 New Comment:

UHm...

It seems that, since 5.2.0 it's necessary to adjust the
pcre.backtrack_limit' setting to allow more chars to be returned (in
ungreedy matches). So, something like:

 ini_set('pcre.backtrack_limit', 20971520); /// 20 MB

will allow up to 20MB of text to be matched. 

Radical change (without notices?) from previous versions...uhm.

Ciao :-)


Previous Comments:


[2007-09-13 00:17:44] stronk7 at moodle dot org

Description:

Trying to capture more than 8 bytes from one string captures
nothing. Same behavior happens also in other PCRE functions.

You can see more test results in the original place where was reported:
http://tracker.moodle.org/browse/MDL-11237

Reproduce code:
---
?php

/// Change this if you want, but 9 is the limit in my system
(Darwin mbp 8.10.1)
$numchars = 9;

/// Test begins here
echo 'PHP: ' . phpversion() . 'br /';
echo 'OS: ' . php_uname() . 'br /';
$all = '';

for($i=0; $i$numchars-2; $i++) {
$all .= 'x';
}
$all = '@' . $all . '@';
preg_match_all('/@(.*?)@/is', $all, $results);
if ($results[0]) {
echo 'OK, preg_match_all() has been able to capture one text of
' . strlen($results[0][0]) . ' bytes.br /';
} else {
echo 'ERROR, preg_match_all() has NOT been able to capture one
text of ' . strlen($all) . ' bytes.br /';
}

?

Expected result:

It should show:

OK, preg_match_all() has been able to capture one text of 9 bytes

Actual result:
--
ERROR, preg_match_all() has NOT been able to capture one text of 9
bytes





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


#41899 [Asn]: Can't open files with leading relative path of '..' and '..' is not readable

2007-09-12 Thread geoffwa at cs dot rmit dot edu dot au
 ID:   41899
 User updated by:  geoffwa at cs dot rmit dot edu dot au
 Reported By:  geoffwa at cs dot rmit dot edu dot au
 Status:   Assigned
 Bug Type: Streams related
 Operating System: Solaris 10
 PHP Version:  5.2.3
 Assigned To:  tony2001
 New Comment:

I'll stress again that while the patch may work, I'm not sure if it's
'correct' or not, mainly because I have no idaa what php_checkuid_ex()
is supposed to return, safe_mode-isms like open_basedir may need it.

I just traced the execution of the offending PHP script repeatedly for
the failure case, and deduced that the expand_filepath() call in
php_checkuid_ex() that I've removed in the patch was returning an empty
path under similar conditions to where a getcwd() call would fail.

The actual path blatting appeared to occur in virtual_file_ex(), and we
produced a separate patch which completely short-circuited this function
and also made the all test conditions work.

Given that PHP6 is removing safe_mode completely, I imagine this
problem will hopefully be fixed then :)


Previous Comments:


[2007-09-12 11:53:14] ian at onlineloop dot com

I've tried the patch offered by Geoff.  It seems to work just fine for
us too in the cvs version from today (php5.2-200709121030).



[2007-09-12 10:38:34] ian at onlineloop dot com

Verified that this is still not working in 5.2.4.

We made a system available on a Sun E3500, partially for the purposes
of fixing this bug.  The last login from anyone from the PHP team was on
5 July 2007.

Is there any time plan to fix this bug?  We are running on Solaris 10
and are stuck on PHP 5.1.6 because of this problem, so the situation for
us is critical.



[2007-08-14 15:21:39] wdierkes at 5dollarwhitebox dot org

I have verified that this is *NOT* fixed in the latest CVS snapshot. 
Tested on Redhat Enterprise Linux 4 i386.  Can we can an ETA on an
official patch?



[2007-07-07 02:04:42] geoffwa at cs dot rmit dot edu dot au

No idea if this is correct but it fixes it:
diff -ur ./php5.2-200707060030/main/safe_mode.c
./php-5.2-snap/main/safe_mode.c
--- ./php5.2-200707060030/main/safe_mode.c  2007-01-13
00:30:58.0 +1100
+++ ./php-5.2-snap/main/safe_mode.c 2007-07-07 11:42:10.804129000
+1000
@@ -86,7 +86,8 @@
 * If that fails, passthrough and check directory...
 */
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
-   expand_filepath(filename, path TSRMLS_CC);
+   // VCWD_STAT() can handle relative paths right?
+   strlcpy(path, filename, MAXPATHLEN);
ret = VCWD_STAT(path, sb);
if (ret  0) {
if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS)
{
diff -ur ./php5.2-200707060030/main/streams/plain_wrapper.c
./php-5.2-snap/main/streams/plain_wrapper.c
--- ./php5.2-200707060030/main/streams/plain_wrapper.c  2007-04-19
00:31:35.0 +1000
+++ ./php-5.2-snap/main/streams/plain_wrapper.c 2007-07-07
11:58:57.673891000 +1000
@@ -888,9 +888,10 @@
return NULL;
}

-   if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) ==
NULL) {
-   return NULL;
-   }
+   //if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) ==
NULL) {
+   //  return NULL;
+   //}
+   realpath = estrndup(filename, strlen(filename));

if (persistent) {
spprintf(persistent_id, 0, streams_stdio_%d_%s,
open_flags, realpath);



[2007-07-06 16:04:30] geoffwa at cs dot rmit dot edu dot au

It's still broken in CVS (my bad - forgot to remove the workaround
patch we had).

virtual_file_ex() get called several times, with the last
invocation being:

virtual_file_ex(state = 0xffbfdf9c,
path = 0xffbfe018 ../b/file,
verify_path = (nil),
use_realpath = 1)
called from function expand_filepath
virtual_file_ex returns 1

Having written a rather grandoise summary of stepping through
virtual_file_ex() I think the problem might be in php_checkuid_ex().



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

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


#42636 [Opn-Bgs]: Problem - loading mysql database in dreamweaver mx:

2007-09-12 Thread jani
 ID:   42636
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tony at veederline dot com dot au
-Status:   Open
+Status:   Bogus
 Bug Type: Dynamic loading
 Operating System: windows xp
 PHP Version:  5.2.4
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2007-09-12 06:16:13] tony at veederline dot com dot au

Description:

I am using dream weaver 6.0 to build a dynamic web site with php and
mysql. I try connecting to an existing database, dreamweaver can't find
it. I even went to macromedia web site and found that this is a known
problem. I,ve triple, triple checked all parameters and still no
solution. I get and successfully test conection but no tables will load.







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


#42637 [Opn-Asn]: SoapFault : Only http and https are allowed

2007-09-12 Thread iliaa
 ID:   42637
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christof at sanmax dot be
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.2.4
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-09-12 06:51:02] christof at sanmax dot be

Description:

When sending a request with the SoapClient, a SoapFault is produced :

Fatal error: Uncaught SoapFault exception: [HTTP] Unknown protocol.
Only http and https are allowed.

The probleem seems to be located in the php_url_parse_ex function. In
version 5.1.6 it works fine, in 5.2.4 is does not. The php scheme is
null instead of http according to our tests.

Reproduce code:
---
$base = 'http://some soap service url/service.asmx?WSDL';
$soap = new SoapClient($base, array('trace' = 1));

$login = new StdClass;
$login-userName  = 'test';
$login-passWord  = 'test';
$login-languageCode = 'NL';

$loginResult = $soap-Login($login);


Expected result:

no soapfault. In php 5.1.6 it works fine, no exception is thrown.

Actual result:
--
Fatal error: Uncaught SoapFault exception: [HTTP] Unknown protocol.
Only http and https are allowed in
/home/data/websites/www/phptest.php:10
Stack trace:
#0 [internal function]: SoapClient-__doRequest('?xml version=...',
'http://demobet5...', 'http://XServer', 1, 0)
#1 [internal function]: SoapClient-__call('Login', Array)
#2 /home/data/websites/www/phptest.php(10):
SoapClient-Login(Object(stdClass))
#3 {main}
  thrown in /home/data/websites/www/phptest.php on line 10






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


#42627 [Opn-Csd]: bz2 extension fails to build with -fno-common

2007-09-12 Thread jani
 ID:   42627
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jdolecek at netbsd dot org
-Status:   Open
+Status:   Closed
-Bug Type: Compile Failure
+Bug Type: Bzip2 Related
 Operating System: Mac OS X
 PHP Version:  5.2.4
 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:


[2007-09-11 19:34:15] jdolecek at netbsd dot org

Description:

bz2 extension header causes php_bz2_filter_factory symbol to be a
common symbol, rather then extern variable, due to lacking 'extern'
modifier. When compiling on Mac OS X, which uses -fno-common by default,
this causes build failure. The header should define it just as extern,
since the symbol is properly declared in bz2_filter.c.

Fix:

--- ext/bz2/php_bz2.h.orig  2007-09-02 20:11:08.0 +0200
+++ ext/bz2/php_bz2.h
@@ -51,7 +51,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2o
 #define php_stream_bz2open_from_BZFILE(bz, mode, innerstream) 
_php_stream_bz2open_from_BZFILE((bz), (mode), (innerstream) STREAMS_CC
TSRMLS_CC)
 #define php_stream_bz2open(wrapper, path, mode, options, opened_path) 
_php_stream_bz2open((wrapper), (path), (mode), (options), (opened_path),
NULL STREAMS_CC TSRMLS_CC)

-php_stream_filter_factory php_bz2_filter_factory;
+extern php_stream_filter_factory php_bz2_filter_factory;
 extern php_stream_ops php_stream_bz2io_ops;
 #define PHP_STREAM_IS_BZIP2php_stream_bz2io_ops








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


#42650 [NEW]: httpd segfaults when odbc_pconnect called with incorrect username/password

2007-09-12 Thread gordonthree at gmail dot com
From: gordonthree at gmail dot com
Operating system: Centos 5
PHP version:  5CVS-2007-09-13 (CVS)
PHP Bug Type: ODBC related
Bug description:  httpd segfaults when odbc_pconnect called with incorrect 
username/password

Description:

When attempting to connect to an odbc data source via odbc_pconnect with
incorrect username and/or password, the httpd (apache) instance handling
that connection segfaults.

OS is Centos 5 (RHEL5) running in a vmware server virtual machine 32 bit

I am using ODBC to connect to a mysql server running on localhost for
persistent db connections and mysql stored proc support.

Reproduce code:
---
HTMLBODY
?php

$link_id = odbc_pconnect('Default', 'root','badpassword');
if(!$link_id){die(no connection!);}
else{echo connected;}
?
/BODY/HTML

Expected result:

user should see connected printed on web page.

Actual result:
--
from httpd/error_log

[Wed Sep 12 23:45:44 2007] [notice] child pid 2233 exit signal
Segmentation fault (11)

[EMAIL PROTECTED] ~]# gdb http  2232
GNU gdb Red Hat Linux (6.5-16.el5rh)
This GDB was configured as i386-redhat-linux-gnu...http: No such file or
directory.

Attaching to process 2232
Reading symbols from /usr/sbin/httpd...(no debugging symbols
found)...done.
Using host libthread_db library /lib/libthread_db.so.1.
.
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_suexec.so
Reading symbols from /usr/lib/httpd/modules/mod_disk_cache.so...(no
debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_disk_cache.so
Reading symbols from /usr/lib/httpd/modules/mod_file_cache.so...
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_file_cache.so
Reading symbols from /usr/lib/httpd/modules/mod_mem_cache.so...(no
debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_mem_cache.so
Reading symbols from /usr/lib/httpd/modules/mod_cgi.so...
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_cgi.so
Reading symbols from /usr/lib/httpd/modules/mod_perl.so...(no debugging
symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_perl.so
Reading symbols from
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
Reading symbols from /lib/libutil.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /usr/lib/httpd/modules/libphp5.so...
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/libphp5.so
Reading symbols from /usr/lib/libaspell.so.15...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libaspell.so.15
Reading symbols from /usr/lib/libpspell.so.15...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpspell.so.15
Reading symbols from /usr/lib/sse2/libgmp.so.3...done.
Loaded symbols for /usr/lib/sse2/libgmp.so.3
Reading symbols from /usr/lib/libcurl.so.3...done.
Loaded symbols for /usr/lib/libcurl.so.3
Reading symbols from /usr/lib/libbz2.so.1...done.
Loaded symbols for /usr/lib/libbz2.so.1
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/lib/httpd/modules/mod_python.so...done.
Loaded symbols for /etc/httpd/modules/mod_python.so
Reading symbols from /usr/lib/libpython2.4.so.1.0...done.
Loaded symbols for /usr/lib/libpython2.4.so.1.0
Reading symbols from /usr/lib/httpd/modules/mod_ssl.so...done.
Loaded symbols for /etc/httpd/modules/mod_ssl.so
Reading symbols from /usr/lib/libdistcache.so.1...done.
Loaded symbols for /usr/lib/libdistcache.so.1
Reading symbols from /usr/lib/libnal.so.1...done.
Loaded symbols for /usr/lib/libnal.so.1
Reading symbols from /usr/lib/php/modules/ldap.so...done.
Loaded symbols for /usr/lib/php/modules/ldap.so
Reading symbols from /usr/lib/php/modules/mbstring.so...done.
Loaded symbols for /usr/lib/php/modules/mbstring.so
Reading symbols from /usr/lib/php/modules/mysql.so...done.
Loaded symbols for /usr/lib/php/modules/mysql.so
Reading symbols from /usr/lib/mysql/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/mysql/libmysqlclient.so.15
Reading symbols from /usr/lib/php/modules/mysqli.so...done.
Loaded symbols for /usr/lib/php/modules/mysqli.so
Reading symbols from /usr/lib/php/modules/odbc.so...done.
Loaded symbols for /usr/lib/php/modules/odbc.so
Reading symbols from /usr/lib/libodbc.so.1...done.
Loaded symbols for /usr/lib/libodbc.so.1
Reading symbols from /usr/lib/libodbcpsql.so.2...done.
Loaded symbols for /usr/lib/libodbcpsql.so.2
Reading symbols from 

#42650 [Opn]: httpd segfaults when odbc_pconnect called with incorrect username/password

2007-09-12 Thread gordonthree at gmail dot com
 ID:   42650
 User updated by:  gordonthree at gmail dot com
 Reported By:  gordonthree at gmail dot com
 Status:   Open
 Bug Type: ODBC related
 Operating System: Centos 5
 PHP Version:  5CVS-2007-09-13 (CVS)
 New Comment:

sorry, it looks like the trace I provided was not for the worker that
actually died.  any tips on how to determine what httpd worker thread to
attach to, to capture it dieing?


Previous Comments:


[2007-09-13 03:59:09] gordonthree at gmail dot com

Description:

When attempting to connect to an odbc data source via odbc_pconnect
with incorrect username and/or password, the httpd (apache) instance
handling that connection segfaults.

OS is Centos 5 (RHEL5) running in a vmware server virtual machine 32
bit

I am using ODBC to connect to a mysql server running on localhost for
persistent db connections and mysql stored proc support.

Reproduce code:
---
HTMLBODY
?php

$link_id = odbc_pconnect('Default', 'root','badpassword');
if(!$link_id){die(no connection!);}
else{echo connected;}
?
/BODY/HTML

Expected result:

user should see connected printed on web page.

Actual result:
--
from httpd/error_log

[Wed Sep 12 23:45:44 2007] [notice] child pid 2233 exit signal
Segmentation fault (11)

[EMAIL PROTECTED] ~]# gdb http  2232
GNU gdb Red Hat Linux (6.5-16.el5rh)
This GDB was configured as i386-redhat-linux-gnu...http: No such file
or directory.

Attaching to process 2232
Reading symbols from /usr/sbin/httpd...(no debugging symbols
found)...done.
Using host libthread_db library /lib/libthread_db.so.1.
.
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_suexec.so
Reading symbols from /usr/lib/httpd/modules/mod_disk_cache.so...(no
debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_disk_cache.so
Reading symbols from /usr/lib/httpd/modules/mod_file_cache.so...
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_file_cache.so
Reading symbols from /usr/lib/httpd/modules/mod_mem_cache.so...(no
debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_mem_cache.so
Reading symbols from /usr/lib/httpd/modules/mod_cgi.so...
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_cgi.so
Reading symbols from /usr/lib/httpd/modules/mod_perl.so...(no debugging
symbols found)...done.
Loaded symbols for /etc/httpd/modules/mod_perl.so
Reading symbols from
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so
Reading symbols from /lib/libutil.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /usr/lib/httpd/modules/libphp5.so...
(no debugging symbols found)...done.
Loaded symbols for /etc/httpd/modules/libphp5.so
Reading symbols from /usr/lib/libaspell.so.15...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libaspell.so.15
Reading symbols from /usr/lib/libpspell.so.15...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpspell.so.15
Reading symbols from /usr/lib/sse2/libgmp.so.3...done.
Loaded symbols for /usr/lib/sse2/libgmp.so.3
Reading symbols from /usr/lib/libcurl.so.3...done.
Loaded symbols for /usr/lib/libcurl.so.3
Reading symbols from /usr/lib/libbz2.so.1...done.
Loaded symbols for /usr/lib/libbz2.so.1
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/lib/httpd/modules/mod_python.so...done.
Loaded symbols for /etc/httpd/modules/mod_python.so
Reading symbols from /usr/lib/libpython2.4.so.1.0...done.
Loaded symbols for /usr/lib/libpython2.4.so.1.0
Reading symbols from /usr/lib/httpd/modules/mod_ssl.so...done.
Loaded symbols for /etc/httpd/modules/mod_ssl.so
Reading symbols from /usr/lib/libdistcache.so.1...done.
Loaded symbols for /usr/lib/libdistcache.so.1
Reading symbols from /usr/lib/libnal.so.1...done.
Loaded symbols for /usr/lib/libnal.so.1
Reading symbols from /usr/lib/php/modules/ldap.so...done.
Loaded symbols for /usr/lib/php/modules/ldap.so
Reading symbols from /usr/lib/php/modules/mbstring.so...done.
Loaded symbols for /usr/lib/php/modules/mbstring.so
Reading symbols from /usr/lib/php/modules/mysql.so...done.
Loaded symbols for /usr/lib/php/modules/mysql.so
Reading symbols from /usr/lib/mysql/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/mysql/libmysqlclient.so.15
Reading symbols from /usr/lib/php/modules/mysqli.so...done.
Loaded symbols for 

#42625 [Fbk]: When mysql and mysqli enabled both together, php cli hangs

2007-09-12 Thread scottmac
 ID:   42625
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jama at mk dot cvut dot cz
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Gentoo/Linux
 PHP Version:  5.2.4
 New Comment:

Can you check CGI to see if you can reproduce this.

What version of libmysql are you linking against?


Previous Comments:


[2007-09-12 16:15:55] Martin dot Jansa at mk dot cvut dot cz

It hangs only with mysql, mysqli AND --enable-maintainer-zts.

I don't want to disable maintainer-zts, because I'm not using only
cli/cgi in real installation. :)

This 3 configure parameters is the smallest subset of those I'm
normally using.



[2007-09-12 11:50:41] [EMAIL PROTECTED]

Why are you using --enable-maintainer-zts in your configure line? You
really don't need this for CLI/CGI..



[2007-09-11 18:48:11] jama at mk dot cvut dot cz

Description:

when compiled vanilla php-5.2.4 with this params
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
it's ok

when added mysql support too
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
it's bad even sapi/cli/php -i hangs forever on futex call

strace sapi/cli/php -i

write(1, questions about PHP licensing, p..., 63questions about PHP
licensing, please contact [EMAIL PROTECTED]
) = 63
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) =
0
futex(0x2adbeb81cac0, FUTEX_WAIT, 2, NULL unfinished ...

The same behavior with php5.2-200709110830.


Reproduce code:
---
tar xjvf php-5.2.4.tar.bz2
mv php-5.2.4 php-5.2.4-mysqli
cp -r php-5.2.4-mysqli php-5.2.4-mysql-mysqli
cd php-5.2.4-mysql-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
make
sapi/cli/php -i #HANGS HERE#

cd ../php-5.2.4-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
make
sapi/cli/php -i #DOESN'T HANG HERE#

Diff between those 2 build dirs on my pc..
http://pastebin.com/m9c448da

Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop,
gcc-4.2.2-alpha20070905/amd64-vanilla, glibc-2.6.1-r0,
2.6.23-rc5-git1-JaMa x86_64)
=
System uname: 2.6.23-rc5-git1-JaMa x86_64 AMD Athlon(tm) 64 Processor
3700+
Timestamp of tree: Tue, 11 Sep 2007 10:01:01 +
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python: 2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS=amd64 ~amd64
CBUILD=x86_64-pc-linux-gnu
CFLAGS=-O2 -march=k8



Expected result:

php cli working

Actual result:
--
php cli hanging on every occasion





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


#42625 [Fbk-Opn]: When mysql and mysqli enabled both together, php cli hangs

2007-09-12 Thread jama at mk dot cvut dot cz
 ID:   42625
 User updated by:  jama at mk dot cvut dot cz
 Reported By:  jama at mk dot cvut dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: MySQL related
 Operating System: Gentoo/Linux
 PHP Version:  5.2.4
 New Comment:

/usr/bin/mysql_config --version
5.1.15-beta

but with same mysql and php-5.2.2 it was OK.

CGI I'll try later.


Previous Comments:


[2007-09-13 04:42:14] [EMAIL PROTECTED]

Can you check CGI to see if you can reproduce this.

What version of libmysql are you linking against?



[2007-09-12 16:15:55] Martin dot Jansa at mk dot cvut dot cz

It hangs only with mysql, mysqli AND --enable-maintainer-zts.

I don't want to disable maintainer-zts, because I'm not using only
cli/cgi in real installation. :)

This 3 configure parameters is the smallest subset of those I'm
normally using.



[2007-09-12 11:50:41] [EMAIL PROTECTED]

Why are you using --enable-maintainer-zts in your configure line? You
really don't need this for CLI/CGI..



[2007-09-11 18:48:11] jama at mk dot cvut dot cz

Description:

when compiled vanilla php-5.2.4 with this params
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
it's ok

when added mysql support too
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
it's bad even sapi/cli/php -i hangs forever on futex call

strace sapi/cli/php -i

write(1, questions about PHP licensing, p..., 63questions about PHP
licensing, please contact [EMAIL PROTECTED]
) = 63
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) =
0
futex(0x2adbeb81cac0, FUTEX_WAIT, 2, NULL unfinished ...

The same behavior with php5.2-200709110830.


Reproduce code:
---
tar xjvf php-5.2.4.tar.bz2
mv php-5.2.4 php-5.2.4-mysqli
cp -r php-5.2.4-mysqli php-5.2.4-mysql-mysqli
cd php-5.2.4-mysql-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysql=/usr
--with-mysqli=/usr/bin/mysql_config
make
sapi/cli/php -i #HANGS HERE#

cd ../php-5.2.4-mysqli
./configure --disable-all --enable-maintainer-zts --with-mysqli=/usr/
bin/mysql_config
make
sapi/cli/php -i #DOESN'T HANG HERE#

Diff between those 2 build dirs on my pc..
http://pastebin.com/m9c448da

Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop,
gcc-4.2.2-alpha20070905/amd64-vanilla, glibc-2.6.1-r0,
2.6.23-rc5-git1-JaMa x86_64)
=
System uname: 2.6.23-rc5-git1-JaMa x86_64 AMD Athlon(tm) 64 Processor
3700+
Timestamp of tree: Tue, 11 Sep 2007 10:01:01 +
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python: 2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS=amd64 ~amd64
CBUILD=x86_64-pc-linux-gnu
CFLAGS=-O2 -march=k8



Expected result:

php cli working

Actual result:
--
php cli hanging on every occasion





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


#42502 [Com]: GCC no longer implements varargs.h

2007-09-12 Thread chris at acu dot edu
 ID:   42502
 Comment by:   chris at acu dot edu
 Reported By:  supportnew at byethost dot com
 Status:   Assigned
 Bug Type: mbstring related
 Operating System: debian linux 4
 PHP Version:  5.2.4
 Assigned To:  hirokawa
 New Comment:

This problem is also reproduceable on Solaris 10.

./configure --prefix=/opt/php-5.2.4
--with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql
--with-libxml-dir=/usr --enable-calendar --with-gd=/usr/local
--with-ttf=/usr --with-freetype-dir=/usr --enable-exif
--with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xsl
--with-pdo-sqlite --with-pdo-mysql=/usr/local/mysql --with-pear
--with-iconv=/usr/local --enable-ftp --with-curl=/opt/php-5.2.4
--enable-mbstring --enable-embedded-mysqli --with-gettext

using

$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with:
/builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld
--enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)

produces the same error as supportnew at byethost dot com


Previous Comments:


[2007-09-12 11:58:15] [EMAIL PROTECTED]

Rui, feedback given.



[2007-09-11 20:44:55] supportnew at byethost dot com

ahh , the file 

main/php_config.h exists , and

the following values are present

/* Define if stdarg.h is available */
/* #undef HAVE_STDARG_PROTOTYPES */


/* Define if you have the stdarg.h header file.  */
#define HAVE_STDARG_H 1



[2007-09-11 20:39:39] supportnew at byethost dot com

Hi ,

 find -name config.h
./ext/pcre/pcrelib/config.h
./ext/pdo_sqlite/sqlite/src/config.h
./ext/bcmath/libbcmath/src/config.h
./ext/mbstring/libmbfl/config.h
./ext/mbstring/oniguruma/win32/config.h
./ext/mbstring/oniguruma/config.h
./ext/sqlite/libsqlite/src/config.h

I cant see a file called main/config.h could this be the cause ? 

This is a direct extract from php-5.2.4.tar.bz2 sources.



[2007-09-04 14:06:54] [EMAIL PROTECTED]

Please show me if HAVE_STDARG_PROTOTYPES and HAVE_STDARG_H are
 defined or not in your main/config.h

I think that HAVE_STDARG_PROTOTYPES isn't properly defined.
If it is not defined stdarg.h is not existing in you include path.




[2007-09-03 08:17:14] [EMAIL PROTECTED]

Assigned to the mbstring maintainer.



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

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