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

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

报告相同问题?

悬赏问题

  • ¥15 制裁名单20240508芯片厂商
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致