Mysqli class not found. Using percona, php5-fpm, nginx, phalcon

Fatal error: Class 'TKStdlib\mysqli' not found in /var/www/tk-browser-app/application/library/tk-stdlib/DbAbstract.php on line 28 

Looks like I need mysqli. Yes, I know, but it says that it is installed when I do "php -m". This is in my php.ini file in php5-fpm as "extension = mysqli.so".

I find this http://www.php.net/manual/en/mysqli.installation.php manual quite difficult to follow. Where should the file be. / configure? Is this for php5-mysql or is it true for percona mysql?

+2
class mysqli percona
source share
1 answer

You installed a script in a namespace and searched for a class in that namespace.

You can get around this by explicitly trying to refer to the mysqli class as a global class:

 $db = new \mysqli( ... ); 

For more on this, see http://php.net/manual/en/language.namespaces.fallback.php , which states:

Class names always resolve the name of the current namespace.

+2
source share

All Articles