调用未定义的函数mysql_connect()错误

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):

enter image description here

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