[MacPorts] #41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -------------------------------------+---------------------------------- Reporter: p.perroud@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: Apache2 PHP55 Mavericks | Port: php55-apache2handler -------------------------------------+---------------------------------- php55-apache2handler was built successfully on Mavericks but Apache is reading .php files like plain text: PHP scripting is just ignored. It looks like Apache2 has no idea what a PHP script is about. The 'php5' module was activated, the DirectoryIndex in /opt/local/apache2/conf/httpd.conf was modified to take index.php first and Apache was restarted. But my index.php file that's only doing: {{{ <?php phpinfo(); ?> }}} is rendered as plain text in the web browser... I am attaching console log output... -- Ticket URL: <https://trac.macports.org/ticket/41153> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- Changes (by macsforever2000@…): * cc: p.perroud@… (removed) * keywords: Apache2 PHP55 Mavericks => * owner: macports-tickets@… => ryandesign@… Comment: In the future, please Cc the port maintainers ({{{port info --maintainers php55-apache2handler}}}) but not yourself since the reporter is automatically Cc'ed. -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- Comment (by ryandesign@…): Include conf/extras/mod_php55.conf in your httpd.conf. -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- Comment (by p.perroud@…): When the php5 module was installed from terminal it adds a LoadModule line in httpd.conf: {{{ LoadModule php5_module modules/mod_php55.so }}} What I've done so far to make it works is to add manually the module file types just below this line in httpd.conf - like this: {{{ LoadModule php5_module modules/mod_php55.so <IfModule mod_php5.c> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps </IfModule> }}} If would be nice if these file types were also added when the php5 module was actually installed... If doing this manually was really a requierement then we should to be told so in terminal by the time we are told the php5 module must be installed manually. Is there any reason these installation steps are not handled by macports at building time? -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:4 p.perroud@…]:
When the php5 module was installed from terminal it adds a LoadModule line in httpd.conf:
{{{ LoadModule php5_module modules/mod_php55.so }}}
Not automatically; you have to follow the instructions the php55-apache2handler port prints to run the appropriate `apxs` command.
What I've done so far to make it works is to add manually the module
file types just below this line in httpd.conf - like this:
{{{
LoadModule php5_module modules/mod_php55.so
<IfModule mod_php5.c>
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
</IfModule>
}}}
Including conf/extras/mod_php55.conf should add those `AddType` directives for you.
If would be nice if these file types were also added when the php5 module was actually installed...
If doing this manually was really a requierement then we should to be told so in terminal by the time we are told the php5 module must be installed manually.
Is there any reason these installation steps are not handled by macports at building time?
MacPorts ports do not modify your configuration files for you, but I should modify the port so it prints correct instructions to tell you what to do. -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- Comment (by dlambert@…): Maybe the portfile could be modified to also make mention of including mod_php55.conf? -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- Comment (by ryandesign@…): Yes, it should do that. There are existing tickets about the messages the ports print after installation needing improvement. -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#41153: php55-apache2handler: PHP scripts not running in Apache2 -----------------------------------+-------------------------- Reporter: p.perroud@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: php55-apache2handler | -----------------------------------+-------------------------- -- Ticket URL: <https://trac.macports.org/ticket/41153#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts