[BUG] stopping apache fails

Problems with the Linux version of XAMPP, questions, comments, and anything related.

[BUG] stopping apache fails

Postby matteosistisette » 14. October 2013 23:48

$ sudo /opt/lampp/lampp restart
Restarting XAMPP for Linux 1.8.3-1...
XAMPP: Stopping Apache...fail.
apachectl returned 1.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...ok.
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
matteosistisette
 
Posts: 38
Joined: 11. January 2011 12:22
Operating System: Windows 7 64bit; Ubuntu 11.10

Re: [BUG] stopping apache fails

Postby matteosistisette » 15. October 2013 00:06

It seems that the issue in my case is that some files that are set up as log files for some of the virtual servers, don't exist.
I've figured it out by removing "> /dev/null 2>&1" in the lampp script in the line that stops apache.

$ sudo /opt/lampp/lampp stop
Stopping XAMPP for Linux 1.8.3-1...
XAMPP: Stopping Apache...(2)No such file or directory: AH02297: Cannot access directory '/home/teo/Documents/DATA/progetti/sandscapes/logs/' for log file '/home/teo/Documents/DATA/progetti/sandscapes/logs/access.log' defined at /opt/lampp/etc/extra/httpd-vhosts.conf:66
AH00014: Configuration check failed
fail.
apachectl returned 1.


However, there are a couple of issues to be fixed here.
1) such a thing shouldn't prevent you from STOPPING apache. That's ridiculous. I'm not sure to which extent this is an issue in xampp and to which extent this is an issue in apache itslef. But at the very least, you should be given the option to kill apache if stopping it gently fails, and this certainly can be done in xampp.
2) the lampp script should be improved so that, in cases like this, more information about the error is shown. Getting a generic "fail. apachectl returned 1" message is not enough. Being told that something has failed without the smallest bit of information about _what_ has failed is something terribly irritating. Instead of throwing the error stream to /dev/null, save it somewhere and then discard it only if everything goes well.
matteosistisette
 
Posts: 38
Joined: 11. January 2011 12:22
Operating System: Windows 7 64bit; Ubuntu 11.10

Re: [BUG] stopping apache fails

Postby Nobbie » 15. October 2013 12:02

matteosistisette wrote:However, there are a couple of issues to be fixed here.


No, not really.

The basic problem is, that you did not configure Apache correctly. Apache und Administration is not a toy and the start/stopp scripts are not "bullet proofed" against wrong configurations. It is an administration tool for administrators and not a user tool. Of course you might improve the start/stopp scrript (or simply avoid it - you are not forced to use it), but there is no need to improve these tiny tools for everybody, as administration is not a user toy.

Even if we are in the Xampp Board here, i do not recommend using Xampp on Linux systems. Ubuntu and all the other distributions are coming with their own implementation of Apache etc. and these are embedded into the system by far better than Xampp. They are integrated in the repositories of the distribution, they are checked and upgraded automatically, your are given the opportunity to run Apache, MySQL as daemons (or services) via /etc/init.d and so on. It simply fits into your distribution, whereas Xampp is a distribution within a distribution, which cannot be managed by the standard software installations tools of your distribution. This is really Ok for windows, but i dont like it for Linux.
Nobbie
 
Posts: 8779
Joined: 09. March 2008 13:04

Re: [BUG] stopping apache fails

Postby nirrepy » 27. October 2015 01:54

1) such a thing shouldn't prevent you from STOPPING apache. That's ridiculous

No I think it's a very good feature. If you can't stop apache its because you have error in your config.
If you have such error it will be impossible to restart apache. With this you can found error easily, and you're certain apache always run during time to find error.
nirrepy
 
Posts: 1
Joined: 27. October 2015 01:41
Operating System: manfriva


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests