Noman Ajmal
Noman Ajmal

Reputation: 21

Unable to start Apache module in xamp server

I have recently installed xamp server for the first time and want to run a php website on the local server. When I start Apache module in xamp server then it shows following error however MySQL starts and runs fine:

9:04:58 PM  [Apache]    Attempting to start Apache app...
9:04:58 PM  [Apache]    Status change detected: running
9:04:58 PM  [Apache]    Status change detected: stopped
9:04:58 PM  [Apache]    Error: Apache shutdown unexpectedly.
9:04:58 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
9:04:58 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
9:04:58 PM  [Apache]    Press the Logs button to view error logs and check
9:04:58 PM  [Apache]    the Windows Event Viewer for more clues
9:04:58 PM  [Apache]    If you need more help, copy and post this
9:04:58 PM  [Apache]    entire log window on the forums

I am doing this for my software testing assignment. I have to test a website on local server and for that I have installed xamp server. Can anyone help?

Upvotes: 0

Views: 611

Answers (3)

Moix Khan
Moix Khan

Reputation: 9

In some cases Some ports are blocked by your network admin or ISP (although, I would not recommend running Xampp as a publicly accessible server).

And port 80 is used by some other applications like Skype,etc.. when you want to access both Apache and those applications some conflicts may occurs for this problem you have a option to change the port number for Apache server

If your Apache server is not working then it shows that some other applications is using port 80

Let do it manually. Step 1: For this process first of all open httpd.conf file which is located xampp\apache\conf\

In my system my xampp is installed in c drive so my path is c:\xampp\apache\conf
your’s may be different from this so now open httpd.conf file using a text editor or programmer’s editor (i am using notepad++) Now locate the line that says Listen 80. It is line #47 or else press contol+f and type 80 then it will automatically moves courser to here then change 80 to your own port here i am using 3388. After that save the file by pressing control+s. After successful save Restart the Apache server your port number is successfully changed

Upvotes: 1

Moix Khan
Moix Khan

Reputation: 9

Sometimes ,this error occurs due to same port use by other software on your Computer ,So u should have to change the port number or disable the same port no from other software like virtual box etc

Upvotes: 0

Dipen
Dipen

Reputation: 27

There could be many possible answers to this. The most common one is another program running on port 80. I had the same problem and then I found that my Vagrant box was running on port 80.

If you have skype installed on your computer, then change your apache's port to something else.

To do so, go to xampp/apache/conf/httpd.conf and change following line in httpd.conf:

ServerName localhost:80

to

ServerName localhost:81

Furthermore, if it doesn't work, change the following line as well:

     Listen 80
     to 
     Listen 81

Upvotes: 0

Related Questions