Results 1 to 3 of 3

Thread: Running XAMPP at boot as root?

  1. #1

    Default Running XAMPP at boot as root?

    I finally was sick of having to SSH into my Suse 10.3 box as root and manually starting XAMPP (therefore Ampache) when I turn the machine on (I turn it off after use just because it isn't complete yet). After some research, I found that I could set it to run during boot by adding the command to run XAMPP (in my case, /opt/lampp/lampp start) into the /etc/rc.d/boot.local text file.

    This DOES work, as far as starting everything up, BUT for some reason, when I start the system this way, if I try to stream, the flash player will come up, but nothing will play. I can see the data buffer fill, but it is faster than it should be. Keep in mind that I have to transcode, using ALAC and LAME. It normally takes 10-15 seconds for the song to stream to the player, but when using this method, the song gets to the player in 5ish seconds, almost as if I were just copying the file, as would be the case if I were using MP3s and not transcoding.

    So, I checked the permissions of ALAC and LAME. Both were set to 755 root root. Noticing that XAMPP was running as nobody, I changed the permissions of ALAC and LAME to 755 nobody root. No dice, so I changed them back to root root. As root, I restarted XAMPP, and all was well... That's odd... I logged out, then back in as a regular user, and received an error that XAMPP must be run as root (but through other research, saw that it switched to nobody after it is running).

    It seems like there is an issue with how the program is set to run after boot. Is there a way that I can set it to run as root (then it will change on it's own to nobody)?

  2. #2
    Join Date
    Jul 2008
    NJ, USA

    Default Re: Running XAMPP at boot as root?

    You do NOT want it to run as root. I won't go into the details here, it's been discussed at length on the 'net, but that opens up a giant amount of security problems (not just with Apache but with MySQL as well). It should be running as nobody... I think.

    XAMPP should (I don't know, I literally mean should) come with an init script (which *should* be in /etc/init.d). If YaST can't detect this and let you enable it through the Services screen, then follow the tutorial on adding links in /etc/rc.*.

    Is there a specific reason why you use XAMPP? The default OpenSuSE packages for Apache, MySQL, PHP, etc. work beautifully.
    J. Antman
    Dedicated SuSE user since October, 2001 (7.3)

  3. #3

    Default Re: Running XAMPP at boot as root?

    I understand that I don't want to run as root. XAMPP just needs to be STARTED as root. It changes to 'nobody' automagically.

    In any case, I looked through my Apache logs and for some reason, it was saying that 'alac' and 'lame' could not be found (even though they are placed in /usr/local/bin. Anyways, the solution was to change my Ampache config to read '/usr/local/bin/alac' instead of just 'alac'. Now, all works as it should. The strange thing is that I have two boxes set up for XAMPP and Ampache, both with an identical config, and only one requires specifying the absolute path of alac and lame. The other works just fine using 'alac' and 'lame' (without absolute paths).

    Oh well, the problem is solved and all works well...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts