[MacPorts] howto/PHP modified
MacPorts
noreply at macports.org
Fri Dec 18 02:36:01 PST 2015
Page "howto/PHP" was changed by ryandesign at macports.org
Diff URL: <https://trac.macports.org/wiki/howto/PHP?action=diff&version=16>
Revision 16
Comment: php70 is stable now
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/PHP
=========================================================================
--- howto/PHP (version: 15)
+++ howto/PHP (version: 16)
@@ -12,39 +12,39 @@
MacPorts includes several versions of PHP. You can install any or all of these versions simultaneously, though it is expected that you will only need to install one of them.
-* '''php70''': PHP v7.0.x. This is a development version.
-* '''php56''': PHP v5.6.x. This is the latest stable version.
+* '''php70''': PHP v7.0.x. This is the latest stable version.
+* '''php56''': PHP v5.6.x. This is an older stable version.
* '''php55''': PHP v5.5.x. This is an older stable version.
* '''php54''': PHP v5.4.x. This version reached [http://php.net/eol.php end of life] in 2015 and is therefore not recommended.
* '''php53''': PHP v5.3.x. This version reached [http://php.net/eol.php end of life] in 2014 and is therefore not recommended.
* '''php52''': PHP v5.2.x. This version reached [http://php.net/eol.php end of life] in 2011 and is therefore not recommended.
-This page shows how to install and use the php56 family of ports, but you can use another version if you prefer; all of these ports use a similar directory layout.
-
-= Step 1: Install PHP 56 = #install
-
-{{{
-$ sudo port install php56-apache2handler
-$ sudo port install php56-mysql
-}}}
-
-
- '''''Note:''''' the php56 port contains the core PHP features, but there are many optional features available in separate ports, some of which you may want to install as well . Use `port search php56` to see all the ports that are available.
+This page shows how to install and use the php70 family of ports, but you can use another version if you prefer; all of these ports use a similar directory layout.
+
+= Step 1: Install PHP = #install
+
+{{{
+$ sudo port install php70-apache2handler
+$ sudo port install php70-mysql
+}}}
+
+
+ '''''Note:''''' the php70 port contains the core PHP features, but there are many optional features available in separate ports, some of which you may want to install as well . Use `port search php70` to see all the ports that are available.
= Step 2: PHP Configuration file setup =
Set up your PHP configuration files. For development purposes use:
{{{
-$ cd /opt/local/etc/php56
+$ cd /opt/local/etc/php70
$ sudo cp php.ini-development php.ini
}}}
or for a production server:
{{{
-$ cd /opt/local/etc/php56
+$ cd /opt/local/etc/php70
$ sudo cp php.ini-production php.ini
}}}
-then make changes to that newly created php.ini file - ''/opt/local/etc/php56/php.ini''
+then make changes to that newly created php.ini file - ''/opt/local/etc/php70/php.ini''
= Step 3: Install phpMyAdmin = #phpmyadmin
@@ -61,7 +61,7 @@
= Trouble shoot =
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.
+Typically, the file ''"Include conf/extra/mod_php70.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"
@@ -71,7 +71,7 @@
$ /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"''
+ The typical error message: ''"Could not open configuration file /opt/local/apache2/conf/extra/httpd-mod_php70.conf: Permission denied"''
After correcting any config errors and saving the updated config file, simply run:
{{{
$ sudo port unload apache2
-------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