MYSQL cannot be connected to PHP in WIN764 bits

Source: Internet
Author: User
In WIN764-bit PHP, mysql win 7 64-bit IIS + php (5.2.5) + mysql (5.5.27) cannot be linked)
No error is reported during installation.
The PHP file is running normally.

The connection to the database does not work.
Install ECSHOP, check the process, and prompt MySQL... not supported
Running PHPMYADMIN prompts MYSQL to load,

The PHP. ini file is as follows:
; Extension = php_bz2.dll
; Extension = php_curl.dll
; Extension = php_dba.dll
; Extension = php_dbase.dll
; Extension = php_exif.dll
; Extension = php_fdf.dll
Extension = php_gd2.dll
; Extension = php_gettext.dll
; Extension = php_gmp.dll
; Extension = php_ifx.dll
; Extension = php_imap.dll
; Extension = php_interbase.dll
; Extension = php_ldap.dll
Extension = php_mbstring.dll
; Extension = php_mcrypt.dll
; Extension = php_mhash.dll
; Extension = php_mime_magic.dll
; Extension = php_ming.dll
; Extension = php_msql.dll
; Extension = php_mssql.dll
Extension = php_mysql.dll
Extension = php_mysqli.dll
; Extension = php_oci8.dll
; Extension = php_openssl.dll
; Extension = php_pdo.dll
; Extension = php_pdo_firebird.dll
; Extension = php_pdo_mssql.dll
Extension = php_pdo_mysql.dll
; Extension = php_pdo_oci.dll
; Extension = php_pdo_oci8.dll
; Extension = php_pdo_odbc.dll
; Extension = php_pdo_pgsql.dll
Extension = php_pdo_sqlite.dll
; Extension = php_pgsql.dll
; Extension = php_pspell.dll
; Extension = php_shmop.dll
; Extension = php_snmp.dll
; Extension = php_soap.dll
; Extension = php_sockets.dll
Extension = php_sqlite.dll
; Extension = php_sybase_ct.dll
; Extension = php_tidy.dll
; Extension = php_xmlrpc.dll
; Extension = php_cmd.dll
; Extension = php_zip.dll


Reply to discussion (solution)

What is the code? Error reported?

The following message is displayed in PHPMYADMIN:

The mysqli extension is missing. Check the PHP configuration.

Database Connection prompt:

Fatal error: Call to undefined function mysql_connect () in

Link database code:

$ Server_name = "localhost ";
$ Server_user = "root ";
$ Server_pass = "password ";
$ Server_database = "database name ";

$ Conn = mysql_connect ($ server_name, $ server_user, $ server_pass );
Mysql_select_db ($ server_database, $ conn );
Mysql_query ("set names gb2312 ");

Phpinfo: Check whether mysql extension is enabled. Is there no php_mysql.dll file in the php/ext directory?

Phpinfo does not have MYSQ information.

The php/ext directory contains the php_mysql.dll file, which has been copied to WINDOWS/SYSTEM32.

Extension = php_mysql.dll
Extension = php_pdo_mysql.dll
Enabled

The reason should be that the MYSQL extension is not loaded.

PHP. ini file extensions are available.
GD can be loaded.
MYSQL cannot be loaded.

There should be no dll file

Php_mysql.dll and php_pdo_mysql.dll are available in WINDOWS/SYSTEM32/(PHP/ext ).

Instead of setting the php_mysql.dll file and copying WINDOWS/SYSTEM32, libmysql. dll

Libmysql. dll is also copied.

Solved

How did you solve this problem?

It's not because of the php. ini issue that libmysql is not loaded.

How can this problem be solved? I also encountered this problem.

Specify the absolute path in extension_dir

Solution:
Right-click my computer-properties-advanced-environment variables
Add D: \ PHP to the end of path. this directory is your PHP root directory. restart apache and print phpinfo (). haha! Finally, we can see that mysql has been loaded in for a long time. (after changing the path, it is best to restart the computer ....)

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.