php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63864 From time to time "PHP Fatal error: Class 'MySQLi' not found"
Submitted: 2012-12-28 03:44 UTC Modified: 2012-12-28 14:11 UTC
From: jmdoren at ok dot cl Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.4.10 OS: Fedora release 13 (Goddard)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jmdoren at ok dot cl
New email:
PHP Version: OS:

 

 [2012-12-28 03:44 UTC] jmdoren at ok dot cl
Description:
------------
From time to time i recive the error " PHP Fatal error:  Class 'MySQLi' not 
found in.....", the script runs several times each minute but the error is 
generated only 1 or 2 times in an hour.
Php was generated liske this:

System	Linux db2 2.6.34.7-66.fc13.x86_64 #1 SMP Wed Dec 15 07:04:30 UTC 2010 
x86_64
Build Date	Dec 27 2012 21:26:02
Configure Command	 './configure' '--with-mysqli' '--with-mysql' '--with-
apxs2=/usr/local/apache2/bin/apxs' '--with-config-file-path=/etc' '--enable-
calendar' '--disable-simplexml' '--enable-libxml' '--with-curl' '--enable-
mbstring' '--with-mysqli=mysqlnd' '--with-gd' '--with-jpeg-dir=/usr/lib64/' '--
with-t1lib' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local' '--with-
zlib'
Server API	Apache 2.0 Handler
Virtual Directory Support	enabled

PHP API	20100412
PHP Extension	20100525
Zend Extension	220100525
Zend Extension Build	API220100525,TS
PHP Extension Build	API20100525,TS

*****************************************
eAccelerator
Version	1.0-dev
Caching Enabled	true
Optimizer Enabled	true
Check mtime Enabled	true
Memory Size	33,554,368 Bytes
Memory Available	33,350,888 Bytes
Memory Allocated	203,480 Bytes
Cached Scripts	9
Removed Scripts	0


mysqli
****************************************
Client API library version	mysqlnd 5.0.10 - 20111026 - $Id: 
b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $
Active Persistent Links	0
Inactive Persistent Links	0
Active Links	0

Directive	Local Value	Master Value
mysqli.allow_local_infile	On	On
mysqli.allow_persistent	On	On
mysqli.default_host	no value	no value
mysqli.default_port	3306	3306
mysqli.default_pw	no value	no value
mysqli.default_socket	/var/lib/mysql/mysql.sock	
/var/lib/mysql/mysql.sock
mysqli.default_user	no value	no value
mysqli.max_links	Unlimited	Unlimited
mysqli.max_persistent	Unlimited	Unlimited
mysqli.reconnect	Off	Off



Test script:
---------------
<?php
// call this several times form web and it will trigger an error some few times
$p = new cl_ok_MySQL();
echo "sip";


class cl_ok_MySQL extends MySQLi{}

?>

Expected result:
----------------
No error

Actual result:
--------------
look the time, the script is called several times per minute ( more than 200 ) but 
it only generates this error from time to time...:

[27-Dec-2012 22:08:03] PHP Fatal error:  Class 'MySQLi' not found in 
/ssd0/cl/ok/src/produccion/cl/ok/MySQL.class.php on line 11
[27-Dec-2012 23:08:03] PHP Fatal error:  Class 'MySQLi' not found in 
/ssd0/cl/ok/src/produccion/cl/ok/MySQL.class.php on line 11
[28-Dec-2012 00:03:04] PHP Fatal error:  Class 'MySQLi' not found in 
/ssd0/cl/ok/src/produccion/cl/ok/MySQL.class.php on line 11
[28-Dec-2012 00:23:04] PHP Fatal error:  Class 'MySQLi' not found in 
/ssd0/cl/ok/src/produccion/cl/ok/MySQL.class.php on line 11


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-28 13:10 UTC] jmdoren at ok dot cl
-Status: Open +Status: Closed
 [2012-12-28 13:10 UTC] jmdoren at ok dot cl
It was a local problem on our server.
Sorry for any inconveniences.

For your information:
For some reason there were two different php versions installed which caused a 
conflict. The script that triggered the error was not run by the web server but by 
a cron job.
 [2012-12-28 14:11 UTC] rasmus@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC