dougu2036 2017-04-24 20:25
浏览 48
已采纳

自制PHP PHP mysql_connect

I have a project that is using mysql_connect(). (I cannot change this to mysqli)

I am getting the error: Call to undefined function mysql_connect()

I have installed php56 using homebrew brew install php56 --with-http24

I have seen people mentioning the --with-mysql flag however this does not exist.

When running brew options php56 i see --without-mysql

when I run phpinfo() I get the following in the Configure Command:

./configure --with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' .... 

I also see sections for mysqli mysqlnd and pdo_mysql

and under Module Authors I have:

MySQL   |   Zeev Suraski, Zak Greant, Georg Richter, Andrey Hristov

Any Idea how to get mysql_connect() working?

  • 写回答

1条回答 默认 最新

  • dsk49208 2017-04-26 08:37
    关注

    It was a mistake. I opened an issue on GitHub and its fixed now. Please try again. Should work now.

    Issue : https://github.com/Homebrew/homebrew-php/issues/4133

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

报告相同问题?