The environment configuration of apachephpmysql is the first time to set up the environment of apachephpmysql. some problems have been encountered. The version used is as follows: apache version: 2.2.17 installation location: C: ProgramFilesApacheSoftwareFoundationApache2.2php version: 5.3.9 installation location: C: phpmysql version: 5.5 apache php mysql environment configuration
The first time I set up an apache php mysql environment, I encountered some problems. The version used is as follows:
Apache version: 2.2.17 installation path: C: \ Program Files \ Apache Software Foundation \ Apache2.2
Php version: 5.3.9 installation path: C: \ php
Mysql version: 5.5 installation path: C: \ Program Files \ MySQL
Operating system: windows xp
According to some tutorials on the Internet, the following changes have been made:
Modify the configuration file httpd. conf of the Apache server
Website root directory: DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
Directory index: DirectoryIndex index.html index. php
Modify the php configuration file php. ini (there are two files in the directory where php is installed, "php. ini-development and php. ini-production "my modified" php. ini-production "as php. ini)
Open the global variable: register_globals = On
Module loading location: extension_dir = "C:/php/ext"
Loading module: extension = php_mysql.dll
Extension = php_mysql.dll
"Environment variable" -- "system variable" -- "Path" is added with "; C: \ php \ ext ";
Combine php with Apache in module mode to modify http. conf
Add row LoadModule php5_module C:/php/php5apache2_2.dll
PHPIniDir "C:/php"
AddType application/x-httpd-php. php
The running code is as follows:
$ Conn = mysql_connect ("localhost", "root", "901030 ");
Mysql_select_db (curriculum, $ conn );
Mysql_query ("set names 'utf8 '");
$ SQL = "select * from computer_science ";
$ Result = mysql_query ($ result, $ conn );
$ Row = mysql_fetch_row ($ result );
Print_r ($ row );
?>
The result is blank, no information is displayed, and no content stored in the database is output.
What is the reason for this? Thank you for your guidance!
------ Solution --------------------
5.3.9 there is no v6 version, so it is no longer appropriate to refer to the module installation method mentioned on the Internet.
1. you can use the old version, which is no problem for the development environment.
Http://windows.php.net/downloads/releases/archives/php-5.3.5-Win32-VC6-x86.msi
2. install fastCGI.
You can refer to other people's installation experience
Http://www.laokboke.net/2011/12/02/bind-fastcgi-and-apache-on-windows/
3. of course, you can also download the compiled v6 version here, which may be a bit of a fan? I don't know if this release is a fan of some.
Http://www.apachelounge.com/download/