dongliang1893 2011-10-08 04:23
浏览 85
已采纳

PHP MYSQL模块未在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? And 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!

  • 写回答

1条回答 默认 最新

  • douci1615 2011-10-09 02:28
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改