| Web Design and Hosting Creating sites, scripting, and hosting discussions. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Dec 15, 2008
Posts: 3
![]() |
I am working on getting a client version of Apache and PHP working on my MacBook Pro. I installed Leopard on it sometime ago (10.5.5 as of today).
I am trying to set up Apache and php. So far I have the Apache server working fine for the system directory and my Sites directory. I downloaded php from Marc Liyanage - Software - Mac OS X Packages - PHP as it seemed like Adobe wanted me to (I will be using Dreamweaver CS4 for development). The install of the download seemed to work fine....but... ..when I run the file called timetest.php (that has the following php code): <p>This page was created at <b><?php echo date("h:i:s a", time()); ?></b> on the computer running PHP.</p> I get the following output in Firefox..(when it is supposed to print out the current time and date) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <p>This page was created at<br /> <b><?php echo date("h:i:s a", time()); ?></b> on the computer running PHP.</p> </body> </html> I am also aware that I can use the bundled version of php (if I did not hammer it with my download) by taking out the comment on the #LoadModule php5_module libexec/apache2/libphp5.so line of the hhtpd.conf file....but I tried that with no better result. Anybody run across this before? And I would like to solve this problem and don't want to consider MAMP at this time. |
| QUOTE Thanks | |
![]() Member Since: Dec 15, 2008
Posts: 3
![]() |
Yes. I have restarted web sharing. Interestingly, the downloaded version reacts differently than the embedded version. When I take the comment out of the httpd.conf file I get the following output ...which is simply the code being restated in a browser page...weird... <p>This page was created at <b><?php echo date("h:i:s a", time()); ?></b> on the computer running PHP.</p> It's like the code is being generated/read, but not executed. It generates a lot more code as per my original post with the downloaded php. But does not actually run it. As I said earlier, it runs any html correctly. |
||||
| QUOTE Thanks | |||||
![]() Member Since: Dec 02, 2008
Location: Sacramento
Posts: 145
![]() Mac Specs: MacBook Pro
|
Did you follow this procedure?
PHP: Installation on Mac OS X - Manual I run it just fine. You are right, the php is not running, as you are simply getting http returns when php should be interpreting it. |
| QUOTE Thanks | |
![]() Member Since: Dec 15, 2008
Posts: 3
![]() |
Enabling PHP in Mac OS X 10.5 I followed these instructions to the letter and now it works. Thanks for getting me down this path! These instructions are the best and most complete I have seen yet. This David Powers seems to have some interesting books listed on this site....as I will be using Dreamweaver CS4.... Thanks... |
| 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 |
| PHP and GD2 | falcontook | OS X - Development and Darwin | 0 | 09-09-2008 08:46 PM |
| Getting PHP to work on Leopard | s.osullivan | OS X - Development and Darwin | 3 | 01-07-2008 01:11 PM |
| MAMP: PHP can't catch HTTP variables | komo | Web Design and Hosting | 4 | 06-05-2006 10:39 AM |
| PHP 4.3.11 to PHP 5 | prplxd | OS X - Development and Darwin | 1 | 12-04-2005 10:57 AM |
| Apache + PHP + MySQL | Emrys | OS X - Development and Darwin | 2 | 11-14-2003 01:30 AM |
All times are GMT -4. The time now is 05:51 AM.
Powered by vBulletin