Apache + PHP in Windows XP (to add SQLite)

时间:2023-03-09 22:41:11
Apache + PHP in Windows XP (to add SQLite)

Firstly, Winxp do not support VC11+, so choose Apache packs compiled under VC10-. Before installation, remember to install appropriate vc++ dist.

I choose apache 2.4 vc10, apache lounge compiled ver. Go to the additional page, download a module to support loading PHP, naming "php5apache2_4*.rar", in which we find several version supported, go to php old archive page and choose appropriate ver and download.

Two files need to be configured: 1. under apache/conf, find the httpd.conf file, in this file, modify its root & mail & user group and whatever else told in the apache rar readme;

                                              2. under php, find php.

Forget about that.

Go to apache official site, download version 2.4 or 2.2, because my OS is WinXP, so I choose 2.4 vc++10. Then go to php download site,  click windows downloads, choose PHP5.4.45.

Unrar these packs, configure two files:

1. apache/conf/httpd.conf, modify root path & mail & user group, add 2 lines:

 LoadModule php5_module "E:/php5/php5apache2_4.dll"
AddHandler application/x-httpd-php .php .html .htm

2. cp php.ini-development to %windir%/system32/ rm it to php.ini and modify its time_zone & extension_dir

extension_dir = "E:/php5/ext"
date.timezone =prc

Use commandline, cd to apache/bin, httpd.exe -k install -n apache<CR> to install apache service.

Double click apachemonitor.exe to launch apache and click start to start server.

Enjoy!