Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Automatically start Xampp at login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically start Xampp at login
Authored by: thespider on May 03, '09 11:42:55AM
Almost a year later, another way to start: Using OS X 10.5.6 and XAMPP 1.0.1

To start XAMPP using Launchd, all you have to do is create a text file using something like TextWrangler or BBEdit in /Library/LaunchDaemons/ named: org.apachefriends.xampp.plist

in this text file enter this text:

<?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>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>org.apachefriends.xampp</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Applications/XAMPP/xamppfiles/xampp</string>
		<string>start</string>
	</array>
	<key>QueueDirectories</key>
	<array/>
	<key>RunAtLoad</key>
	<true/>
	<key>WatchPaths</key>
	<array/>
</dict>
</plist>
Set the permissions on the file to:
Owner: root Group: wheel
Owner: read+write Group: read Others: read

Restart your machine and XAMPP should start all services.

Or, you can start the launchd item with this terminal command
type in terminal:
launchctrl load /Library/LaunchDaemons/org.apachefriends.xampp.plist

This launchd item will also keep your site running, should something accidently quit or exit.

You can also use Lingon to create this LaunchD item. Use this command in Lingon to start XAMPP:
/Applications/XAMPP/xamppfiles/xampp start

Check this site for different startup command possibilities:
http://www.apachefriends.org/en/xampp-macosx.html#903

Full steps from the terminal to create this launchd item are as follows:

Open Terminal
type:
sudo -s
Enter your password (you need to be an admin)
type:
cd /Library/LaunchDeamons
type:
vi org.apachefriends.xampp.plist
hit the "i" key
paste this text in:

<?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>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>org.apachefriends.xampp</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Applications/XAMPP/xamppfiles/xampp</string>
		<string>start</string>
	</array>
	<key>QueueDirectories</key>
	<array/>
	<key>RunAtLoad</key>
	<true/>
	<key>WatchPaths</key>
	<array/>
</dict>
</plist>

hit the "esc" key, then ":", then "wq" and hit return
Now type:
launchctrl load /Library/LaunchDaemons/org.apachefriends.xampp.plist

Check your XAMPP control app and you should see that they are running. Test it out by stopping apache, mysql, or ftp from the XAMPP Control. After a minute or so, it should auto start your processes and will reflect that change in the XAMPP application.

Hopefully I didn't miss anything, let me know if I did, or if you need help.
Rusty

[ Reply to This | # ]
Automatically start Xampp at login
Authored by: cicciokun on Sep 11, '09 06:24:31AM
excellent tutorial, but it's "launchctl" ;)

[ Reply to This | # ]