#46972 [Com]: php.ini is not loaded from registry

2009-01-10 Thread lorenzo at perusia dot it
 ID:   46972
 Comment by:   lorenzo at perusia dot it
 Reported By:  leonardo at kreativ dot ro
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: win32 only - Windows 2003
 PHP Version:  5.2.8
 New Comment:

Same problem experienced on Windows XP


Previous Comments:


[2008-12-30 13:09:18] leonardo at kreativ dot ro

Description:

As described in the documentation at:
http://www.php.net/manual/en/configuration.file.php the file php.ini is
loaded from Windows Registry as follows:

"[...] in order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath,
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z mean the
PHP major, minor and release versions."

a) The file resides in the path d:\php\5.2.8.
b) I use php5isapi.dll on IIS 6 on Windows 2003
c) I inserted this key in the registry as follows:

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2.8]
"IniFilePath"="d:\php\5.2.8"

but it still doesn't work. phpinfo() reports the configuration path as
C:\WINDOWS.

I guess either the documentation lacks of specific details about the
registry settings or this 5.2.8 version ignores the registry settings.

For me it is important so that this setting should work because I
intend to keep several versions of PHP in the future and I don't want to
change the environment settings (Path or PHPRC).

Expected result:

To load the php.ini from Windows Registry.

Actual result:
--
It loads the php.ini from C:\Windows





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



#45940 [Com]: MySQLI OO does not populate connect_error property on failed connect

2009-01-10 Thread nullhility at gmail dot com
 ID:   45940
 Comment by:   nullhility at gmail dot com
 Reported By:  talmage dot news at gmail dot com
 Status:   Assigned
 Bug Type: MySQLi related
 Operating System: Centos 5
 PHP Version:  5.2.6
 Assigned To:  mysql
 New Comment:

Getting the same error with the following version:
PHP 5.2.4-2ubuntu5.4 with Suhosin-Patch 0.9.6.2

I was attempting to suppress errors so I could control
output/formatting etc. Thought i'd just re-iterate this for version
related purposes.

connect_error);
var_dump(mysqli_connect_error());
?>

output:

Warning: main(): Couldn't fetch mysqli in /home/default/php/mysqli.php
on line 4
NULL
string(63) "Access denied for user 'r00t'@'localhost' (using password:
YES)"


Previous Comments:


[2008-12-25 21:17:22] ws at develtheory dot com

Was able to reproduce the error in the same method on php 5.2.8, both
with purposeful incorrect passwords and nonexistent host/port combos.

the object is created, connect_error returns NULL on var_dump, error
log dumps:
"Dec 25 15:12:18 dev01 httpd: PHP Warning:  dbo::__construct() [dbo.--construct]: Couldn't fetch mysqli in
/nfs/beta/www/classes/dbo-new.inc.php on line 88"



[2008-12-01 13:39:16] dannyrjohnston at msn dot com

Forget my previous comment.  I found some code between the new mysqli
statement in the example I was using which was setting the $dbObj to
false if mysql_connect_error was returning a value.



[2008-12-01 13:17:14] dannyrjohnston at msn dot com

I have duplicated this issue.

According to the manual mysqli::__construct should always return a
object, but the function is returning a false value on error.

I have tried three different possible error conditions and have the
following results:

   Bad user/password combo: mysqli_connect_error() returns "Access
denied for user 'xxx'@'xxx' (using password: YES)", return value is
false.

   User does not have access to the db selected:
mysqli_connect_error()returns "Access denied for user 'xxx'@'xxx' to
database 'xxx'", return value is false.

   Bad port number: mysqli_connect_error() returns "Can't connect to
MySQL server on 'localhost' (10061)", return value is false.

I have not checked any other cases such as bad socked name, but in each
of the above conditions I received a false value not an object.

test code:


error result:
dbObj=bool(false)

sucess result:
dbObj==object(mysqli)#1 (0) {
}



