 |
 |
PHP on OS X?
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status:
Offline
|
|
I tried installing the new version of PHP on my Powerbook. I went to php.net, followed the links to the needed OS X files, and then followed the installation instructions exactly. When I tried typing in a simple bit of PHP code, however, it did not display. I can view standard HTML pages that are local on my hd in IE, but PHP code does not seem to work.
I'm looking to set my powerbook up as a fully functional local webserver so that I can develop pages and view them locally before uploading them to a remote server. Could someone advise how I would go about setting this up or where I can find information on it.
Thanks.
|
|
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2002
Status:
Offline
|
|
I'm assuming you went into System Prefs and enabled Web Sharing, but if not there's a good solution. It's been a few months since I installed it on my computer and I struggled through it. A suggested site (linked to the walkthrough you'll want):
http://www.phpmac.com/articles/view....2384850799cacf
That's what took me through the process, good luck. I spent one VERY long night (6 or 7 am) setting it up, but haven't had problems since (was also setting up MySQL though).
Travis
forté web design
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status:
Offline
|
|
Give me a bit more description on what your problem is.
One of the very first things I do when I test out a PHP install is to make a file called "test.php", and put in just one line here..
< ?php echo("foobars"); ?>
(eliminate the space between the < and the ? above, vbb wouldnt let me put in the complete php code.)
Put that in /Library/WebServer/Documents and then try loading:
http://127.0.0.1/test.php
If it works, you'll get a long page with very verbose information about your PHP install.
If it doesn't work. What happens? Do you get a page and the php code is displayed? If so, the problem is that apache is not correctly passing it off to the PHP engine, and you need to check to see if the correct types are set in your httpd.conf for PHP files.
Otherwise, go in more detail what you see when you try to load the page.
-tim
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2002
Status:
Offline
|
|
Originally posted by timster:
Do you get a page and the php code is displayed? If so, the problem is that apache is not correctly passing it off to the PHP engine, and you need to check to see if the correct types are set in your httpd.conf for PHP files.
[/B]
That could be, but it could also mean PHP4 wasn't properly installed.
Travis
forté web design
p.s. My preferred test is using info(); rather than echo();, but they both work just fine.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: somewhere in ohio
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status:
Offline
|
|
http://www.entropy.ch/software/macosx/php/
This is what I used to install PHP initially. I'll give it another whirl and update with more specific information the next chance I get. Thanks.
|
|
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status:
Offline
|
|
Whoops! Did i actually write echo()?
I actually meant to say phpinfo(). Duh.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|