Linux-phpinfo already has the mysqli expansion, but the actual still cannot use the newspaper mysqli not found, how to solve?

Source: Internet
Author: User

Phpinfo has already shown the relevant development information of MYSQLI

But the command line execution PHP xxx.php still reported mysqli not found

video_order.php Code:

video_order.php is a script file so you want to perform a test at the command line, how to fix it? Online, etc.

Reply content:

Phpinfo has already shown the relevant development information of MYSQLI

But the command line execution PHP xxx.php still reported mysqli not found

video_order.php Code:

video_order.php is a script file so you want to perform a test at the command line, how to fix it? Online, etc.

I also met, then the solution is to change a PHP version

Permissions have been adjusted, the browser is also accessible, but through the command line PHP to execute files, is an error, how to solve!! Online, etc, urgent

is the php.ini path configured for the command line? The path to the php.ini file is passed in with the-c parameter using the command line.
php -c /.../php.ini /.../video_order.php

You directly access the Web version of the execution of the CGI PHP, the command line executes the CLI PHP, you try to specify the next CLI under the php.ini path. It is possible that the CGI php.ini and the php.ini of the CLI are separate

The configuration files used by Web pages and command line execution are not necessarily the same
You can execute PHP--ini on the command line to view the loaded configuration file or directly execute php-m to see if there is an open mysqli extension

  • 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.