[2008-11-29 00:22:45] valentin71 at gmail dot com

Not quite sure that mudroeb is right.  
According to manual the right call format must be following:
mysqli mysqli_connect ( [string host [, string username [, string
passwd [, string dbname [, int port [, string socket]] )

However  
conn=new mysqli('localhost','user','password','my_db',3306);
works as expected.



[2008-11-29 00:08:06] mudroeb at gmail dot com

Get the same problem but make investigation:

$mysqli = new mysqli("localhost:3307", "my_user", "my_password",
"world");
-> got error

$mysqli = new mysqli("127.0.0.1:3307", "my_user", "my_password",
"world");
-> got error

BUT!:
$mysqli = new mysqli("127.0.0.1:3306", "my_user", "my_password",
"world");
-> change server port to default (3306).

$mysqli = new mysqli("localhost", "my_user", "my_password",
"world");
-> all works correct. 
Seems that variable not parsed for $HOST_NAME and $PORT_NUMBER and
function try to connect using incorrect (not parsed) string.



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

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



#47059 [Fbk]: Apache crashes php5ts.dll

2009-01-10 Thread pajoye
 ID:   47059
 Updated by:   paj...@php.net
 Reported By:  brian at alternate-zone dot com
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows XP
 PHP Version:  5.2.8
 New Comment:

I mean which libmysql, for example if you have installed and use mysql
5.1 and libmysql 5.1 dll is used by php.


Previous Comments:


[2009-01-10 02:25:56] brian at alternate-zone dot com

I'm using PHP5.2.8 Win32 zip package
and the mysql dll is: php_mysql.dll



[2009-01-10 00:38:52] paj...@php.net

Which PHP binaries do you use and which mysql DLL?



[2009-01-10 00:36:28] brian at alternate-zone dot com

Description:

when I try to make a connection to the database Mysql the Apache HTTP
server crashes.

szAppName: httpd.exe szAppVer: 2.2.11.0 szModName: php5ts.dll
szModVerL 5.2.8.8 offset: 9fe6

Reproduce code:
---
';
echo 'Name: ' . $field['name'] . '';
}

?>

Expected result:

ID: 1
Name: John

Actual result:
--
Apache HTTP Server has encountered a problem and needs to close





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



#47061 [NEW]: User not logged under Apache

2009-01-10 Thread php at planchon dot org
From: php at planchon dot org
Operating system: Debian
PHP version:  6CVS-2009-01-10 (CVS)
PHP Bug Type: Apache related
Bug description:  User not logged under Apache

Description:

User is not logged in apache log when using an external authentication
method which not fake basic auth. This bug was introduced in with php
bugfix #22672 (apache bug #8500)


Reproduce code:
---
Use an external authentication method not based on Basic and Digest. (NTLM
or mod_auth_pubtkt) and call a php URI.

Expected result:

User appears in apache log

Actual result:
--
User in apache log is '-' which mean no user is logged

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



#47061 [Com]: User not logged under Apache

2009-01-10 Thread php at planchon dot org
 ID:   47061
 Comment by:   php at planchon dot org
 Reported By:  php at planchon dot org
 Status:   Open
 Bug Type: Apache related
 Operating System: Debian
 PHP Version:  6CVS-2009-01-10 (CVS)
 New Comment:

The bug is an interaction between 
main/main.c and sapi/apache2handler/sapi_apache2.c (and maybe other
connector)

sapi_apache2.c
472 auth = apr_table_get(r->headers_in, "Authorization");
473 php_handle_auth_data(auth TSRMLS_CC);
474 if (SG(request_info).auth_user == NULL && r->user) {
475 SG(request_info).auth_user = estrdup(r->user);
476 }
477 ctx->r->user = apr_pstrdup(ctx->r->pool,
SG(request_info).auth_user);

main.c do a correct work but sapi consider main knowing the world and
resetting user (line 477) according to auth mechanism made by main (line
473)

The user should be setting only if a real user has been set.
so the line 477 should look likes (not tested)
if( SG(request_info).auth_user && !ctx->r->user )
   ctx->r->user = apr_pstrdup(ctx->r->pool,
SG(request_info).auth_user);

In fact I've detected this bug on my php 5.2.0 and check cvs from php5
and php6 to trace this bug.


Previous Comments:


[2009-01-10 11:38:55] php at planchon dot org

Description:

User is not logged in apache log when using an external authentication
method which not fake basic auth. This bug was introduced in with php
bugfix #22672 (apache bug #8500)


Reproduce code:
---
Use an external authentication method not based on Basic and Digest.
(NTLM or mod_auth_pubtkt) and call a php URI.

Expected result:

User appears in apache log

Actual result:
--
User in apache log is '-' which mean no user is logged





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



#46917 [Opn]: Socket handling completely broken

2009-01-10 Thread jost_boekemeier at users dot sf dot net
 ID:   46917
 User updated by:  jost_boekemeier at users dot sf dot net
 Reported By:  jost_boekemeier at users dot sf dot net
 Status:   Open
 Bug Type: Streams related
 Operating System: win32 only
 PHP Version:  5.2.8
 New Comment:

Here's a test case:

- TestServer.java --
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;


public class TestServer {

public static void main(String args[]) throws Exception {
ServerSocket ss = new ServerSocket (9090);
System.out.println("accepting connections");
Socket s = ss.accept();
System.out.println("got initial request");
InputStream in = s.getInputStream();
OutputStream out = s.getOutputStream();
while (true) {
out.write((byte)in.read());
out.flush();
System.out.println("waiting for next request");
}

}

}
-TestClient.php--




To reproduce this bug on Windows XP and above, start the server with:

  java TestServer

and refresh the

   http://127.0.0.1/TestClient.php

a few times.

Then stop TestServer and start it again.

Refresh 

   http://127.0.0.1/TestClient.php

to get a broken connection from PHP.


I was able to reproduce this bug with yesterday's 5.2 windows
snapshot.


Regards,
Jost Bökemeier


Previous Comments:


[2009-01-07 20:44:43] fel...@php.net

I changed the EGAIN to EWOULDBLOCK in the checking.

http://news.php.net/php.cvs/55434



[2009-01-06 19:51:15] jost_boekemeier at users dot sf dot net

The windows equivalent to EAGAIN is EWOULDBLOCK or WSAEWOULDBLOCK. 

Could it be that EAGAIN is 0 on windows?


Unfortunately I don't have the time and resources to debug this at the
moment.



[2009-01-06 19:15:52] jost_boekemeier at users dot sf dot net

Well, the initialization is okay now.

However, the code still doesn't work on windows. Which means that
there's another bug.

The php_socket_errno() != EAGAIN looks  suspicious.

"Depending on whether your socket is blocking or non-blocking, you 
either get FD_CLOSE notification, or recv() returns 0 (graceful 
disconnection), or recv() returns WSAECONNRESET error."

I don' see how the current code handles these three cases properly.



[2009-01-06 17:41:49] fel...@php.net

Currently the WSASetLastError(0); already exists for Windows in the
code.



[2009-01-06 16:15:20] jost_boekemeier at users dot sf dot net

Hi,

the code is okay for Linux, but on Windows it fails constantly.

+   WSASetLastError(0);
n = select(max_fd + 1, &rset, &wset, &eset, timeout >= 0 ? &tv :
NULL);

IMHO this means that select always returns EAGAIN on windows, so that
the following test cannot detect a broken connection. As I've said, I am
not sure what the EAGAIN test should do, anyway.


To reproduce this: 

1) start a simple socket server on windows >= xp, call pfsockopen() and
let the PHP instance return to the HTTP server's pool w/o closing the
connection

2) kill the socket server and start it again

3) pull the PHP instance from the pool and call pfsockopen() again.
pfsockopen() will use the broken connection until you kill the pool
(i.e.: restart apache or IIS).


