Urgent PHP connection MySQL related issues

Source: Internet
Author: User
Tags phpinfo
Urgent and URGENT!! PHP connection MySQL problem
Win7 Ultimate version of +php5.3.6+mysql5.5.10+apache2.2.7 configuration, MySQL and PHP are good, but do not know how, PHP connection is not on MySQL, as for the php.ini in a few semicolons I also removed
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_mysqli.dll
Wrote a connection to the MySQL file, in the PHP environment to run the old error occurred:
Fatal error:call to undefined function mysql_connect () inch F:\Localhost\mysql_connect.php on line 6
Connection database file has been determined no problem, I hope you heroes to help me think of ways, urgent urgency!!!!

------Solution--------------------
Whether it is the problem I encountered: http://blog.csdn.net/tgh1981/archive/2011/04/27/6366067.aspx
MySQL Database connectivity issues, troubleshooting ... Gee

------Solution--------------------
Post the Error.log file under the log folder in your Apache installation directory
------Solution--------------------
Use Mysqli_connect () to try it; Do you see your php.ini in the system of the configuration file modified not, or see phpinfo () is not supported by MySQL; disable?
------Solution--------------------
Dude, I feel like you. php version of the problem is not only divided WinDOS and UNIX What is the multi-threaded what, although I am also a novice but configure the environment I configured two weeks just fine I give you my software name you see
Apache:httpd-2.2.17-win32-x86-openssl-0.9.8o.msi
Mysql:mysql-5.5.10-win32.msi
Php:php-5.2.17-win32-vc6-x86.zip
which PHP sub-VC6 and VC9 you look at your what is the amount to the official website slowly look at the left of the Chinese with Youdao translation see if you give up want to from 341061383 add my qq I put my installation file to you pass
My one is vista should be similar to yours
------Solution--------------------
After that, it needs to be set up in Win7 to allow the operating system to locate the DLL file.
Here's how:
Right-click Computers, properties, advanced system settings, select Advanced tab, lower-right corner, environment variables, select Path in the system variable box below, then click Edit-
Increase in the value of the variable "; C:\PHP; C:\PHP\ext "(does not contain parentheses)
(My PHP is installed in the C packing directory, so if you load program files, it should be written "; C:\Program files\php; C:\Program Files\php\ext ")
Special Note: Do not delete the original variable value, but increase after the value of the variable.
Then restart it and it must be restarted before it takes effect.
------Solution--------------------
In fact, this problem is generally not a problem. You must not find the MySQL module when you run Phpinfo.
Find the php.ini file under C:\Windows, and look at the front of the Extension=php_mysql.dll; Do not make a extension=php_mssql.dll, these two more like, but also to copy files into the system32 directory,
Libmysql.dll, found in php.ini:
Extension_dir = "./"
Change it to the absolute path of your ext subdirectory in your PHP installation directory. For example, my:
Extension_dir = "c:/php/ext/"
This step is important. Otherwise, PHP will not find the Php_mysql.dll module and cannot be loaded.
Finally restart the computer or Apache, if run phpinfo inside there is MySQL this item, indicating that the loading is successful, otherwise ... You know!
  • 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.