MySQL Debug error urgently beg the hero to help

Source: Internet
Author: User
MySQL Installation test error
Fatal error:call to undefined function mysql_connect () inch C:\myenv\apache\htdocs\test.php on line 3
1: I checked that MySQL has been started
Extension=php_mysql.dll
Extension=php_mysqli.dll front semicolon has been removed
2: Path has changed
Extension_dir = "C:/myenv/php/ext"
3:php5ts.dll
Libmysql.dll file has been pasted under system under Windows
The PHP module for 4: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", "1985032468root");
if ($conn) {
echo "Linked to database Success";
}else{
echo "link database failed";
}
?>
Please enlighten!!! Grateful!!!


Reply to discussion (solution)

Fatal error:call to undefined function mysql_connect ()
That's very clear! You did not load the php_mysql extension

Add a piece to the httpd.conf
LoadFile "C:/myenv/php/php5ts.dll"
Look

Restart Apache after the same error Ah .... What's the problem?

Phpinfo (); See if the Loaded Configuration File loaded php.ini is the php.ini you modified.

These changes are done to restart the server.

Hit!!! Phpinfo () shows how c:/windows solves the great God.

jordan102
Mix it up.
Big God one words hit, now connected success. Grateful!!!


.........

  • Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.