Regards,
Jost Bökemeier



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

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



#47054 [Opn->Csd]: BC break in static functions called as dynamic

2009-01-10 Thread felipe
 ID:   47054
 Updated by:   fel...@php.net
 Reported By:  giovanni at giacobbi dot net
-Status:   Open
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.3CVS-2009-01-09 (snap)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-01-09 15:20:30] giovanni at giacobbi dot net

Description:

See the example code, should be self explanatory. The same code *works
as expected* in php5.3-alpha3, but does not with php5.3-200901091330.


Reproduce code:
---
class C {
  final protected static function s() {
print "Called class: " . get_called_class() . "\n";
  }
}
class D extends C {
  public function m() {
$this->s();
  }
}

$d = new D();
$d->m();


Expected result:

Called class: D


Actual result:
--
Warning: get_called_class() called from outside a class in
/home/johnny/build/php5.3-200901091330/- on line 4
Called class: 






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



#47053 [Opn->Fbk]: empty($FRED) returns false incorrectly

2009-01-10 Thread felipe
 ID:   47053
 Updated by:   fel...@php.net
 Reported By:  mc at cowensw dot cxo dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  6CVS-2009-01-09 (CVS)
 New Comment:

Show us the var_dump()'s output to the variable that produces the wrong
empty() return.

