简体   繁体   中英

Call to undefined function mysql_connect() error

I have 2 servers:

server 1: contain mySql database.

server 2: contain the PHP source.

The servers have connection between them.

When i try to connect to mySql from PHP source, i get this error:

Fatal error: Call to undefined function mysql_connect()

When i run phpinfo() function in php, i didnt get a row of mysql, but under configure command i get --without-mysql (the blue text in the image):

在此处输入图片说明

I try to run on the server this commant: install php-mysql , it install but mysql commands stil not work in php files.

what could i do to solve it?

Try to restart/reload Apache (I see that you use it) and check phpinfo(). Then you restart Apache PHP reread configuration file (php.ini).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM