Opened 11 years ago
Last modified 11 years ago
#41153 new defect
php55-apache2handler: PHP scripts not running in Apache2
Reported by: | p.perroud@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | php55-apache2handler |
Description
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...
Attachments (1)
Change History (9)
Changed 11 years ago by p.perroud@…
Attachment: | php55-apache2handler.txt added |
---|
comment:2 Changed 11 years ago by mf2k (Frank Schima)
Cc: | p.perroud@… removed |
---|---|
Keywords: | Apache2 PHP55 Mavericks removed |
Owner: | changed from macports-tickets@… to ryandesign@… |
In the future, please Cc the port maintainers (port info --maintainers php55-apache2handler
) but not yourself since the reporter is automatically Cc'ed.
comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Include conf/extras/mod_php55.conf in your httpd.conf.
comment:4 follow-up: 5 Changed 11 years ago 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?
comment:5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to 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.
comment:6 Changed 11 years ago by djlambert (Derek J. Lambert)
Maybe the portfile could be modified to also make mention of including mod_php55.conf?
comment:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Yes, it should do that. There are existing tickets about the messages the ports print after installation needing improvement.
comment:8 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | Building php55-apache2handler on Mavericks: PHP scripts not running in Apache2 → php55-apache2handler: PHP scripts not running in Apache2 |
---|
port installation log trace