Thanks.


Previous Comments:


[2009-01-09 14:35:37] mc at cowensw dot cxo dot uk

Description:

Hosting moved to new version 8-1-2009.  Since then in certain
situations the empty() function now returns wrong value.  Argument holds
space, but function returns "not empty".

Tested all normal empty functions, and they are OK
(http://www.dev.holidaynetwork.co.uk/Test3.php)

In this case $purchaseToken is derived from a row in a Session
Variable.

I have tried to reproduce this with smaller simpler scripts, but with
no success.





Reproduce code:
---
Sample extract from script:
echo '  purchaseToken7>>'.$purchaseToken7.'<< ';
echo '  rhf>>'.$rhf.'<< ';
echo '  $_SESSION["Sess_purchaseToken7"] array   >>';
print_r($_SESSION["Sess_purchaseToken7"]); echo '<< ';
echo '  $_SESSION["Sess_purchaseToken7"][$rhf] array  
>>'.$_SESSION["Sess_purchaseToken7"][$rhf].'<< ';
echo '  strlen(purchaseToken7)>>'.strlen($purchaseToken7).'<<
';
echo '  bin2hex(purchaseToken7)>>'.bin2hex($purchaseToken7).'<<
';

if (!empty($purchaseToken7) ) echo "purchaseToken not empty"; else
echo "purchaseToken  empty" ;
if (empty($purchaseToken7) ) echo "purchaseToken empty"; else echo
"purchaseToken not empty ";
$ShowDiag = 0;
exit()



Expected result:

Sample Output
Shows  variable purchaseToken is space,
However empty function returns "not empty"

purchaseToken7 >> << 
rhf >>9<< 
$_SESSION["Sess_purchaseToken7"] array >>Array ( [0] => 0 [1] => [2] =>
[3] => 0 [4] => 0 [5] => [6] => [7] => [8] => [9] => ) << 
$_SESSION["Sess_purchaseToken7"][$rhf] array >> << 
strlen(purchaseToken7) >>1<< 
bin2hex(purchaseToken7) >>20<< 
purchaseToken empty
purchaseToken empty 

Actual result:
--
Sample Output
Shows  variable purchaseToken is space,
However empty function returns "not empty"

purchaseToken7 >> << 
rhf >>9<< 
$_SESSION["Sess_purchaseToken7"] array >>Array ( [0] => 0 [1] => [2] =>
[3] => 0 [4] => 0 [5] => [6] => [7] => [8] => [9] => ) << 
$_SESSION["Sess_purchaseToken7"][$rhf] array >> << 
strlen(purchaseToken7) >>1<< 
bin2hex(purchaseToken7) >>20<< 
purchaseToken not empty
purchaseToken not empty 





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



#47062 [NEW]: Segmentation fault running a class method

2009-01-10 Thread charpour at gnet dot gr
From: charpour at gnet dot gr
Operating system: Debian 4.0 Gnu/Linux
PHP version:  5.2.8
PHP Bug Type: Reproducible crash
Bug description:  Segmentation fault running a class method

Description:

When running the code below, php crashes with a Segmentation fault.

(Found that by mistake)

Reproduce code:
---
invalid();
}
}

