Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > PHP in os x server

PHP in os x server
Thread Tools
Exizl del Fuego
Junior Member
Join Date: Oct 2001
Location: Seattle, WA
Status: Offline
Reply With Quote
Oct 9, 2001, 05:46 PM
 
hi

i recently installed os x server 10.1. i did it because i thought it would be easy to test my own php scripts with it. i heard that all the webstuff as php, mysql, ... is included in the os x server and can easy be handled by the admin tool. but when i start the webservice and test a php script nothing happens. why? how can i set up the server to run my php scripts? (i am really a newby so please gimme some advice. i couldn't find anything useful on it elsewhere!)

thanks in advance!
     
pegges
Junior Member
Join Date: Oct 1999
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Oct 10, 2001, 01:08 AM
 
You'll have to edit the httpd.conf file to make Apache parse PHP. There are a number of descriptions on how to do this around the web.
     
Exizl del Fuego  (op)
Junior Member
Join Date: Oct 2001
Location: Seattle, WA
Status: Offline
Reply With Quote
Oct 10, 2001, 07:30 AM
 
ok. i did that. i removed all the #'s where i had to. but now, when i test a .php -script in a browser (and i chose the right extension in the .conf-file for my php scripts) a alert appears that asks me what to do with that kind of file...!?
in the server admin tool i set the mime types for .php to 'server parsed' what seemed suitable to me.
any ideas?
     
spiggott
Fresh-Faced Recruit
Join Date: Jul 2000
Location: Raleigh, NC USA
Status: Offline
Reply With Quote
Oct 10, 2001, 02:46 PM
 
Originally posted by pegges:
<STRONG>You'll have to edit the httpd.conf file to make Apache parse PHP. There are a number of descriptions on how to do this around the web.</STRONG>
This site has great info on PHP and MySQL on OS X:
http://www.entropy.ch/software/macosx/

Hope this helps.
     
Exizl del Fuego  (op)
Junior Member
Join Date: Oct 2001
Location: Seattle, WA
Status: Offline
Reply With Quote
Oct 10, 2001, 05:53 PM
 
... and it still doesn't work. got same alert as above.
     
Mactoid
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Oct 10, 2001, 07:00 PM
 
Originally posted by banzai:
<STRONG>ok. i did that. i removed all the #'s where i had to. but now, when i test a .php -script in a browser (and i chose the right extension in the .conf-file for my php scripts) a alert appears that asks me what to do with that kind of file...!?
in the server admin tool i set the mime types for .php to 'server parsed' what seemed suitable to me.
any ideas?</STRONG>
sounds to me like your just trying to directly open the php file in your browser. You can't do that, you have to go through apache. Put the file in your Sites folder in your user directory then enter the URL: "http://127.0.0.1/~user/script.php"

Make sure you substitute your own user name and script name in the above url.
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
Exizl del Fuego  (op)
Junior Member
Join Date: Oct 2001
Location: Seattle, WA
Status: Offline
Reply With Quote
Oct 10, 2001, 07:34 PM
 
it works now. i set the MIME types for php files wrong in the admin tool (i set them to 'server parsed' instead of 'application/x-httpd-php').

thanks for all!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:09 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,