[MacPorts] howto/PHP modified

MacPorts noreply at macports.org
Sat Jan 3 21:55:39 PST 2015


Page "howto/PHP" was changed by magill at mac.com
Diff URL: <https://trac.macports.org/wiki/howto/PHP?action=diff&version=5>
Revision 5
Comment: updating
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/PHP
=========================================================================
--- howto/PHP (version: 4)
+++ howto/PHP (version: 5)
@@ -46,13 +46,37 @@
  [[howto/MAMP]] must be consulted next for modifications to the Apache Configuration file to enable PHP and MySQL.
 
 = Trouble shoot =
-If by some reason the server still doesn't interpret PHP files (your web client tries to download them) it means the PHP configurations, as described above, are not taking effect and in that case you should open the Apache httpd.conf file once again and search for the block
+If by some reason the server still doesn't interpret PHP files (i.e. your web client tries to download them) it means the PHP configurations, as described at [[howto/MAMP#job1]], are not taking effect.
+Typically,  the file ''"Include conf/extra/mod_php56.conf"'' is not being processed; the file is missing; or the contents incorrect. That file contains the two "AddType" lines below.
 
+==  Verify your config file again! ==
+Verify any changes you have made to the config file: /opt/local/apache2/conf/httpd.conf - The most common problem is that the files in the "extra" directory are not "readable"
+All files in that directory should be "-rw-r--r--"
+
+{{{
+$ /opt/local/apache2/bin/apachectl -t
+}}}
+This will return either "Syntax OK" or a specific line by line error listing.
+ The typical error message:  ''"Could not open configuration file /opt/local/apache2/conf/extra/httpd-mod_php56.conf: Permission denied"''
+After correcting any config errors and saving the updated config file, simply run:
+{{{
+$ sudo port unload apache2
+}}}
+
+to stop apache (even though it is not running) and then start it using
+
+{{{
+$ sudo port load apache2
+}}}
+
+to start it again.
+
+If the above fails to cause php files to be interpreted, you can edit the Apache httpd.conf file itself again and search for the block:
 {{{
 <IfModule mime_module>
 }}}
 
-And then add before the end
+And then add the following two lines before the end of that block.
 
 {{{
 AddType application/x-httpd-php .php
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/howto/PHP>
MacPorts <https://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'howto/PHP' page.
If it was not you, please report to .


More information about the macports-changes mailing list