XAMPP on os x the RIGHT way

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

XAMPP on os x the RIGHT way

Postby 3eyes » 27. August 2005 20:51

I really like XAMPP and it really saves me a lot of time but I have some serious gripes about the way its put together for os x.

First, its in the Applications folder, because apparently that is the Mac way, which is right but the various settings files and documents don't go there!!!!!!

There is an /Library/Application Support/ folder, the etc. folder (including symbolic from the phpadmin config etc) should be in there something like /Library/Application Support/xampp/. The document root for apache should be here too, mysql should probably store its DB's here also. Basically anything that is not the Application but variables to run it should be moved.

The user dir is not public_html its ~/Sites btw

The installer is cool, but the thing wipes my settings when I use it, and I have to manually deal with all that stuff every-time I upgrade, which is a shame as there is likely to be no changes at all in things like httpd.conf between releases yet I am for sure going to customise it...

Use a disk image for the distribution. Tiger can't do STIX out of the box. I did say about this in the english forum and a tar.gz version appeared which is good but if your interested in the recommended Mac way use a DMG disk image.

There have been many people asking about starting at boot, just add some of the solutions in the forum to the installer. Better yet get someone to make a pref pane to deal with the whole thing. I know there might not be much that can be done about this because of time and a lack of people so this is more a pipe dream.....

Anyway, this was not meant to come across so harsh, just as a gentle push :)
3eyes
 
Posts: 3
Joined: 01. August 2005 09:13

Postby Kristian Marcroft » 28. August 2005 10:01

Hi,

thank you for your post and your oppinion...
Though let me explain a couple of things...

First off...
XAMPP ist in the Applications folder and _only_ in the Applications folder because that is the philosophy of XAMPP. Everything in one folder without thouching anything of the rest of the system (besides the installer)...

All libraries needed for XAMPP etc are in the /Applications/XAMPP folder!
Alot of the Libraries are also by default on your System but not on every System.

And since MacOS X doesn't really care about backwards compatibility this was the only way we could do it.

For the issue of the installer overwriteing your config, I do have this on my ToDo.
The Startup on Boot problem is that we have up to now not had one single solution that works for all. We need this though. And making it startup on boot, it also requires to change something at the System itself. (which again is not the philosophy of XAMPP)

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby 3eyes » 28. August 2005 10:30

Thanks for the response, perhaps I should clear up one thing. I _never_ mentioned moving the libraries, just the settings and the documents – essentially the only things one would create or edit with such a system installed. So a breif list would be

Apache docs
Mysql DB files
httpd.conf
php.ini
etc. etc.

So the libraries comment I will partially skip because I didnt mention them and belive they should be in the applications folder.

