I learned of XAMPP on windows, and am sad to see there is no easy-to-use GUI for controlling the services, and have found few working/easy solutions. I ran accross the guy who had screenshots up last year and never got to finish his, which looked nice; but I don't have time to do something like that at the moment.
I made a quick AppleScript app based loosely around someone elses grep command that I ran accross that makes things a little more intuitive. It can be used standalone, or you could easily put it in your startup items (I have it sitting in my Atomic Beef launch bar.)
- Code: Select all
--
-- XAMPP AppleScript Controller
--
-- Alexander Sherwin
-- alex.sherwin@gmail.com
--
-- v1.0 created 11/18/06
--
set isAppleApacheRunning to 1
set isXamppApacheRunning to 1
-- Apple Apache check
try
set s to do shell script "ps -ax | grep /usr/sbin/httpd|grep -v grep"
on error errMsg number errNum
set isAppleApacheRunning to 0
end try
-- XAMPP Apache check
try
set s to do shell script "ps -ax | grep /Applications/xampp/xamppfiles/bin/httpd|grep -v grep"
on error errMsg number errNum
set isXamppApacheRunning to 0
end try
if isAppleApacheRunning is 1 then
set dialogReply to display dialog ¬
"Apple's Apache is running. Stop this process first." buttons {"Exit"} default button 1
return
end if
-- If XAMPP is not running
if isXamppApacheRunning is 0 then
set dialogReply to display dialog ¬
"XAMPP is not running." buttons {"Start", "Exit"} default button 1
if button returned of dialogReply is "Start" then
do shell script ¬
"/Applications/xampp/xamppfiles/mampp start" with administrator privileges
return
else if button returned of dialogReply is "Exit" then
return
end if
end if
-- If XAMPP is running
if isXamppApacheRunning is 1 then
set dialogReply to display dialog ¬
"XAMPP is currently running." buttons {"Stop", "Restart", "Exit"} default button 1
if button returned of dialogReply is "Stop" then
do shell script ¬
"/Applications/xampp/xamppfiles/mampp stop" with administrator privileges
return
else if button returned of dialogReply is "Restart" then
do shell script ¬
"/Applications/xampp/xamppfiles/mampp restart" with administrator privileges
else if button returned of dialogReply is "Exit" then
return
end if
end if