The problem
Uncaught Error: Call to undefined function mysql_connect()
why
In PHP 5+, you can use both mysql_connect() and mysqli_conncet() instead of mysqli_conncet().
The solution
In the PHPStudy environment, you can downgrade the PHP version by selecting the PHP5 + version.
>
> p>
Web site – & gt; Management – & gt; PHP version. (You can choose to replace an older version of PHPStudy.)
If you want to use php7 without changing the code, you can use the admin ->; For PHP extensions, check the box before php_mysql.
Read More:
- Fatal error: Uncaught Error: Call to undefined function mysql_connect()
- Fatal error: Uncaught Error: Call to undefined function mysql_ Connect() problem solving
- HTTP status 500 – internal server error (resolved) for Tomcat running project
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- Call to undefined function mysql_ Connect() solution summary
- Error warning: mysqli_ error() expects parameter 1 to be mysqli, null given。 Any idea why?
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- Connection between PHP 7.4 and MySQL (MariaDB) under Ubuntu (kali Linux)
- MySQL Workbench Failed to Connect to MySQL at 127.0.0.1:3306 with user root Bad handshake
- Class ‘PHPWord_Writer_Word2003‘ not found
- ERROR 2005 (HY000): Unknown MySQL server host
- php mysqli_ connect_ Error () and mysqli_ connect_ The difference of errno() function
- A server error occurred. Please contact the administrator.
- A server error occurred. Please contact the administrator.
- Error while trying to retrieve text for error ORA-01019 solution
- node.js Server MySQL database connection timeout (error: connect etimeout)
- Win7 system build PHP + MySQL + Apache environment + deploy ECSHOP project
- ERROR 1040 (08004): Too many connections
- CMake Error: The source directory “*” does not appear to contain CMakeLists.txt.
- PHP connection PostgreSQL error call to undefined function PG_ connect()