Strange: why cannot I connect to mysql after php.5.2.14 is configured? Solution

Source: Internet
Author: User
Strange: why cannot I connect to mysql after php.5.2.14 is configured? I installed apache2.2.16 + php5.2.14 + mysql5.1.49. But I cannot connect to the database. check that mysql is enabled, apache is started successfully, and loadmodual is loaded successfully. li is strange. why cannot I connect to mysql after php.5.2.14 is configured?
I installed apache 2.2.16 + php5.2.14 + mysql 5.1.49.
However, the database cannot be connected. make sure that mysql is enabled,
Apache has been started successfully,
Loadmodual has been loaded successfully, and libmysql. dll has been copied to $ WINDOWS \ system32.
However, mysql_connect () fails.
Fatal error: Call to undefined function mysql_connect ()....
Where is the problem?

------ Solution --------------------
Apache:

Loadfile "PHP installation directory \ php5ts. dll"
LoadModule php5_module "PHP installation directory \ php5apache2_2.dll"
PHPIniDir "PHP installation directory"
AddHandler application/x-httpd-php. php

Php:
Extension = php_mysql.dll

Php. ini should be installed in the PHP installation directory. windows is useless.
------ Solution --------------------
Lz look
Remove from php. ini
; Extension = php_mysql.dll
Remove the previous ";"

Do not
; Extension = php_msql.dll
; Extension = php_mssql.dll
Mixed up

I just read your phpinfo.
Mysql information is not displayed.

It must be because the mysql module is not loaded.
------ Solution --------------------
Try to configure the environment variable PHPRC. The value is the php directory.

No More. change the php version. how can this problem be solved?

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.