Windows2003 under php5.4 installation configuration tutorial (Apache2.4) _php tips

Source: Internet
Author: User
Tags configuration php ldap nntp vc9 win32 ftp access

Direct configuration PHP has been used as the "PHP" Local development environment deployment and HelloWorld of a key fool package, was approved as extremely unprofessional, the key is that these one-button fool pack lamp version is not good control, the port or something is not easy to tune. The PHP environment that has been configured with lamp under the Linux system, see "Ubuntu under Lamp Environment Configuration tutorial (click to open Link)" and "Ubuntu under the graphical Lamp environment configuration course (Linux)" (Click to open the link), but for various reasons, How to make the PHP environment step-by-step in the Windows2003 system has not been studied carefully. In fact it is not difficult at all, it is more difficult than that Tomcat, more simple than that iis+asp.net.

One, Apache2.4 and php5.4 download

Since the PHP announced since php5.5 can not support the WinXP kernel system, so in the 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, or how the configuration can not run.

Apache2.4 and php5.4 have at least VC9 runtime libraries in the Windows version, just as Tomcat needs JDK, the VC9 runtime is not in the Win2003 system and can be downloaded on the Microsoft Official Web site.

URL: http://www.microsoft.com/zh-cn/download/details.aspx?id=29


If you are too troublesome, you can directly copy the following address to the download tool: http://download.microsoft.com/download/7/5/0/ 7502f4e9-1f90-4895-9259-1bde67b8b9a1/vcredist_x86.exe

After downloading is a vcredist_x86.exe, direct non-stop next installation, installation path is not your choice. Installation of the time will be in the same directory to create some temporary files, please delete the installation after the completion of their own.

After that, first get Apache2.4 and php5.4 which is not called,

Apache2.4 's downloads are as follows:

Open Official Website: http://httpd.apache.org/download.cgi The following figure, it put the Windows version of the Apache2.4 hidden deep, clearly is a Linux blowing, discrimination Windows users


If you are too troublesome, you can directly copy the following address to the download tool: Http://de.apachehaus.com/downloads/httpd-2.4.16-x86.zip

At the same time also put php5.4 down, open the official website http://php.net/downloads.php, the following map download:


Remember to download the VC9 32-bit thread safe version. 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

Ii. installation and configuration of Apache2.4 and php5.4

1, php5.4 download, is a Php-5.4.43-win32-vc9-x86.zip compressed package, to extract this stuff, extract directory is your future running directory of PHP, please note the location. Here take C:\php-5.4.43-Win32-VC9-x86 as an example. As shown below, rename the 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", and specify PHP's compressed directory, which is the running directory. To take note of before;


(2) Locate date in Date.timezone specify the time zone for our country's time zone, or write "Asia/shanghai" is also possible, the same attention to the previous note;


(3) The final positioning extension=, open the service component of PHP, the following image is zoned red Line annotated components before; remove, think of opening characters, PHP Mail Service, and Php_mysql service support. Save PHP.ini exit.


3, after the configuration Apache2.4

(1) The downloaded Httpd-2.4.16-x86.zip decompression, get the following Apache24 directory.


(2) Because the configuration file is written with the Linux God-level text editor, you can only open the conf\httpd.conf through notepad++, or Dreamweaver and other advanced editors, otherwise the line will disappear.

Also use Ctrl+f to navigate to LoadModule, as shown below, plus loadmodule php5_module php extract directory/php5apache2_2.dll, where the following figure C:\ Php-5.4.43-win32-vc9-x86 is the Php-5.4.43-win32-vc9-x86.zip directory I just had. There are obviously php5apache2_4.dll in it.


Then navigate to AddType, as shown in the following figure plus: AddType application/x-httpd-php. html. htm requires the server to resolve these types of files.


Finally change the server's publishing IP and port, positioning to listen, the original default of 80 port must not be. This uses a local loop address on the 127.0.0.1:8081 8081 port. Port settings, please note that 6666 of such Google browser restrictions on the port is not possible.


Google Browser restrictions on some of the port number:
1://Tcpmux
7://Echo
9://Discard
One://Systat
://Daytime
://Netstat
Per://QOTD
://Chargen
://FTP data
://FTP Access
:/SSH
://Telnet
://SMTP
Panax Notoginseng://Time
://Name
Per://Nicname
%://Domain
://Priv-rjs
://Finger
://Ttylink
://Supdup
A://Hostriame
102://ISO-TSAP
://GPPITNP
://Acr-nema
109://POP2
A://POP3
A://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, then the Apache installed in the Windows system services, or can not start. Start-> Run a cmd, input: C:\Apache24\bin\httpd.exe-k install, where C:\Apache24 is my Apache2.4 extract directory. Don't be afraid here, Apache. System services installed to Windows can be uninstalled in the following ways:

(1) Run services.msc, 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 server's operation

1, after that, you can directly open the C:\bin\ApacheMonitor.exe, and click on the lower right-hand corner Apache icon, start Apache service, or through the command line: net start Apache2.4 to start the service, after the restart can also be through net Stop Apache2.4 First, then start, or directly through the C:\bin\ApacheMonitor.exe finished.

2, in the Apache under the Htdocs to create a 1.php file, with Notepad or something open, enter the following code:

<?php
Phpinfo ();
?>

3, open the browser, input 127.0.0.1:8081/1.php is just in httpd.conf in the listen definition of the release address and port. The following screen shows that the configuration has been successfully configured.


Now that Apache and PHP have been configured successfully, then, if you still want to configure MySQL, please check "MySQL" MySQL installation, deployment and graphics (click to open the link), very simple.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.