|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-23 11:33 UTC] tony2001@php.net
[2006-09-25 08:12 UTC] mail at 0x002a dot dk
[2006-10-01 01:00 UTC] php-bugs at lists dot php dot net
[2010-12-20 12:19 UTC] jani@php.net
-Package: Tidy
+Package: PDO related
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
Description: ------------ I run an Apache (2.0.58) server, PDO (1.0RC2) and APC (3.0.11). My PDO randomly gives me this error (Fatal error: Call to a member function execute() on a non-object in /var/www/*/htdocs/classes/pdoMysql.class.php on line 33 ), without any errors in the log. The error occurs more frequently when the server is loading, but it also happens with no particular load, and some seconds after it works flawless again. I've tried the latest CVS snapshop for PHP 5, but it didn't fix the problem. PHP configure flags: './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' '--without-bz2' '--disable-calendar' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--disable-ftp' '--with-gettext' '--without-gmp' '--disable-hash' '--without-hwapi' '--without-iconv' '--without-informix' '--disable-ipv6' '--without-kerberos' '--disable-mbstring' '--with-mcrypt' '--disable-memory-limit' '--without-mhash' '--without-ming' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--without-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--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' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--without-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--without-pdo-dblib' '--with-pdo-mysql=/usr' '--without-pdo-odbc' '--without-pdo-pgsql' '--without-pdo-sqlite' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite' Reproduce code: --------------- #Snip: $this->cfg = array( 'db' => 'mysql', 'db_user' => '*', 'db_pwd' => '*', 'db_host' => 'localhost', 'db_db' => '*', 'db_opts' => array( PDO::ERRMODE_SILENT => true, PDO::ATTR_PERSISTENT => true, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true ) ); $this->pdo = new PDO($this->cfg['db'].':host='.$this->cfg['db_host'].';dbname='.$this->cfg['db_db'],$this->cfg['db_user'],$this->cfg['db_pwd'],$this->cfg['db_opts']); $stmt = $this->pdo->prepare("SELECT * FROM users"); $stmt->execute(); Expected result: ---------------- An array of info Actual result: -------------- Fatal error: Call to a member function execute() on a non-object in /var/www/*/htdocs/classes/pdoMysql.class.php on line 33