开发者

PHP MYSQL module not loading in Amazon EC2 Bitnami AMI

I have a running EC2 instance booted from a bitnami tomcat apache mysql php stack. I have used only tomcat until now. Now I have want to install and configure wordpress. During installation it says that the php mysql module is not loaded. I installed the php mysql module by using

sudo apt-get install php5-mysql

I tried the wordpress installer again and it still says it cant find the php mysql mod. I googled and there were a lot of posts saying I need to uncomment a line in the php.ini file. I searched but couldnt find a php.ini file. I could find the mysql.so though..

locate mysql.so
/opt/bitnami/mysql/php-extensions/mysql.so
/opt/bitnami/mysql/php-extensions/pdo_mysql.so
/opt/bitnami/mysql/tmp/mysql.sock

Do I have to create a php.ini file then? Where do I put it? A开发者_如何学Pythonnd what should be the contents of this file. I am not a php developer. Just learned a few things to configure reading from the wordpress database to display on my website.

One more thing.. the phpinfo says there is a php.ini in a place.. but the file is not there..

Thanks!


Ok.. I fixed this. Answering here if someone else stumbles upon it. In the php info page, I was able to find out where php was looking for the extensions and the php.ini file. I placed the mysql.so and mysqli.so in the extension directories and created a new php.ini file with the below entries:

extension_dir=<dir where i copied the so files>
extension=mysqli.so
extension=mysql.so
mysql.default_socket = <socket file of your mysqld>

After this check phpinfo page, you should find entries for mysql and mysqli..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