$segfault = new SegFault();

$segfault->invalid();

?>

Expected result:

not to seg fault

Actual result:
--
Segmentation fault

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



#47062 [Opn]: Segmentation fault running a class method

2009-01-10 Thread charpour at gnet dot gr
 ID:   47062
 User updated by:  charpour at gnet dot gr
 Reported By:  charpour at gnet dot gr
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Debian 4.0 Gnu/Linux
 PHP Version:  5.2.8
 New Comment:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212028704 (LWP 11428)]
0x0828500c in zend_std_get_method (object_ptr=0xbf4a70f4,
method_name=0xb7beaa3c "invalid", method_len=7)
at /root/packages/php-5.2.8/Zend/zend_object_handlers.c:771
771  zend_str_tolower_copy(lc_method_name, method_name, method_len);


Previous Comments:


[2009-01-10 19:49:06] charpour at gnet dot gr

Description:

When running the code below, php crashes with a Segmentation fault.

(Found that by mistake)

Reproduce code:
---
invalid();
}
}

$segfault = new SegFault();

$segfault->invalid();

?>

Expected result:

not to seg fault

Actual result:
--
Segmentation fault





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



#47062 [Opn->Bgs]: Segmentation fault running a class method

2009-01-10 Thread felipe
 ID:   47062
 Updated by:   fel...@php.net
 Reported By:  charpour at gnet dot gr
-Status:   Open
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Debian 4.0 Gnu/Linux
 PHP Version:  5.2.8
 New Comment:

As of 5.3 the segfault was fixed for infinite recursive calls.
Now we get:
"Fatal error: Allowed memory size of 134217728 bytes exhausted at
/home/felipe/dev/php5/Zend/zend_execute.h:157 (tried to allocate 261900
bytes)"

but in 5.2 it's expected.


Thanks.


Previous Comments:


[2009-01-10 19:56:39] charpour at gnet dot gr

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212028704 (LWP 11428)]
0x0828500c in zend_std_get_method (object_ptr=0xbf4a70f4,
method_name=0xb7beaa3c "invalid", method_len=7)
at /root/packages/php-5.2.8/Zend/zend_object_handlers.c:771
771  zend_str_tolower_copy(lc_method_name, method_name, method_len);



[2009-01-10 19:49:06] charpour at gnet dot gr

Description:

When running the code below, php crashes with a Segmentation fault.

(Found that by mistake)

Reproduce code:
---
invalid();
}
}

$segfault = new SegFault();

$segfault->invalid();

?>

Expected result:

not to seg fault

Actual result:
--
Segmentation fault





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



#47048 [Opn]: php5-pgsql segfaults with new pg_meta_data

2009-01-10 Thread felipe
 ID:   47048
 Updated by:   fel...@php.net
 Reported By:  ml-php dot net at bettercom dot de
 Status:   Open
 Bug Type: PostgreSQL related
 Operating System: FreeBSD 7.0-RELEASE
 PHP Version:  5.2.8
 New Comment:

I can't reproduce it on Linux.

PostgreSQL Support => enabled
PostgreSQL(libpq) Version => 8.3.5
Multibyte character support => enabled
SSL support => enabled
Active Persistent Links => 0
Active Links => 0



Previous Comments:


