OSX + php
- Started
- Last post
- 21 Responses
- stewart
is there a way to test php sites locally on mac OSX ?
o sure!
o no way(i still don't have access to a webserver with apache etc (only asp/iis) - but need to check some clients' php files)
- Mimio0
Why not install apache and php locally?
- DeviceUnseen0
Yes. You would need to configure your machine as a server which my friends have but I have not. I heard it isn't that hard to do.
Basically you need to install Apache. I found this article:
- heavyt0
osX has apache built in. go to yoru "sites" folder and pke around.
I installed that PHP solution from entropy, and it works very very well.
TR1
- stewart0
okay, i'll take a dive into that matter tomorrow.
thanks!
- rabattski0
whoah! hold on. by default is apache and php already installed. you don't need to download and install php.
you only need to change a couple of lines in the httpd.conf to enable php.
- rabattski0
btw start your webserver and apache will be enabled. simple as that.
- DigitalMan0
I downloaded MAMP (stands for: Macintosh, Apache, Mysql and PHP):
I am pretty much a newbie to Apache, MySQL and PHP.
But it seems really stable to me (maybe someone with more experience can expand on it).
- welded0
The only thing not built into the OS is mySQL. Those package solutions are (generally) unnesessesary. If it works for you, then keep on truckin'. :)
- DigitalMan0
Yeah, I think you're right, I am about to Scrap MAMP in favour of the built in stuff...I am doing the DW turorial right now
http://www.macromedia.com/devnet…
But if I want to install PHP5+, what do I do? (I'd like to be able to switch between 4 and 5 (like MAMP offers))
- rabattski0
if you really need php5 then go here (linked before) and download 5 for apache 1.3:
http://www.entropy.ch/software/m…apache2 is really experimental and i wouldn't advice using it (there's no real reason for doing it anyways).
why do you want to switch between php4 and 5 anyways? that doesn't make sense.
- DigitalMan0
Hmmm, ok, I have hit a snag with the above install.
At the end it tells me that I can test if everything is ok but creating a phpinfo() file and running it like so:
h ttp://localhost/~UserName/phpinf...
and nothing happens!
But if I make a copy of the file and place it in:
Library/WebServer/Documents/
and then try
h ttp://localhost/phpinfo.phpThe Php info works.
Any ideas what to do?
(I changed DocumentRoot in httpd.conf to /Users/~UserName/Sites, but "realpath" in one of my Php scripts started giving not found errors).
- DigitalMan0
duh, I thought the tilda was to indicate something...you actually need it with the username so:
~ and username
wicked I have it running, sweet!
- stewart0
me too. cool!
and now mysql and phpadmin...
and a copy of dreamweaver mx before the BBedit trail ends. doh!
- tomkat0
I ran mamp here for a while and had no problems..
maybe not the cleanest solution though
- stewart0
hey, it's all up and running - but - is it impossible to test "form to email" documents this way or what?
- rabattski0
that's because you need a mail server installed.
- tomkat0
don't you have the possibility to test online?
- stewart0
Win NT webserver here, so .asp only...