ID: 44425 User updated by: phpbugs at wayoverthere dot com Reported By: phpbugs at wayoverthere dot com Status: Open Bug Type: PDO related Operating System: Linux/Windows PHP Version: 5.2CVS-2008-03-13 (snap) New Comment:
I have compiled directly from a CVS checkout (PHP_5_3) on openSuse 10.2, and I still see this problem. Is there anything I can do to convince someone that this bug actually exists? I don't understand how I'm the only one who can reproduce it, when I can reproduce it anywhere I test it - even using the precompiled Windows snapshots. I followed the instructions on compiling from CVS (meaning compiling all the specific version requirements of autoconf, etc. and running buildconf), and used these configure options: ./configure --prefix=/home/shared/php5cvs/ --with-zlib --with-mysql=shared --enable-pdo=shared --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-sqlite=shared My php.ini: extension=pdo.so extension=pdo_mysql.so extension=pdo_sqlite.so Running this test script: <?php class test extends PDO { function __call($name, array $args) { echo "Called $name in ".__CLASS__.'<br>'; } function foo() { echo "Called foo in ".__CLASS__.'<br>'; } } $sqlite = new test('sqlite::memory:'); $sqlite->foo(); $sqlite->bar(); $mysql = new test('mysql:dbname=test;host=localhost','root',''); $mysql->foo(); $mysql->bar(); ?> Gives: Called foo in test<br>Called bar in test<br>Called foo in test<br> Fatal error: Call to undefined method test::bar() in /home/shared/php5cvs/test.php on line 17 If necessary, I might be able to provide ssh access to one of the boxes I'm seeing this on. Previous Comments: ------------------------------------------------------------------------ [2008-03-15 19:34:40] phpbugs at wayoverthere dot com Can someone confirm/deny this bug using the Windows binary version as I did? At least that way there's no compiling issues to complicate things. Also, I poked around cvs.php.net and found what I think is the fix for #43663: http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.17.2.2&r2=1.82.2.31.2.17.2.3 I checked my local 5.3 snapshot and it does have those added lines. ------------------------------------------------------------------------ [2008-03-14 06:07:22] crrodriguez at suse dot de Works for me as well, with current 5_3 CVS ------------------------------------------------------------------------ [2008-03-13 22:25:06] phpbugs at wayoverthere dot com I'm still seeing the problem. I have recompiled PHP (php5.3-200803131930) on several different boxes - all Linux, but different distros (Ubuntu 7.10, openSuse 10.2, and a very old Gentoo box). On a hunch, I uninstalled the system PHP, thinking the custom PHP was using the system .so's. Same thing. I even tried installing PHP on a Win2k box using the snapshot http://snaps.php.net/win32/php5.3-win32-200803132030.zip. I used the recommended php.ini file as a base config file, but enabled php_pdo.dll, php_pdo_mysql.dll, and php_pdo_sqlite.dll extensions. Then I created test.php and put this in it: <?php class test extends PDO { function __call($name, array $args) { echo "Called $name in ".__CLASS__.'<br>'; } function foo() { echo "Called foo in ".__CLASS__.'<br>'; } } $sqlite = new test('sqlite::memory:'); $sqlite->foo(); $sqlite->bar(); $mysql = new test('mysql:dbname=foo;host=10.1.1.142','foo','bar'); $mysql->foo(); $mysql->bar(); ?> Running "php test.php" gives: Called foo in test<br>Called bar in test<br>Called foo in test<br>Fatal error: Call to undefined method test::bar() in C: \php5\test.php on line 17 ------------------------------------------------------------------------ [2008-03-13 16:10:44] [EMAIL PROTECTED] Works fine in snapshot and PHP 5.3 ------------------------------------------------------------------------ [2008-03-13 04:52:06] phpbugs at wayoverthere dot com Description: ------------ Exact(?) same bug as #43663, except connecting to a MySQL 5 server. I have also tried a 5.3 snapshot & got the same result. Tried both cgi and cli. Reproduce code: --------------- <?php class test extends PDO { function __call($name, array $args) { echo "Called $name in ".__CLASS__.'<br>'; } function foo() { echo "Called foo in ".__CLASS__.'<br>'; } } $a = new test('mysql:dbname=test;host=localhost','user','pw'); $a->foo(); $a->bar(); ?> Expected result: ---------------- "Called foo in test Called bar in test" Actual result: -------------- "Called foo in test Fatal error: Call to undefined method test::bar() in call.php on line 24" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44425&edit=1