[2009-01-09 11:38:06] ml-php dot net at bettercom dot de

Description:

The last changes php_pgsql_meta_data cause segfaults in client and 
mod_php5

Reproduce code:
---



Actual result:
--
(gdb) bt
#0  0x28606b20 in php_pgsql_meta_data () 
from /usr/local/lib/php/20060613/pgsql.so
#1  0x2860c49b in zif_pg_meta_data () 
from /usr/local/lib/php/20060613/pgsql.so
#2  0x0818be08 in zend_do_fcall_common_helper_SPEC ()
#3  0x0817d639 in execute ()
#4  0x0815ffc2 in zend_execute_scripts ()
#5  0x0811e7b5 in php_execute_script ()
#6  0x081db5e7 in main ()






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



#47045 [Opn->Asn]: Bug when comparing SplObjectStorage instances

2009-01-10 Thread felipe
 ID:   47045
 Updated by:   fel...@php.net
 Reported By:  karsten at typo3 dot org
-Status:   Open
+Status:   Assigned
 Bug Type: SPL related
 Operating System: Mac OS X 10.5.6
 PHP Version:  5.3.0alpha3
 Assigned To:  colder


Previous Comments:


[2009-01-09 10:21:42] karsten at typo3 dot org

Description:

Two instances of SplObjectStorage should be considered equal only if 
they contain the same objects, when using == for comparison.

Reproduce code:
---
attach($someObject);

var_dump($objectStorage === $objectStorage1); // FALSE, fine
var_dump($objectStorage == $objectStorage1); // TRUE, huh?

$objectStorage1->attach($someObject);

var_dump($objectStorage === $objectStorage1); // FALSE, fine
var_dump($objectStorage == $objectStorage1); // TRUE, fine

?>


Expected result:

bool(false)
bool(true)
bool(false)
bool(false)
bool(false)
bool(true)


Actual result:
--
bool(false)
bool(true)
bool(false)
bool(true)
bool(false)
bool(true)






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



#47064 [NEW]: oo style msqli->connect_error always NULL

2009-01-10 Thread greg dot hendrickson at yahoo dot com
From: greg dot hendrickson at yahoo dot com
Operating system: Windows XP SP3
PHP version:  5.2.8
PHP Bug Type: MySQLi related
Bug description:  oo style msqli->connect_error always NULL

Description:

Object oriented style mysqli->connect_error string always null even when a
connection error occurs. Tried with bogus host name, bogus user name, bogus
password, and bogus schemata...result always the same
(mysqli->connect_error is NULL). Note: Procedural style always returns
expected string value. 

Installed PHP with Windows Installer, Apache 2.2 Module and the following
extensions: BZ2, MCRYPT, MHASH, MYSQLI, PDO, TIDY, XMLRPC, XSL and ZIP.

Reproduce code:
---
connect_error string:
".$mysqli->connect_error."";
echo $connecterror;

printf("Proceedural style mysqli_connect_error string: %s\n",
mysqli_connect_error()."");

/* check connection never works*/
if ($mysqli->connect_error()) {
printf("Connect failed: %s\n", mysqli_connect_error()."");
exit();
}

/* close connection */
$mysqli->close();
?>

Expected result:

Object oriented style mysqli->connect_error string: Unknown MySQL server
host 'bogus' (11001)
Proceedural style mysqli_connect_error string: Unknown MySQL server host
'bogus' (11001)
Connect failed: Unknown MySQL server host 'bogus' (11001)


Actual result:
--
Object oriented style mysqli->connect_error string:
Proceedural style mysqli_connect_error string: Unknown MySQL server host
'bogus' (11001)

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



#47064 [Opn->Bgs]: oo style msqli->connect_error always NULL

2009-01-10 Thread johannes
 ID:   47064
 Updated by:   johan...@php.net
 Reported By:  greg dot hendrickson at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Windows XP SP3
 PHP Version:  5.2.8
 New Comment:

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

