Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

AMP Development on Apple?

MarkMark Vanilla Staff
edited August 2006 in Vanilla 1.0 Help
Right now on my Windows system I've got a number of different installations of MySQL, a number of different installations of PHP, and a single installation of Apache that deals with all of these different MySQL/PHP versions quite nicely. When this spanky new Macbook arrives, I'm wondering if I can set up a similar scenario. Are there any tools to assist with this type of thing on Apple? This is your chance to sell Apples as development machines, Mac zealots!

Comments

  • Actually, I wouldn't mind knowing how you pulled that off on Windows.
  • MarkMark Vanilla Staff
    @Bergamot - It was a pain in the ass.

    I downloaded and manually installed all of the MySQL versions I wanted. I set up all of them to run as windows services, but I made sure that only the most recent version starts automatically when Windows starts. If I ever want to use a different version of MySQL, I open up "Control Panel" > "Administrative Tools" > "Services" and then stop the one running and start another.

    For PHP I created a PHP folder in my c drive. Inside that one I downloaded and unpacked all versions of PHP I wanted to play with. I made sure to configure the php.ini's properly in each installation. If I ever need to switch to a different version of PHP, I copy the php.ini of the version that I want and paste it into the c:/windows folder over top of the php.ini sitting there. Then I go into Apache's httpd.conf file and comment out the PHP that was running and uncomment the one I need. My conf file has a bunch of php installations sitting there like this:

    # PHP 3.0.17 # Action application/x-httpd-php3 "C:\php\php-3.0.17\php3.exe" # PHP 4.3.0 # LoadModule php4_module "C:\php\php-4.3.0\sapi\php4apache.dll" # PHP 4.3.6 LoadModule php4_module "C:\php\php-4.3.6\sapi\php4apache.dll" # PHP 4.3.11 # LoadModule php4_module "C:\php\php-4.3.11\php4apache.dll" # PHP 5.1.1 # LoadModule php5_module "C:\php\php-5.1.1\php5apache.dll" # PHP 5.1.2 # LoadModule php5_module "C:\php\php-5.1.2\php5apache.dll"

    Then I go to "Control Panel" > "Administrative Tools" > "Services", find the Apache service and restart it. It reloads it's configuration and I'm off to the races with the other version of PHP.


    I considered writing a little .NET app to make the switch for me, but I don't do it often enough to warrant spending the time writing the app. Plus, I know what I'm doing well enough on Windows.

    But I'd love it if Mac had something slick to use.
  • Mark, if it's anything like my linux installation(s), I'm willing to bet you'll also be able to do roughly the same as you've done on that windows machine. And managing it all manually, I must add is quite impressive, I'm suprised you haven't yet written your own .net or some kind of batch file to manipulate the services already (now that I've given you this idea, you probably will). The only difference you'll encounter is the means to start and stop apache/mysql/php and sort ouf how to restart different versions, but it should be roughly similar.
  • MarkMark Vanilla Staff
    @Lech - You said: "now that I've given you this idea, you probably will"

    Before that, I said "I considered writing a little .NET app to make the switch for me, but I don't do it often enough to warrant spending the time writing the app"

    So wait. You gave me the idea?

    hahaha
  • Hmm, not sure about versions of PHP, but Headdress may be of some interest?
  • edited June 2006
    There's a really easy way, drag and drop server

    www.mamp.info

    latest apache, mysql, php4 and 5.

    drag and drop install, its a great tool, and 100% free open source.
  • @mark: haha, well I probably missed that bit and jumped into the specifics of how you did it, one of those days and I'm totally going to sleep early on a friday. total lack of sleep here, running on fumes :D But yeah, why not release something as useful like that even if it turns out to be developmental and unsupported vaporware? :D at least you'll get some use out of it instead of manually flipping all those switches. I seriously need to just stop answering threads without reading ALL of the comments while in this current sleep-deprived state, haha! :)
  • edited June 2006
    yes i've been playing around with MAMP (http://www.mamp.info/en/home/) for some quick additional configurations over my base apache install and its a nice quick solution. there's also fink if you want to get a bit more messy
  • MarkMark Vanilla Staff
    Cool - thanks for the tips, guys!
  • edited June 2006
    have you seen fink? i don't know if it will be capable of handling complex configurations like multiple concurrent versions of php and mysql... but it is neat to be able to `fink install gimp`, and then come back to see gimp loaded and running...
  • sounds a bit like apt and yum to me?
  • As MOX is based on Unix I would be suprised if you COULDN'T do that, it would fight the whole principle of the system. Mighty convenient.
  • I have about given up on Mamp, it has potential but its too buggy, the mac set up is not so easy but once you get it set up its like a rock, this headdress sounds interesting, looks like its a good one used for live server as well where programs like mamp are mainly for development purposes only and to move it to a live server will only open up another can of worms, I think I may try headress
This discussion has been closed.