Skip to content
Advertisement

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

JavaScript

It sounds like I need mysqli installed. Yea I know, but it says it’s installed when I do “php -m”. It’s in my php.ini file in php5-fpm as “extension=mysqli.so”.

I find this guide http://www.php.net/manual/en/mysqli.installation.php quite hard to follow. Where is the ./configure file supposed to be? Is that for php5-mysql or does it hold true for percona mysql also?

Advertisement

Answer

You’ve set your script into a namespace and it’s looking for the class in that namespace.

You can work around this by explicitly trying to reference the mysqli class as a global class:

JavaScript

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

Class names always resolve to the current namespace name.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement