Mysql debugging error. please help me. how can I solve this problem?
Source: Internet
Author: User
Mysql debugging error: please help mysql installation and testing with Fatal & nbsp; error: & nbsp; Call & nbsp; to & nbsp; undefined & nbsp; function & nbsp; mysql_connect () & nbsp; in & nbsp; C: \ myenv \ apache \ mysql debugging error: please help me
Mysql installation test error
Fatal error: Call to undefined function mysql_connect () in C: \ myenv \ apache \ htdocs \ test. php on line 3
1: I checked that mysql has been started.
Extension = php_mysql.dll
The semicolon before extension = php_mysqli.dll has been removed.
2: The path has been changed.
Extension_dir = "C:/myenv/php/ext"
3: php5ts. dll
The libmysql. dll file has been pasted to the system under WINDOWS.
4: The php module of apache has been loaded.
LoadModule php5_module C:/myenv/php/php5apache2_2.dll
PHPIniDir "C:/myenv/php"
AddType application/x-httpd-php. php. phtml
5 Test Code
$ Conn = mysql_connect ("localhost", "root", "1985032468 root ");
If ($ conn ){
Echo "succeeded in linking to the database ";
} Else {
Echo "failed to connect to database ";
}
?>
Thank you !!! Zero !!! Mysql apache php:
------ Solution --------------------
Phpinfo (); check whether the php. ini File Loaded by Loaded Configuration File is your modified php. ini.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service