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"