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 ?

6
  • 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 7: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 7:57
  • 1
    Please post the part of the script after stop). – Jos May 12 '14 at 8: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 9: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
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. :)

4
  • I followed it. But still it is not solving my issue in Ubuntu 10.04 – Gunaseelan Feb 24 '15 at 13:23
  • What error are you getting? I tried the solution on 14.04 only. – Muhammad bin Yusrat Feb 26 '15 at 3:41
  • Showing "The webpage is not available" when I tried this url. localhost/phpmyadmin. I am using Ubuntu 10.04 – Gunaseelan Feb 26 '15 at 5:10
  • This is not an issue with Apache (or the one being discussed in this page). If you are able to open localhost and you see something there, it means that apache is running fine. – Muhammad bin Yusrat Feb 27 '15 at 14:39
5

Delete the following files:

  • $XAMPP_ROOT/logs/httpd.pid
  • $XAMPP_ROOT/var/mysql/$(hostname).pid
  • $XAMPP_ROOT/var/proftpd.pid
3
  • How does this solve anything? What does it do? – Kaz Wolfe Oct 10 '14 at 0:07
  • If this files exists XAMPP thinks that Apache,MySQL and ProFTPD already running. Its can happens if you hard reboot your PC when XAMPP is running. – Opacum Mar 4 '15 at 9:15
  • Look how i solved this issue - joxi.ru/v29dGnQILqXRmG – Opacum Mar 4 '15 at 9:28
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.