(Transfer) Windows under Apache2.2.15 and Php5.3.2 installation and configuration

Under Apache2.2.15 and Php5.3.2 Windows installation and configuration

Apache installation and configuration

Open the apache website http://archive.apache.org/dist/httpd/binaries/win32/ or mirror sites http://apache.mirror.phpchina.com/httpd/binaries/win32/,
Download inside apache_2.2.15-win32-x86-no_ssl.msi installation files.
Among them, there are two types of the same version: no_ssl and openssl, openssl ssl security certification to more a model, it is the HTTPS protocol instead of HTTP, this is a server with SSL web servers in general the difference.
In general, we downloaded no_ssl version ok.

Download a good apache installation file, click install, 3 times in a row next, will enter the server information configuration interface for the importation of network domain, server domain and website administrator email address, ordinary users can easily fill in accordance with the format on the line. Press Next again, after the interface appears select the installation path, the default path to a longer, pharmar the installation path was revised to: "D: / Program Files / Apache /", continue with the installation until complete.

Installed, apache to start automatically, you can test the success of start apache. Enter in the browser address bar: http://localhost/ or http://127.0.0.1/, if "It works.", Then congratulate you, apache has been successfully installed; the same time the task bar at the bottom right corner of the computer There is a green icon apache server is running.

apache there is a configuration file:
httpd: conf need to configure to run php. Location: D: / Program Files / Apache / conf directory. Open the httpd: conf:
1), find the "DocumentRoot", here is the place designated home directory. The default is: "D: / Program Files / Apache / htdocs", you can use the default directory, you can define yourself one, such as: "D: / PHP". Note: The directory at the end do not add "/."
2) Find "DirectoryIndex", here is the default home page file name, you can join in the index.html index.php and so on the back. Each type must leave a space between.
3) Find

Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all

Amended as follows:

Options FollowSymLinks
AllowOverride None
Order deny, allow
allow from all

If you do not change here, it may appear You don't have permission to access / on this server. This error message, especially changing the default home page after the path.

Note: Each modification httpd: conf file, should restart the apache server. Also, if you run win32 system also iis server, then we must first stop the iis server is running, then restart apache, otherwise the apache server does not start.

Php installation and configuration

First, from the official website of http://www.php.net/downloads.php php download windows version, there are two versions: PHP 5.3.2 zip package and the PHP 5.3.2 installer, the latest version is 5.3.2, pharmar using 5.3.2 version. PHP 5.3.2 installer for automatic installation is relatively automatic, but is limited in many ways, so pharmar not recommend this approach, here PHP 5.3.2zip package archive mode of the manually installed.

1), the PHP zip extracting compressed package into a directory, recommended: "C: / PHP", pharmar is D: / Program Files / Php.
2), the PHP directory (D: / Program Files / Php) under the php.ini-dist file to php.ini, PHP's configuration file is that it, modify the following places, well after the changes to php.ini files to C: / WINDOWS / directory:
extension_dir = "D: / Program Files / Php / ext", pointing to php folder to place "php_ *. dll" file. PHP4 and PHP5 path to differ here.
doc_root = "D: / PHP", point to set the home position in front of apache;
default_charset = "gb2312", modify the default character set, here, if preceded by a semicolon ";", remove the semicolon;
register_globals = Off to register_globals = On, so that an effective global variable transmission;
extension = php_dba.dll if there is a semicolon in front of the abolition of the semicolon, the following is the same;
extension = php_dbase.dll
extension = php_gd2.dll GD library to do maps, are generally used for graphical verification code;
extension = php_mysql.dll to connect MYSQL database;
3), the PHP directory php5ts.dll files are copied to C: / WINDOWS/system32 directory.
4) Finally, modify the Apache httpd.conf file. At the end of the file add the following two lines, that in order to install the PHP module into Apache:
LoadModule php5_module D: / Program Files/Php/php5apache2_2.dll
AddType application / x-httpd-php. Php

Note: The first line of the directory path to update the current version of apache for the dynamic link library, for example here I use the apache2.2.15 version and php5.3.2, then this file must be php5apache2_2.dll, but can not be php5apache.dll, php5apache2 . dll and so on. The second step of the suffix php behavior.
php4 version, need to add the line AddType mod_php4.c, while in php5 in, you do not need this line AddType mod_php5.c a, php5 has been integrated, otherwise apache will not start.

