I can't get XAMPP to start when OS X boots. I've been researching this for some time but with no luck. XAMPP needs to be started as root, and I don't want to store the password for root in a script somewhere and use the "login items" of the accounts pref pane to start xampp. Yes, that will work, but it's not the right way.
I'm trying to launch it using launchd / users damons / LaunchDaemons. That includes creating a plist file in the "/Library/LaunchDaemons" directory.
I created a file called
xampp.startapache.plist and put this inside:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>EnableTransactions</key> <true/> <key>Label</key> <string>xampp.startapache</string> <key>ProgramArguments</key> <array> <string>/Applications/XAMPP/xamppfiles/xampp</string> <string>startapache</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>/Applications/XAMPP/xamppfiles</string> </dict> </plist>
That was outlined here as well as on several other similar help pages. I've tried editing the files manually, and I've also tried using Lingon. But it just dosen't work! I've even tried doing a similar entry for a script file located in the same directory, which would echo the time to a log file. The log file is just blank - like the script is not being run.
How can I make this work?