How can I solve the problem of apachephpmysql environment configuration?

Source: Internet
Author: User
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/

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.