[MacPorts] #39260: Enabling PHP5 on Apache

MacPorts noreply at macports.org
Tue May 28 03:51:56 PDT 2013


#39260: Enabling PHP5 on Apache
-------------------------+--------------------------------
 Reporter:  zerowired@…  |      Owner:  macports-tickets@…
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.1.3
 Keywords:  apache php   |       Port:  php5
-------------------------+--------------------------------
 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/39260>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list