简体   繁体   English

Fastcgi:php未与mysql连接?

[英]Fastcgi: php is not connected with mysql?

I have 2 different php versions running. 我有2个不同的php版本正在运行。 They are running fine but they are not connected to mysql and I dont know why. 它们运行正常,但未连接到mysql,我不知道为什么。 They should be and I dont know how I can force them to connect with mysql. 它们应该是,我不知道如何强制它们与mysql连接。

The php versions are 5.3.27 and 5.4.31 If u need any more information, let me know. PHP版本是5.3.27和5.4.31,如果您需要更多信息,请告诉我。

Please use the following command to install mysql client for php and enable it in php.ini 请使用以下命令为php安装mysql客户端并在php.ini中启用它

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Make sure to restart apache (or any web server you are using) before you try to see any changes. 在尝试查看任何更改之前,请确保重新启动apache(或您正在使用的任何Web服务器)。

Digital Ocean provides easy guides on installing LAMP environment. Digital Ocean提供了有关安装LAMP环境的简单指南。 Have a look here https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu 在这里看看https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu

It's working now. 现在正在工作。 I just mistyped "extension=mysql.so" :/ 我只是输错了“ extension = mysql.so”:/

Anyways thanks for trying to help! 无论如何,感谢您的帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM