Direct configuration PHP has been used as the "PHP" Local development environment of the deployment and HelloWorld (click to open the link) of a key fool bag, was awarded as extremely unprofessional, the key is that these one-button fool package lamp version is not good control, port what is also bad tune. Once in the Linux system has configured the lamp of the PHP environment, see "Linux" in Ubuntu Layout lamp environment (click Open link) and "Linux" in Ubuntu graphical Lamp development environment (click Open link), but for various reasons, In the Windows2003 system, how to get the PHP environment step-by-step, has not been a good study. In fact, it is not difficult at all, it is more difficult than the tomcat, much simpler than that iis+asp.net.
I. Download of Apache2.4 and php5.4
Since PHP announced since php5.5 can not support the WinXP kernel system, so in Windows2003 service system can only go to php5.4, in fact, if you do not write some high-end syntax, but in the download to pay attention to the version, otherwise how to configure can not run.
Apache2.4 and php5.4 have at least VC9 runtime in the version of Windows, and as Tomcat needs a JDK, this VC9 runtime is not available in the Win2003 system and can be downloaded from the Microsoft Official website.
Website: http://www.microsoft.com/zh-cn/download/details.aspx?id=29
If you have any trouble, you can copy the following address directly to download tool: http://download.microsoft.com/download/7/5/0/ 7502f4e9-1f90-4895-9259-1bde67b8b9a1/vcredist_x86.exe
After the download is a vcredist_x86.exe, the next step to install directly, the installation path is not your choice. Install temporary files will be generated in the same directory, please delete them after installation.
After that, first make Apache2.4 and php5.4 which is not so called,
The Apache2.4 download is as follows:
Open Official Website: http://httpd.apache.org/download.cgi For example, it hides the Windows version of Apache2.4 deep, clearly a Linux blow, discriminating against Windows users
If you have any trouble, you can copy the following address directly to download tool: Http://de.apachehaus.com/downloads/httpd-2.4.16-x86.zip
At the same time also take php5.4 down, open official website http://php.net/downloads.php, download as follows:
Remember to download the thread-safe version of VC9 32-bit. The remaining versions cannot be downloaded.
Do not delete the official website in the later days will be revised, here directly to the relevant download address: Http://windows.php.net/downloads/releases/php-5.4.43-Win32-VC9-x86.zip
Second, the installation and configuration of Apache2.4 and php5.4
1, php5.4 download, is a compressed package called Php-5.4.43-win32-vc9-x86.zip, unzip this thing, unzip the directory is your future PHP running directory, please note the location. Here take C:\php-5.4.43-Win32-VC9-x86 as an example. For example, rename php.ini-production to php.ini and open it directly with Notepad.
2, the following changes to the php.ini:
(1) Using Notepad's ctrl+f, locate the keyword "Extension_dir", specifying the PHP compression directory is the running directory. Take note of the preceding remark;
(2) Positioning date in the Date.timezone designated time zone for our country's time zone, or write "Asia/shanghai" is also possible, the same attention to the previous expression of comments;
(3) Finally locate the extension=, open the PHP service component, put the red line is commented before the component, remove, for opening characters, PHP Mail Service, and Php_mysql service support. Save PHP.ini exit.
3, after the configuration Apache2.4
(1) Extract the downloaded Httpd-2.4.16-x86.zip, get the following Apache24 directory.
(2) Since its profile is written in the Divine text editor of Linux, it can only be opened conf\httpd.conf by notepad++, or by advanced editing such as Dreamweaver, otherwise the change will disappear.
Also use Ctrl+f to navigate to loadmodule, such as, plus loadmodule php5_module php extract directory/php5apache2_2.dll, where the C # Php-5.4.43-win32-vc9-x86 is the Php-5.4.43-win32-vc9-x86.zip directory I just had. There is obviously a php5apache2_4.dll in it.
Then navigate to AddType, such as add: AddType application/x-httpd-php. php. html. htm requires the server to resolve these types of files.
Finally change the server's publishing IP and port, to locate the listen, the original default port 80 must not be. This uses a local loop address of 8081 ports on the 127.0.0.1:8081. Port settings, please note 6666 This type of Google browser restricted port is not possible.
Google Chrome limits Some of the port numbers:
1://Tcpmux
7://Echo
9://Discard
One://Systat
£ º//Daytime
://Netstat
://QOTD
://Chargen
://FTP data
://FTP Access
://SSH
://Telnet
://SMTP
PNS://Time
://Name
://Nicname
://Domain
PRIV-RJS://
By://Finger
By://Ttylink
://Supdup
101://Hostriame
102://ISO-TSAP
103://GPPITNP
104://Acr-nema
109://POP2
://POP3
111://SUNRPC
113://Auth
://SFTP
117://Uucp-path
119://NNTP
123://NTP
135://Loc-srv/epmap
139://NetBIOS
143://IMAP2
179://BGP
389://LDAP
465://Smtp+ssl
://Print/exec
513://Login
514://Shell
515://Printer
526://tempo
530://Courier
531://Chat
532://Netnews
540://UUCP
556://Remotefs
563://Nntp+ssl
587://stmp?
601://??
636://Ldap+ssl
993://Ldap+ssl
995://Pop3+ssl
2049://NFS
3659://Apple-sasl/passwordserver
4045://LOCKD
6000://X11
6665://Alternate IRC [Apple addition]
6666://Alternate IRC [Apple addition]
6667://Standard IRC [Apple addition]
6668://Alternate IRC [Apple addition]
6669://Alternate IRC [Apple addition]
4, after the Apache installed in the Windows system services, or will not start. Start-Run a cmd, enter: C:\Apache24\bin\httpd.exe-k install, where C:\Apache24 is my Apache2.4 's extract directory. Don't be afraid here, Apache. The system services installed to Windows can be uninstalled in the following ways:
(1) Run the services.msc and stop the Apache service in the service.
(2) Run the command line program, enter SC delete Apache, delete the service
(3) Delete the Apache folder.
Third, the operation of the server
After 1, you can open C:\bin\ApacheMonitor.exe directly, and click on the Apache icon in the lower right corner, start the Apache service, or through the command line: net start Apache2.4 to start the service, later restart can also be through the net Stop Apache2.4 first stop, restart, or go straight through the c:\bin\ApacheMonitor.exe.
2, in Apache under the Htdocs in a new 1.php file, with Notepad or something open, enter the following code:
3, open the browser, enter 127.0.0.1:8081/1.php is just in httpd.conf in the listen definition of the publishing address and port. Get the following screen to indicate that it has been configured successfully.
Now that Apache and PHP have been configured successfully, then, if you still want to configure MySQL, please check the "MySQL" MySQL installation, deployment and graphics (click the Open link), very simple.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.