Macports mysql5 setup under Snow Leopard

前端 未结 7 1182
死守一世寂寞
死守一世寂寞 2020-12-24 08:28

I\'ve managed to get my install all screwed up as I\'m a newbie and messing up is what I\'m good at.

1) Can anyone reference a credible set of setup instructions for

7条回答
  •  一整个雨季
    2020-12-24 09:10

    the php.ini being used on the command line may be different than the one being used by apache You can check this with phpinfo.php

    by doing a

    php phpinfo.php | grep php.ini
    

    if it shows

    Configuration File (php.ini) Path => /opt/local/etc/php5
    

    and the test script of Daniel James answer (saved as testconnect.php) also fails

    then you might want to fix by creating a symbolic link:

    /opt/local/etc/php5>sudo ln -s /etc/php.ini php.ini
    

    after that the testconnect should work

    php testconnect.php 
    Connected using mysql.
    Connected using mysqli.
    Connected using PDO.
    

提交回复
热议问题