Mysqli extensions are already available in linux-phpinfo, but mysqlinotfound still cannot be used. how can this problem be solved?

Source: Internet
Author: User
The extension information of mysqli is displayed in phpinfo, but the command line execution of phpxxx. php still reports that mysqlinotfoundvideo_order.php code: video_order.php is a script file. how can I solve this problem? Online

The extension information of mysqli is displayed in phpinfo.

However, the command line still reports mysqli not found when executing php xxx. php.

Video_order.php code:

Video_order.php is a script file, so I want to test it on the command line. how can I solve this problem? Online

Reply content:

The extension information of mysqli is displayed in phpinfo.

However, the command line still reports mysqli not found when executing php xxx. php.

Video_order.php code:

Video_order.php is a script file, so I want to test it on the command line. how can I solve this problem? Online

I also met, but the solution was to change to a php version.

The permission has been adjusted, and the browser can access the file. However, if you execute the file through the command line php, an error is reported. how can this problem be solved !! Online, urgent

Is the php. ini path configured in the command line? Use the-c parameter in the command line to pass in the path of the php. ini file.
php -c /.../php.ini /.../video_order.php

You can directly access the web version, execute cgi php, and the command line executes cli php. you try to specify the php. ini path under cli. Maybe cgi php. ini and cli php. ini are separated.

The configuration file used for webpage and command line execution is not necessarily the same
You can execute php -- ini in the command line to check the loaded configuration file or directly execute php-m to check whether the mysqli extension is enabled.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.