[MacPorts] #39260: Enabling PHP5 on Apache
MacPorts
noreply at macports.org
Tue May 28 04:52:46 PDT 2013
#39260: Enabling PHP5 on Apache
--------------------------+--------------------------------
Reporter: zerowired@… | Owner: macports-tickets@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Resolution: duplicate | Keywords:
Port: php5 |
--------------------------+--------------------------------
Changes (by ryandesign@…):
* keywords: apache php =>
* status: new => closed
* resolution: => duplicate
Old 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.
New 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.
--
Comment:
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.
--
Ticket URL: <https://trac.macports.org/ticket/39260#comment:1>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list