| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Dec 05, 2010
Posts: 2
![]() Mac Specs: Macbook 2.16GHz
|
Hi,
This might have been discussed before so if anyone knows of the relevant thread please redirect me. I've been trying to enable php on leopard but so far with limited success. At first I tried uncommenting the line: LoadModule php5_module libexec/apache2/libphp5.so in etc/apache2/httpd.conf but kept getting a 403 error. Then i tried the instructions on this page (which seems to have worked for some people): Getting Apache & PHP to work with Leopard (OS X 10.5) - John Ford But that didn't work either. After undoing that, I installed the latest php from entropy.ch and instead of getting the 403 error, i got the same code as i see in dreamweaver: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <? echo "Hello World!"; ?> </body> </html> Then I tried installing MAMP, which tells me I'm running PHP 5.2.13 and 5.3.2 and i can switch between the two. I get the same result in both. The thing that really confuses me is this; when i check in terminal which php i'm using (by inputting php -v), it tells me that i have php 5.2.12 This would indicate to me that apache recognises PHP but either can't work with it properly or doesn't know which one to use. Any ideas? This is driving me mad. Any help at all would be seriously appreciated. Otherwise i'll go back to using tiger. |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,295
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
First off, have you restarted Apache? If you make changes to the conf file, you need to restart Apache for the changes to take effect.
If so, you may need to add the following to your httpd.conf file: Code:
AddType application/x-httpd-php .php You might also be able to add the mime type to /private/etc/apache2/mime.types. Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Apache, php and mysql on leopard | skorpyo | Web Design and Hosting | 1 | 01-18-2008 03:38 AM |
| Getting PHP to work on Leopard | s.osullivan | OS X - Development and Darwin | 3 | 01-07-2008 01:11 PM |
| Leopard Problems on MacBook | Fabian | OS X - Operating System | 5 | 10-29-2007 05:02 PM |
| Enabling PHP | JGarcia | Web Design and Hosting | 3 | 03-05-2004 09:35 PM |
All times are GMT -4. The time now is 12:56 AM.
Powered by vBulletin