5

Stopping Apache...fail. apachectl returned 1. The status of the lampp is ok but the localhost is not opening,while stopping,it fails and the above error is shown.how to solve this problem? what are the commands for that ?

  • 1
    Are you sure it is lamp and not xamp? The start/stop script of xamp has a "> /dev/null 2>&1" in it (why is beyond me) that prevents you from seeing the correct error message. Our native lamp does not have this kind of feature. Remove it from the script, stop apache and fix the message it shows :) – Rinzwind May 12 '14 at 07:52
  • i am using ubuntu,and the problem is above mentioned,localhost is not opening.while seeing the status through $ sudo /opt/lampp/lampp status ->it shows all is running but while stopping them it shows fail to stop apache.what is the sollution? – user3514447 May 12 '14 at 07:57
  • 1
    Please post the part of the script after stop). – Jos May 12 '14 at 08:59
  • Stopping XAMPP for Linux 1.8.3-3... XAMPP: Stopping Apache...fail. apachectl returned 1. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] fail. kill returned 1. – user3514447 May 12 '14 at 09:34
  • OK, so it is XAMPP. As @Rinzwind suggests, delete the >/dev/null 2>&1 part from the start/stop script, try to stop the service again, and post the output above. – Jos May 12 '14 at 10:10
  • @user3514447 please follow up on the comments from me and jos – Rinzwind May 12 '14 at 10:14

3 Answers3

8

I had the exact same issue. Since you are getting an error stopping Apache and ProFTP only, you need to delete these two files:

/opt/lampp/logs/httpd.pid

and

/opt/lampp/var/proftpd.pid

When you delete the httpd.pid, Apache is automatically killed. And similar happens when you remove the proftpd.pid.

So now you can go ahead and restart the server and new fresh files will be created. :)

5

Delete the following files:

  • $XAMPP_ROOT/logs/httpd.pid
  • $XAMPP_ROOT/var/mysql/$(hostname).pid
  • $XAMPP_ROOT/var/proftpd.pid
Eliah Kagan
  • 117,780
Opacum
  • 59
  • 1
  • 3
0

When you see Stopping Apache...fail. apachectl returned 1 while starting lampp then Run Following command:

 sudo rm -f /opt/lampp/logs/httpd.pid

After running above command restart lampp, it will work definitely.