Reprinted from: http://kyke.iteye.com/blog/1386160
XAMPP access and installation are very simple, you only need to go to the following URL:
http://www.apachefriends.org/zh_cn/xampp.html Download XAMPP can, I installed the Windows version of the installer installation package, as long as the installation according to its instructions all the way to install it, very convenient and fast.
However, the installation directory is best to choose a disk other than the C-drive, according to some users experience, in Windonws7 or Vista, if you choose the C-drive installation, due to permissions, there will be a failure to create some files. If you have the highest authority, you can install it directly on the C drive.
Typically in Windows XP or Windows 7, the Apache server is not bootable when XAMPP is installed. There are a lot of reasons for this, let me go to one by one.
No environment for installing VC9
To determine whether this is a simple problem, as long as you run C:\xampp\apache\bin\httpd.exe alone (this is my installation path), the "system cannot execute the specified program" (This is the command line after running the prompt), If you double-click Httpd.exe, you will be prompted for an environment configuration error.
Workaround: Download Vcredist_x86.exe directly.
Here are the tips you'll see in php.net:
VC9 Versions is compiled with the Visual Studio compiler and has improvements in performance and stability. The VC9 versions require to the Microsoft C + + runtime (x86) or the Microsoft C + + runtime (x64) Inst Alled
The Microsoft Visual C + + Redistributable Package (x86) is downloaded as a link, which is the Vcredist_x86.exe, a run-time environment that enables users to install Visual C + + 2008 without , you run an application that is developed using Visual C + + on the computer. After installation, start Apache, everything is OK.
Port is occupied by other programs
Sometimes, not after the installation of VC9 environment can directly run Apache, one of the important reason is that the Apache server used the port is occupied by other programs, Classic representative: Thunderbolt.
Workaround:
1. 80 port conflict, workaround:
Open the httpd.conf file under directory C:\xampp\apache\conf (my installation directory is C:\XAMPP), change 80 in Listen 80 and ServerName localhost:80 to 8081 or another value (try not to use 0 -1023 port, this is the system reserved port), to be consistent.
2. Listen for port 443 conflicts, Workaround:
Open the directory C:\xampp\apache\conf\extra (my installation directory is C:\xampp) under the httpd-ssl.conf file, the Listen 443 comment out: # Listen 443 or change 443 to 4433 or another value (try not to use 0-1023).
3. Apache start and stop immediately, one situation is that Apache has started normally, but XAMPP control Panel is not displayed, you can enter the http://localhost:8081 in the browser, if you can directly into the Apache server Control page is no problem. Another situation may be due to the fact that the oracle10g is installed and there are 3 ways to resolve the Perl5lib variable:
(1) Open the httpd.conf file under directory C:\xampp\apache\conf (my installation directory is C:\XAMPP),
Comment out the include "conf/extra/httpd-perl.conf": # include "conf/extra/httpd-perl.conf".
(2) Open Directory C:\xampp\apache\conf\extra (my installation directory is C:\xampp) under the httpd-perl.conf file, find LoadModule perl_module modules/mod_ perl.so, add perlswitches–t on the following line, save the file.
(3) Modify environment variables: Add C:\xampp\perl\lib to the environment variable path; C:\xampp\perl\site\lib;
Either of the first two methods can solve the Apache I encountered after the start and immediately stop the problem, the 3rd method I encountered is not shown, but has been running, as for another situation may be useful to some netizens, so also wrote it out for reference.
Other methods:
The following solution is also a netizen in the actual use, but I do not recommend.
The reason is that you can change the server configuration, try not to move the operating system environment and configuration, otherwise, other software problems later, you do not know whether this system set up to blame.
Of course, if you're familiar with your operating system, it's another matter.
And now I just write, for your reference, perhaps because of your special reasons, just to solve your problem.
1 Close the process that occupies port 80.
In run, enter the cmd command, open the DOS window, enter the command: netstat–abn–>d:\port.txt or command netstat–ano|findstr 80 command, hit the process that occupies 80 ports, and then hit the Task Manager window to close the process. This method is not stupid, the implementation is more troublesome, not recommended to use.
2 Modifying network settings
(1) Network Neighborhood--Local connection--attribute--internet protocol (TCP/IP)--Properties--Advanced--wins Tag--Remove the tick before "Enable LMHOSTS query (L)".
(2) Control Panel--windows Firewall--"Advanced" tab--local connection--settings--"Services" tab--tick "secure Web server (HTTPS)."
This method is a bit strange, can not tell why, if there is no way to find out, you may try.
Apache cannot start a workaround after installing XAMPP