Home >Backend Development >PHP Tutorial >linux - There is already a mysqli extension in phpinfo, but it still cannot be used and reports mysqli not found. How to solve it?
phpinfo has displayed the relevant expansion information of mysqli
But when executing php xxx.php from the command line, it still reports mysqli not found
video_order.php code:
video_order.php is a script file, so I want to test it on the command line. How to solve it? Waiting online
phpinfo has displayed the relevant expansion information of mysqli
But when executing php xxx.php from the command line, it still reports mysqli not found
video_order.php code:
video_order.php is a script file, so I want to test it on the command line. How to solve it? Waiting online
I also encountered it, and the solution at that time was to change to a php version
The permissions have been adjusted and the browser can also access it. However, when executing the file through the command line php, an error is reported. How to solve it! ! Waiting online, urgent
Is the php.ini path on the command line configured? When using the command line, pass the -c parameter to the path to the php.ini file. php -c /.../php.ini /.../video_order.php
You directly access the web version, which executes cgi's php, and the command line executes cli's php. Try specifying the php.ini path of cli. Maybe cgi’s php.ini and cli’s php.ini are separate
The configuration files used for web page and command line execution are not necessarily the same
You can execute php --ini on the command line to check the loaded configuration file or directly execute php -m to check whether the mysqli extension is enabled