Getting php to work on a mac

I am a PHP newbie.  I installed apache2 and php on Snow Leopard usijg mac ports.  

my php.ini is in /opt/local/etc/php.ini

I have a index.php file in /opt/local/apache2/htdocs

I also have php enables in the httpd.conf file.  So..what do I do?


dmontgomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Adrian CantrillSolutions ArchitectCommented:
When you say using the mac ports ? did you follow something similar to this guide http://foundationphp.com/tutorials/php_leopard.php ?
dmontgomAuthor Commented:
Adrian CantrillSolutions ArchitectCommented:
so what happens when you browse to a test .php file through a web browser ?
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

dmontgomAuthor Commented:
Oops! This link appears to be broken.
Suggestions:

    *
      Search on Google:
dmontgomAuthor Commented:
index.html works but index.php does not
Adrian CantrillSolutions ArchitectCommented:
check your httpd logs (error or access) for the time period and paste the contents - it should give us more info.
dmontgomAuthor Commented:
Error Log
[Thu Oct 21 12:25:40 2010] [notice] Digest: done
[Thu Oct 21 12:25:40 2010] [notice] Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/1.0.0a DAV/2 PHP/5.3.3 configured -- resuming normal operations
[Thu Oct 21 12:42:31 2010] [error] [client 127.0.0.1] File does not exist: /opt/local/apache2/htdocs/favicon.ico
[Thu Oct 21 12:42:34 2010] [error] [client 127.0.0.1] File does not exist: /opt/local/apache2/htdocs/favicon.ico
[Thu Oct 21 14:03:38 2010] [notice] caught SIGTERM, shutting down
[Thu Oct 21 14:04:04 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Oct 21 14:04:05 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Oct 21 14:04:05 2010] [notice] Digest: done
[Thu Oct 21 14:04:05 2010] [notice] Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/1.0.0a DAV/2 PHP/5.3.3 configured -- resuming normal operations
dmontgomAuthor Commented:
I figured out the problem.  It is working but but my computers address is a funky ip address that I changed from 127.0.0.1.  I just need to get it back to 127.0.0.1
Mick BarryJava DeveloperCommented:
mac already comes with php, no need to install anything

http://helpdesk.objects.com.au/application-server/enable-php-on-mac-leopard
Adrian CantrillSolutions ArchitectCommented:
>I figured out the problem.  It is working but but my computers address is a funky ip address that I changed from 127.0.0.1.  I just need to get it back to 127.0.0.1

127.0.0.1 is the loopback address - your machine should ALWAYS be accessible on this one. That is if apache is bound to all IP addresses. if the 'weird' address you mention is your normal IP address then dont worry about it, just access the pages from this address.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mattibuttCommented:
Why don't you use xampp for mac if not than lamp or similar bundle which works out of box
dmontgomAuthor Commented:
sdsdf
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.