dongxuanjiao0795 2012-03-22 00:42
浏览 63

SYMFONY - 在os x 10.5上正确设置PDO-MYSQL

I'm having an issue with symfony and mysql setup on mac os x 10.5.8

When trying to access a newly created module, i get:

500 | Internal Server Error | Doctrine_Connection_Exception

Couldn't locate driver named mysql.

I had the same error message when trying to execute doctrine:insert-sql to create my database tables. I fixed this by downloading PDO_MYSQL and installing as per these instructions:

cd ~/Downloads/PDO_MYSQL-1.0.2/PDO_MYSQL-1.0.2

phpize

./configure '--with-pdo-mysql=shared,/usr/local/mysql'

make

sudo make install

I also added

extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613"
extension=pdo_mysql.so

to my php.ini file.

When i do a php -m I do have pdo_mysql and PDO installed. However when I check out a phpinfo(); file with my browser, under PDO drivers, I only have sqlite and sqlite2 enabled, not mysql.

I must be missing something here! Any help with this would be greatly appreciated.

Thanks in advance.

  • 写回答

1条回答 默认 最新

  • doucuo8618 2012-03-22 21:43
    关注

    Solved my problem by upgrading my PHP version to entropy.ch version.

    Didnt work straight out of the box though, I had to manually swap my php modules over as per instructions here: https://discussions.apple.com/thread/1201106?start=0&tstart=0

    Fixed in the end. Onwards and Upwards.

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料