Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build php Environment for winxp

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces winxp how to build php environment, the article is very detailed, has a certain reference value, interested friends must read it!

Winxp build php environment method: 1, install Apache, and modify httpd.conf configuration file; 2, install MySql;3, download and install PHP, and set php.ini configuration file; 4, restart apache service.

This article operating environment: Windows xp system, php version 5.4.15, Dell G3 computer.

Build Apache+MySql+PHP environment under windowsXP

First, install Apache

1. Download the httpd-2.4.4-win32-ssl_0.9.8.zip package, unzip it to the directory you want to put, and modify the conf/httpd.conf configuration file.

There are some changes to the configuration file (here, install to F disk and bring the htdocs directory out of the apache directory):

ServerRoot "f:/LAMP/Apache24" ServerName localhostDocumentRoot "f:/LAMP/htdocs" ScriptAlias / cgi-bin/ "f:/LAMP/Apache24/cgi-bin/"

2. Install the apache service

Win+R open and run, type cmd to open the command line panel, change the path to the bin subdirectory under the apahce installation directory, and use the command: httpd.exe-k install

If you talk a little more here, you can skip it.

Install the apache service with a custom service name: httpd.exe-k install-n "MyServiceName"

Install the apache service with a custom service name with a custom name configuration file: httpd.exe-k install-n "MyServiceName"-f "c:/files/my.conf"

The service name installed with the httpd.exe-k install command is Apache2.4 and the configuration file used is conf/httpd.conf.

Delete the command for apache service: httpd.exe-k uninstall or httpd.exe-k uninstall-n "MyServiceName"

= =

3. Start the apache service

Method 1. You can start, stop or restart the apache service through the ApacheMoniter.exe in the apache installation package.

Method 2. You can also open and run the win+R through the service manager of windows, enter services.msc to open the service manager, and find the apache service through the service name. At this time, you can start, stop or restart the apache service.

Method 3. Of course, you can also change the command line to the bin directory according to the aforementioned method:

You can test the configuration file httpd.exe [- n "MyServiceName"]-t before starting the apache service

Launch: httpd.exe-k start [- n "MyServiceName"]

Stop: httpd.exe-k stop [- n "MyServiceName"] or httpd.exe-k shutdown [- n "MyServiceName"]

Restart: httpd.exe-k restart [- n "MyServiceName"]

Second, install MySql

Download the mysql-installer-community-5.6.11.0.msi package, double-click to install it, and will be prompted to install if there is no .net FrameWork 4.0environment.

Third, install PHP

1. Download the php-5.4.15-Win32-VC9-x86.zip package, unzip it and put it in the directory you want to put, and rename php.ini-development to php.ini.

2. Modify the apache configuration file:

Add after "# LoadModule vhost_alias_module modules/mod_vhost_alias.so"

LoadModule php5_module "f:/LAMP/PHP/php5apache2_4.dll" PHPIniDir "f:/LAMP/PHP" AddType application/x-httpd-php .php .html .htm

Find "DirectoryIndex index.html" and add "index.php" after it, that is: DirectoryIndex index.html index.php

3. Restart the apache service and install it!

= the solution to playing Warning:PHP Startup every time you start PHP =

For example, screenshot:

Solution:

Open php.ini, find extension_dir = "ext", remove the previous comment, and change the value to an absolute path such as "f:/LAMP/PHP/ext" [relative paths are not allowed, which is verified].

The above is all the content of this article "how to build a php environment for winxp". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report