Anyone got PHP to work yet?

RSanford is absolutely correct and Casey and Spencer are on to something regarding the PHP package they speak of.

The version of Apache that shipped with PB is a DSO build.

The modules are located in:

/System/Library/Apache/Modules

and apache -l does confirm this.

If you compile the PHP module it should be a drop in, configure and run issue.

Hmmm maybe if that mysterious php4.pkg (Even it it doesn't appear to work to some) had the following done to the apache.conf file:

1. Shut down Apache

2. Add the following AFTER the existing rewrite_module:

LoadModule rewrite_module /System/Library/Apache/Modules/mod_rewrite.so
LoadModule php4_module /System/Library/Apache/Modules/libphp4.so

3. AddAFTER the existing mod_rewrite.c

AddModule mod_rewrite.c
AddModule mod_php4.c

The load order is important!

4. Configure the AddType as required (You may only have to uncomment the above line):

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


5. Add the "test.php" file to your DocumentRoot and restart Apache. Hit the page and if it loads it works. Whatever you do, remove this file once you confirm PHP4 is loaded.

Use vi or BBEDit (if you have it ensure you save it with unix linefeeds).

Then try a <?php echo "Hello World!\n"" ?> on a .php page.

Bear
 
Back
Top