Opened 11 years ago
Closed 11 years ago
#39260 closed defect (duplicate)
Enabling PHP5 on Apache
Reported by: | zerowired@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | ||
Port: | php5 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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 (1)
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | apache php removed |
Resolution: | → duplicate |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The intention is that you will include extra/mod_php.conf in your httpd.conf. So I think your only complaint is that the port doesn't tell you to do this, which is covered by #12108.