Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP on Mac OS X ? 1

Status
Not open for further replies.

admoore

IS-IT--Management
May 17, 2002
224
US
Can ANYONE point to a reliable site or give specific details on getting PHP to work on Mac OS 10.1 (or 10.2 as I've got it coming...)????

I got MySQL up & running fine and have been to the following sites; but so far I can't get it to work...



I thought I had it properly compiled & installed; yet, when I point to my test.php file all I get is the source echoed to the browser...

Maybe I screwed it up trying to install it as now (after putzing w/ it) I understand that PHP came w/ 10.1 anyway- Can't find any Apple documentation on how to enable it though & Darwin is NOT the same as my SuSE system!

Anyway, I am not a Mac person by nature- The iBook seemed like a decent enough development platform for Web based PHP/MySQL stuff though as it's SUPPOSED to run all w/ no probs...

I am sure somebody else besides me thought this was a good idea-

TIA for ANY help!
 
This may be a stab in the dark...

Check to make sure the PHP file is using basic unix-like text encodings. I use BBEDit Lite and save for unix. Some oddball text encodings may throw off the way PHP reads the script.

Running a PHP file with the wrong text encoding is sort of like trying to run a binary PHP file instead of an ASCII PHP file.

I followed the instructions from entropy.ch and seemed to make out okay. The author of the site warns about updates from Apple's Sotware Update that may overwrite some of his packages.
 
You don't have to know Macs to use OSX, if you know BSD ok.
Which webserver are you using? Apache? which version? The error you describe is usually what you get when Apache does not recognize the mime type, or does not have the php module loaded.
You need to add the LoadModule and AddType directives by hand to the httpd.conf file because php won't do that for you. A little more info and I'll be able to help more. ________
Remember, you're unique... just like everyone else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top