Big god PHP connection MySQL, php.ini configuration related issues

Source: Internet
Author: User
The Great god for help PHP connection MySQL, php.ini configuration issues
Like many people, there is no PHP connection, search the Internet a lot, have not resolved
First of my configuration: apache2.2.22 + php5.4.14 + MySQL 5.0
Error message:
Fatal error:call to undefined function mysql_connect () in C:\Program files\apache\htdocs\index.php on line 6


There are php.ini under Windows and configured
Extension=php_mysql.dll
Extension=php_mysqli.dllGet rid of the front;
My installation path is this:
Extension_dir = "C:/myenv/php-5.3.5/ext"
The path is all fine.

Put a. /mysql/bin/libmysql.dll Copy to php5.0 below, and copy to Php5.0/ext directory
LibmySQL.dll Php5ts.dll two files imported in Windows/system32



The http.conf in Apache is configured with the
#载入apache处理PHP模块, for PHP file configuration
LoadModule Php5_module C:/myenv/php-5.3.5/php5apache2_2.dll
#PHPIniDir用于指定PHP的ini文件
Phpinidir "c:/myenv/php-5.3.5"
AddType application/x-httpd-php. php. phtml

I have done my best, did not get out for a long while, depressed, seek Master rescue!!!

PHP MySQL Apache

Share to:


------Solution--------------------
LZ's Php\ext directory under Php_mysql.dll and Php_mysqli.dll all right?
------Solution--------------------
1. It is recommended that LZ restart Apache each time the configuration is changed.
2.LZ See if there is MySQL56 in Windows (my name is, the LZ may not be the same version number) This service, whether it has been started.

What else is really unexpected.
------Solution--------------------
So hard, it's better to just put on a wamp base environment
------Solution--------------------
Phpinidir "c:/myenv/php-5.3.5"
LoadFile "C:/myenv/php-5.3.5/php5ts.dll"
LoadModule php5_module "C:/myenv/php-5.3.5/php5apache2_2.dll"
  • 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.