After XAMPP is installed, Apach cannot be started.

Source: Internet
Author: User
Tags vc9

XAMPP is easy to get and install. You only need to visit the following website:
Http://www.apachefriends.org/zh_cn/xampp.html to download XAMPP, I installed Windows Installer installation package, as long as according to its installation tips all the way to install it, very convenient and fast.
However, it is best to select a disk other than disk C in the installation directory. According to some netizens' experience, if you select disk C for installation in windonws7 or Vista, due to permission reasons, some files may fail to be created. If you already have the highest permissions, you can directly install it on disk C.
In Windows XP or Windows 7, the Apache server cannot be started after XAMPP is installed. There are many reasons for this. Let's take a closer look.

    • No environment for vc9 Installation

It is very easy to determine whether the problem is true. If you run c: \ XAMPP \ apache \ bin \ logs separately, an environment configuration error is prompted.
Solution: Download vcredist_x86.exe directly.
The following message is displayed in php.net:
Vc9 versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. the vc9 versions require you to have the Microsoft 2008 C ++ Runtime (x86) or the Microsoft 2008 C ++ Runtime (x64) installed
Microsoft Visual C ++ 2008 redistributable package (x86133, Which is vcredist_x86.exe, a runtime environment, is downloaded according to the link, allows you to run applications developed using Visual C ++ on a computer without visual C ++ 2008 installed. After installation, start Apache. Everything is normal.

    • Port occupied by other programs

Sometimes, you can run Apache directly without installing the vc9 environment. One important reason is that the port used by the Apache server is occupied by other programs. The classic example is thunder.
Solution:
1.80 port conflict. solution:
Open httpd in the directory c: \ XAMPP \ apache \ conf (my installation directory is c: \ XAMPP. in the conf file, replace 80 in listen 80 and servername localhost: 80 with 8081 or another value (try not to use port 0-1023, which is the system reserved port.
2. listening port 443 conflict. solution:
Open the httpd-ssl.conf file under the directory c: \ XAMPP \ apache \ conf \ extra (my installation directory is c: \ XAMPP) and comment out listen 443: # change Listen 443 to 443 or another value (do not use 0-4433 whenever possible ).
3. apache is stopped immediately after it is started. In one case, Apache is started normally, but the control panel of XAMPP is not displayed. You can enter http: // localhost: 8081. If you can directly access the control page of the Apache server, there is no problem. In another case, the cause may be that Oracle10g is installed, and there is a conflict with the perl5lib variable in it. There are three solutions:
(1) Open the httpd. conf file under the directory c: \ XAMPP \ apache \ conf (my installation directory is c: \ XAMPP,
Comment out include "CONF/extra/httpd-perl.conf": # include "CONF/extra/httpd-perl.conf ".
(2) Open the httpd-perl.conf file under the directory c: \ XAMPP \ apache \ conf \ extra (my installation directory is c: \ XAMPP), find loadmodule perl_module modules/mod_perl.so, add perlswitches-T in the following line and save the file.
(3) modify the environment variable: add c: \ XAMPP \ Perl \ Lib; C: \ XAMPP \ Perl \ site \ Lib; to the environment variable path.
Either of the first two methods can solve the problem that I encountered immediately stopped after Apache was started. In the other 3rd methods, I encountered a problem that was not displayed but was already running, as for another situation that may be useful to some netizens, I wrote it for reference.
Other methods:
The Solution Below is also used by netizens in practice, but I do not recommend it.
The reason is that you can change the server configuration so that you do not need to change the operating system environment and configuration. Otherwise, you may not know whether the system settings are causing problems in other software in the future.
Of course, if you are familiar with your operating system, let alone.
Now, I just wrote it for your reference. Maybe it is because of your special reasons that it just solves your problem.
1. Disable the process that occupies port 80.
In "run", enter the CMD command, open the DOS window, and enter the command netstat-ABN-> D: \ port.txt or netstat-ano | findstr 80, call the process that occupies port 80, and then open the Task Manager window to close the process. This method is difficult to implement and is not recommended.
2. Modify network settings
(1) network neighbors -- local connections -- properties -- Internet Protocol (TCP/IP) -- properties -- Advanced -- Wins tag -- remove the check box before "enable LmHosts query (l.
(2) control panel -- Windows Firewall -- "advanced" tab -- local connection -- settings -- "service" tab -- select "Secure Web Server (https ).
This method is a bit strange. You cannot tell why. If you cannot find a solution, try it.

After XAMPP is installed, Apach cannot be started.

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.