Thank you for your interest in PHP.

see bug #45940


Previous Comments:


[2009-01-10 21:13:04] greg dot hendrickson at yahoo dot com

Description:

Object oriented style mysqli->connect_error string always null even
when a connection error occurs. Tried with bogus host name, bogus user
name, bogus password, and bogus schemata...result always the same
(mysqli->connect_error is NULL). Note: Procedural style always returns
expected string value. 

Installed PHP with Windows Installer, Apache 2.2 Module and the
following extensions: BZ2, MCRYPT, MHASH, MYSQLI, PDO, TIDY, XMLRPC, XSL
and ZIP.

Reproduce code:
---
connect_error string:
".$mysqli->connect_error."";
echo $connecterror;

printf("Proceedural style mysqli_connect_error string: %s\n",
mysqli_connect_error()."");

/* check connection never works*/
if ($mysqli->connect_error()) {
printf("Connect failed: %s\n", mysqli_connect_error()."");
exit();
}

/* close connection */
$mysqli->close();
?>

Expected result:

Object oriented style mysqli->connect_error string: Unknown MySQL
server host 'bogus' (11001)
Proceedural style mysqli_connect_error string: Unknown MySQL server
host 'bogus' (11001)
Connect failed: Unknown MySQL server host 'bogus' (11001)


Actual result:
--
Object oriented style mysqli->connect_error string:
Proceedural style mysqli_connect_error string: Unknown MySQL server
host 'bogus' (11001)





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



#46808 [Com]: Mysqli crashes on LONGTEXT columns

2009-01-10 Thread wcshields at gmail dot com
 ID:   46808
 Comment by:   wcshields at gmail dot com
 Reported By:  wcshields at gmail dot com
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Ubuntu 8.04 LTS x86 32 bit
 PHP Version:  5.2.8
 New Comment:

Isn't the mysqlnd option for PHP 5.3+?  If so, that's hardly a solution
since 5.3 isn't out yet.


Previous Comments:


[2008-12-11 16:09:15] webmaster at ajeux dot com

Note: No bug when mysqlnd is used. (configure with
--with-mysqli=mysqlnd)



[2008-12-11 11:18:32] webmaster at ajeux dot com

Bug confirmed here on PHP 5.3 with Mysql 5.0.51
SELECT query : 

"SELECT id, UNCOMPRESS(myfield) FROM mytable ORDER BY id LIMIT 8"
myfield is BLOB.

How can we help to get it fixed ?

"Program received signal SIGSEGV, Segmentation fault."

Backtrace:
#0  0xb7aedb00 in mysqli_stmt_fetch_libmysql (ht=0,
return_value=0xb71cbe4c, return_value_ptr=0x0, this_ptr=0xb7265748,
return_value_used=1)
at /usr/src/php5.3-200812091530/ext/mysqli/mysqli_api.c:842
#1  0xb7aedf0d in zif_mysqli_stmt_fetch (ht=0, return_value=0xb71cbe4c,
return_value_ptr=0x0, this_ptr=0xb7265748, return_value_used=1)
at /usr/src/php5.3-200812091530/ext/mysqli/mysqli_api.c:984
#2  0x0827a4b9 in zend_do_fcall_common_helper_SPEC
(execute_data=0xb776af88) at
/usr/src/php5.3-200812091530/Zend/zend_vm_execute.h:313
#3  0x08279a32 in execute (op_array=0xb738bd94) at
/usr/src/php5.3-200812091530/Zend/zend_vm_execute.h:104
#4  0x08253c17 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php5.3-200812091530/Zend/zend.c:1197
#5  0x081faf59 in php_execute_script (primary_file=0xbfb12090) at
/usr/src/php5.3-200812091530/main/main.c:2080
#6  0x082ec5a9 in main (argc=1, argv=0xbfb121e4) at
/usr/src/php5.3-200812091530/sapi/cgi/cgi_main.c:2000



