Opened 11 years ago

Last modified 11 years ago

#39260 closed defect

Enabling PHP5 on Apache — at Initial Version

Reported by: zerowired@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: php5

Description

OS X Server 10.6.8

Loaded apache2 and php5 - smooth no problems.

Last PHP instructions to assist in enabling PHP on Apache were these:

To enable PHP in Apache, run

cd /opt/local/apache2/modules /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so

That worked correctly - and added the 'LoadModule' in the httpd.conf file.

Tested PHP on a browser - it did not work.

Apache documentation said FIlesMatch needed to be added to the httpd.conf file for PHP to work:

# Then, configure the handler for all files that end with .php

# A regexp such as \.(php|php4|php5)$ can also be used to support more extensions

<FilesMatch \.php$>

SetHandler application/x-httpd-php

</FilesMatch>

That fixed the problem.

Thank you for your excellent work - I tried a raw build (outside of MacPorts) of PHP and it failed with symbol problems.

Change History (0)

Note: See TracTickets for help on using tickets.