I like the approach of everything in one place, it makes it easy to work with, but only when modifying the underlying system not when creating web pages. Thats the thing, when working we dont really work with the system much. Once its up its 90% working with documents and the rest is tweaking _settings_ and once we have a good setup we dont need to mess with these things as much. You have identified pretty much the same things because you have a folder set aside for all the documents to be in one place (bar the mysql DB's btw which are mixed with the app libraries)

My suggestion then was to place them where people on a Mac expect them to be and not mix the app, docs and settings into one place. os X sets out the directories mentioned to do exactly these things, so to me it seems sensible to use them, and they have been pretty consitant in their presence and placement i might add.

You skipped my comment about the user directory directive for apache, it is left as default and as such is wrong on a mac. A users home dir always has a ~/Sites folder which is where per user documents are designed to go.

I am glad the wipe settings on install issue are on the todo. What about the disk image vs. stix?

I understand the issues with the startup item, but os x does come with a standardised way of doing this, true tiger revamed it completly but the old way still works as far as I can tell and the differnce is slight from the point of view and installer can select the correct version and use it.

Its interesting to hear the philosophy of xampp is not to mess with the system. The idea of a webserver works against this, and I can already see the conflics you must have. But if your building an 'application' then shouldnt you follow the rules of an application? The things I list above are how the system and mac users _expect and demand_ an application to work. When xampp was in usr/local or opt/local (i forget which) it wasnt trying to fit in as an app and just felt like any other unixy set of components. Funny how then I didnt think about the placement of settings or documents but now it fundementally disturbes me the Application folder contains everything, its the only 'app' on the mac to do so and goes against the whole structure of the system. Out of interest do any of the developers have os x, I am curious how they feel about these issues....

thanks for the response, I look forward to a followup. Again I am not trying to be agressive or adversarial I am just trying to raise what I belive a valid and fundemental point.
3eyes
 
Posts: 3
Joined: 01. August 2005 09:13

start Xammp at boot time on OSX

Postby thetravellor » 16. December 2006 11:02

You do this on Windows, why not Mac OSX?

Can make it a tick box in your control panel.

This guy has worked it out for you:

http://linsec.ca/blog/index.php?/categories/2-OS-X

kudos to him
thetravellor
 
Posts: 4
Joined: 16. December 2006 10:13

Postby Kristian Marcroft » 16. December 2006 14:00

Hi,

as the Mac version is beta yet, not everything is included.
Please do _not_ compare MacOS X and Windows, as these are two completely different systems. You may more likely compare it with Linux, as it's more close to that than anything else.

We do know that MAMPP still requires improvments, but as it's all open source, we also hope for some support from the users. So if you know how to do this, then contribute to the project.

Thanks
Kristian Marcroft
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby briantmeyer » 09. February 2007 02:11

Just wanted to say that i think the "beta" is great, and really makes it easy to have one version that can be tested on a mac, and deployed on a linux box.

I understand the philosophy of everything in one folder.

However the mac philosophy is to put such items in seperate folders, just like we are told to separate presentation and logic layers in our php apps. This allows us to upgrade an app, and leave the preferences alone. We also can back up our user folder periodically, and back up the applications folder less often or just reinstall. Apple also recommends using the various library folders for this reason.

The "etc" folder, and "xampfiles" folder are doing this, but i'm not sure the average mac user would get this. I doubt that many even realize that macs still have a folder with this name. I first got xampp for a mandrake system, so the config is the same which i think is great. I am not sure what could be done to make it more mac like, and as a "programmer" level application im not sure the need. Apple for example puts the developer tools in the root of the hard drive. I like it where it is much better than when it was in the root like it was a long time ago.

Perhaps changing the folder "etc" to "Library" would make it more clear.

As for starting the Xampp on boot, this was something i spent some time researching, and apple has developed their own system. While it involves folders other than the xampp folder, i cannot see a different way as you have to change something.

This is how apple recommends
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html>


Following is my very simple implementation

folder called xampp
inside is two files
StartupParameters.plist
Xampp

StartupParameters.plist contains the text
{
Description = "Xampp";
Provides = ("Web Server");
Uses = ("Disks", "NFS");
}

Xampp contains the text
/Applications/xampp/xamppfiles/mampp start

The system actually repaired the permissions on these files upon booting, and it works like a charm. Put the folder in Library/StartupItems and it works, pull it out and it stops. Dont have to sudo, or deal with the terminal. And i can use the control panel to restart it as needed.

Looking at System/Library/StartupItems there is a more advanced example for how apache is done. It is tied into the control panel and has start, stop, and restart built in which is called by the os. This could be modifed with the appropriate commands to xampp, which would allow a user to use the System Preferences/Sharing to start and stop it. I think that by doing it this way it would also open up the firewall, but i'm not sure. ( this method is actually the first way i got the auto startup working on one of my systems.)

I would think that if more are interested in startup items, something better could be implemented than what i have come up with. The apple docs seem to indicate that there is a lot of control over the startup process. I'm thinking that the Xampp control panel could be modified to write the appropriate files and folders to the StartupItems folders, and allow everything to technically stay in the xampp folder.

Eventually parts of this project have to be moved out of the Xampp folder to really move in to the Mac world. A system preferences pane or a startup item just can't reside in the xampp folder. Also integration with bbedit, scripts that open php.ini, apache.conf and the like as root would be nice. But all this would include putting files in other spots, even if it's done by the user after install.
briantmeyer
 
Posts: 1
Joined: 07. February 2007 09:00

Postby asloc » 02. July 2007 16:49

I use XAMPP to develop Joomla and custom database driven websites all from my usb drive. I do this so that I can work from just about anywhere with a Win or Linux based PC, or on a clients own machine.

Please oh please keep developing XAMPP with your current "keep it all in one place" philosophy! I can move easily (or at least easily enough) between several platforms, and I hope one day this will include my Mac.

I implore you to keep it as platform independent as possible. I think it would be a grave mistake to create versions that follow the idiosyncrasies of one platform or another just to satisfy someone's concept of THE RIGHT way.

Keep up the great work!

Andy.

Kristian Marcroft wrote:Hi,

thank you for your post and your oppinion...
Though let me explain a couple of things...

First off...
XAMPP ist in the Applications folder and _only_ in the Applications folder because that is the philosophy of XAMPP. Everything in one folder without thouching anything of the rest of the system (besides the installer)...

All libraries needed for XAMPP etc are in the /Applications/XAMPP folder!
Alot of the Libraries are also by default on your System but not on every System.

And since MacOS X doesn't really care about backwards compatibility this was the only way we could do it.

For the issue of the installer overwriteing your config, I do have this on my ToDo.
The Startup on Boot problem is that we have up to now not had one single solution that works for all. We need this though. And making it startup on boot, it also requires to change something at the System itself. (which again is not the philosophy of XAMPP)

So long
KriS
asloc
 
Posts: 1
Joined: 02. July 2007 16:32

xampp autostart? G4, 10.4.11 sadness

Postby orionrush » 23. April 2008 15:01

Im have the dickens of a time finding an auto start method that works. Im using a G4 loaded with 10.4.11. I was really hoping that the following method would be my silver bullet. But no dice - though the system did correct the permissions on restart so I know that its trying to execute the script. However Im just out of my league so Im not sure what needs to be tweaked. Has anyone else found a method to get xampp to autostart after a powerfailure etc?

Any help would be much appreciated!

tks - sad newbie :(


Following is my very simple implementation

folder called xampp
inside is two files
StartupParameters.plist
Xampp

StartupParameters.plist contains the text
{
Description = "Xampp";
Provides = ("Web Server");
Uses = ("Disks", "NFS");
}

Xampp contains the text
/Applications/xampp/xamppfiles/mampp start

The system actually repaired the permissions on these files upon booting, and it works like a charm. Put the folder in Library/StartupItems and it works, pull it out and it stops. Dont have to sudo, or deal with the terminal. And i can use the control panel to restart it as needed.
orionrush
 
Posts: 2
Joined: 23. April 2008 14:30
Location: Glasgow


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 5 guests