[2008-12-09 07:31:00] wcshields at gmail dot com

Description:

Mysqli restores garbage from longtext columns in mysql 5.0.51a
connected over TCP (also happens with Unix domain sockets) and, after a
random number of rows, seg faults.  The number of rows is unpredictable
but consistent.  If you find something that crashes after 11 rows, it
will crash after 11 rows every time.  Change the order by clause and it
might crash every time after 3 rows.

As per bugs #44867 and several others I've found, people have been
reporting this issue since as early as 2005 and it still hasn't been
addressed.  Can someone PLEASE actually look into it?

Reproduce code:
---
prepare("SELECT name, longtext1 FROM sampletable");
$stmt->execute();
$stmt->bind_result($name, $value);
$count = 1;
while ($stmt->fetch()) {
$size = sizeof($value);
echo "$name $size\n";
$count++;
}
$stmt->close();
?>

Expected result:

To retrieve the exact contents of all longtext values without crashing.

Actual result:
--
Segmentation fault.
$ gdb php core
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/librt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/libmysqlclient.so.15
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Core was generated by `./php'.
Program terminated with signal 11, Segmentation 

#47050 [Opn->Bgs]: mysqli_poll() modifies improper variables

2009-01-10 Thread felipe
 ID:   47050
 Updated by:   fel...@php.net
 Reported By:  vr...@php.net
-Status:   Open
+Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Windows
 PHP Version:  5.3.0alpha4-dev
 New Comment:

It's looks expected, Jakub.

See the prototype:
public int mysqli::poll ( array &$read , array &$error , array &$reject
, int $sec [, int $usec ] )
int mysqli_poll ( array &$read , array &$error , array &$reject , int
$sec [, int $usec ] )


Previous Comments:


[2009-01-09 13:06:50] vr...@php.net

Description:

mysqli_poll() modifies the variable which was assigned to variables
passed to mysqli_poll().

The reason probably is that mysqli_poll() doesn't copy zvals on write
as it should.

Reproduce code:
---
query("SELECT 'test'", MYSQLI_ASYNC);
$all_links = array($link1);
$links = $errors = $reject = $all_links;
mysqli_poll($links, $errors, $reject, 1);
print_r($all_links);


Expected result:

Array
(
[0] => mysqli Object
)

Actual result:
--
Array
(
)






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



#47051 [Opn]: pg_fetch_object does not convert to literal PHP booleans

2009-01-10 Thread felipe
 ID:   47051
 Updated by:   fel...@php.net
 Reported By:  germ dot van dot eck at gmail dot com
 Status:   Open
-Bug Type: PostgreSQL related
+Bug Type: Feature/Change Request
 Operating System: Linux, Ubuntu 8.04
 PHP Version:  5.2.8
 New Comment:

This isn't a bug, it's only as pgsql works.

Moved to Feature/Change request.


Previous Comments:


[2009-01-09 13:30:24] germ dot van dot eck at gmail dot com

I did not complete my sentence...
"This causes that postgresql."
should be
"This causes that postgresql's booleans are not very usable in PHP".



[2009-01-09 13:24:51] germ dot van dot eck at gmail dot com

Description:

Postgresql booleans are internally stored as either 'f' or 't' (False
or True).
On retrieval using pg_fetch_object, they are simply retrieved as PHP
strings, rather than either 0 or 1, or even better, false or true.
This causes that postgresql.
I am not sure, but I think in the data returned by the server, there is
metadata explaining the field types and so they could be automatically
converted to PHP bools.
This is from a bugreport and related forum topic that was made for the
CodeIgniter framework.
Bugreport (slighly unrelated CI bug, but this issue was discussed in
the comments):
http://codeigniter.com/bug_tracker/bug/6303/
Forum topic:
http://codeigniter.com/forums/viewthread/101001/


Reproduce code:
---
test."\n";
pg_query('DROP TABLE test');
?>


Expected result:

1

Actual result:
--
t





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