Laravel possible minor problems connecting to the database

Source: Internet
Author: User
Laravel possible minor problems connecting to the database

For the group is mainly using an integrated environment with a button installed lamp or LNMP programmer, then if PHP is not defined to the system variables or not a soft connection, then the installation of composer will remind you to install PHP5-CLI, then will cause conflict

    • First of all because you installed the PHP-CLI, then naturally there will be two php.ini, when the database is connected to chaos, Laravel will default to use Php-cli php.ini, then if we are using PHP artisan This problem can not be found when the Migrate command is present.

[Pdoexception]
Could not find driver

This time do not like the original PHP solution to modify its extension file, but should be resolved from the php.ini conflict, that is, we can only use the local environment of the PHP parsing to successfully solve the problem, such as my local environment PHP7 is deployed in the/usr/ local/php/bin/php, if I execute/usr/local/php/bin/php PHP artisan migrate, then it can be successfully deployed, so we just have to remove the php-cli, and then put/usr/local/ php/bin/php files under soft connection to/usr/local/php/

Ln-s/usr/local/php/

Then we will be able to successfully deploy the connection database.

But generally this soft link will cause PHP artisan serve a security issue

[ErrorException]passthru()disabled for security reasons  

This time we just have to go into the php.ini to remove the PassThru in the disable_functions.

Ok! Deployment Complete!

                                    -by vampirebitter

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Laravel connection database may be small problems, including aspects of the content, I hope to be interested in PHP tutorial friends helpful.

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