Completed the above process of configuring apache and php, and restart apache. In the server's default directory "D: / Program Files / Apache / htdocs" in the new file index.php, write the following code:
phpinfo ();
?>
In the browser address bar enter http://127.0.0.1/ or http://localhost/, you'll see the php version of the information. Stop here, php and apache already successfully installed.

Here is the details: apache configuration file httpd.conf in the directory partition symbol is "/", and PHP configuration file php.ini in the directory requires a backslash "/" Do not confuse oh.

MYSQL Installation is easy. To the official website http://dev.mysql.com/downloads/mysql/5.0.html, download the windows platform for mysql, select the Windows ZIP / Setup.EXE (x86) the latest version is 5.1.45, download. Direct installation, the installation is complete, you can enter the configuration wizard, set the mysql database password. All OK.
Installation and configuration of mysql See: phpMyAdmin installation configuration and problem solving

pharmar encountered an error during installation:
After installing PHP on Windows, Apache appears LoadModule takes two arguments of the error, the main reason is the httpd.conf in the sentence:
LoadModule php5_module D: / Program Files/PHP/php5apache2_2.dll
Explain the procedure to Program Files in the space as a separator of two parameters, so the statement can not appear spaces. On the Internet for a long time did not find a solution, and finally with a directory sign before solving the problem, change the following:
LoadModule php5_module ../php/php5apache2_2.dll
Because apache installed in D: / Program Files / Apache / directory, PHP installed in D: / Program Files / php /, so .. / on that D: / Program Files / directories, this finally buttoned, I hope you install configuration process with more than ponder always a way.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of (Transfer) Windows under Apache2.2.15 and Php5.3.2 installation and configuration

  • apache make rails + php + jsp front-end server

    Apache http://httpd.apache.org/download.cgi php http://www.php.net/downloads.php Zend Optimizer http://www.zend.com/en/products/guard/optimizer apache use port 80; tomcat by 8080; mongrel Services by 3000; Erase # ServerName my_site: 80 before the #, ...

  • Let Ruby On Rails into the Embedded Development

    In the embedded Linux development, and C are a pair of golden partner, almost to occupy the vast majority of the domestic market and become the mainstream model of embedded development. At present, for some equipment to do configuration interface, many of

  • tomcat6.0 + myeclipse6.5 under tomcat data source configuration

    (1) Environment: such as a very important question! Different environment, different configurations! (2) struts package loaded: My MyEclipse6.5 bring him under the load of the struts jar package Error occurred "collections can not find under qui ...

  • Study Application hibernate (1)

    Basic configurations: Environment: myeclipse Version: 5.5.1 tomcat version: 5.5 1, myEclipse to adjust to the MyEclipse Database Explorer mode; a new database connection, the need for database-driven 2, myEclipse to adjust to the MyEclipse Hibernate ...

  • ror development environment to build

    Ror about the development environment set up, records are as follows. 1. Netbeans6.5 installation download netbeans6.5 address http://zh-cn.netbeans.org/download/6.5/ml/ Ruby can download a separate version that only around 50M. II. Ruby set up the e ...

  • In the Linux platform to install and configure Ruby on Rails Detailed

    ruby on rails recommend the production environment is running Linux / FreeBSD / Unix, or Unix family of operating systems, using lighttpd + FCGI solution. The following will be my Linux operating system, lighttpd + FCGI, MySQL database as an example, comp

  • JPA data source data source to configure Tomcat conversion essay questions

    To the JPA in the use of the development process, sometimes used in the data source conversion problem, The following methods are only my personal experience of a situation and its solutions, if different, please everyone posted for your reference encount

  • JAVA EE JSP_JNDI

    dsfdsa http://lindows.javaeye.com/admin/blogs/213348 Tomcat 6 with the connection pool data source configuration http://www.blogjava.net/ec2008/archive/2008/07/19/216063.html project: test Driver path: D: \ workspace \ test \ WebRoot \ WEB-INF \ lib ...

  • Hibernate.cfg.xml configuration file (including the primary key generation strategy Introduction)

    Hibernate.cfg.xml configuration file: <? xml version = "1.0" encoding = "utf-8"?> <! DOCTYPE hibernate-configuration PUBLIC "- / / Hibernate / Hibernate Configuration DTD / / EN" "hibernate-configuration-2.0.dtd

  • The EJB3 Persistence

    EJB3 persistence with Hibernate is very similar to the mechanism: Environment: Server: JBOSS5.0 Database: MySQL5.0 1. Set up a data source First of all, in jboss-5.0.0.GA \ server \ default \ deploy, the establishment of a database used to connect the dat

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries