[MacPorts] howto/PHP modified

MacPorts noreply at macports.org
Fri Dec 18 02:55:55 PST 2015


Page "howto/PHP" was changed by ryandesign at macports.org
Diff URL: <https://trac.macports.org/wiki/howto/PHP?action=diff&version=17>
Revision 17
Comment: add more information about the different PHP SAPIs and modules
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/PHP
=========================================================================
--- howto/PHP (version: 16)
+++ howto/PHP (version: 17)
@@ -21,18 +21,35 @@
 
 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 =
+= Step 1: Install PHP SAPIs = #install
+
+PHP comes in several Server APIs (SAPIs). You can install any or all of these that you need:
+
+||=SAPI                    =||=Port                =||=Install command                         =||
+|| Command line             || php70                || `sudo port install php70`                ||
+|| Apache 2 module          || php70-apache2handler || `sudo port install php70-apache2handler` ||
+|| FastCGI                  || php70-cgi            || `sudo port install php70-cgi`            ||
+|| FastCGI Process Manager  || php70-fpm            || `sudo port install php70-fpm`            ||
+
+
+= Step 2: Install PHP Modules = #modules
+
+The SAPI ports contain 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.
+
+Installing a PHP module automatically makes it available to all PHP SAPIs of the same PHP version.
+
+For example, if you with to interact with a database server, here are some of the choices that exist:
+
+||=Database server         =||=Port                =||=Install command                         =||
+|| MSSQL                    || php70-mssql          || `sudo port install php70-mssql`          ||
+|| MySQL, MariaDB, Percona  || php70-mysql          || `sudo port install php70-mysql`          ||
+|| ODBC                     || php70-odbc           || `sudo port install php70-odbc`           ||
+|| Oracle                   || php70-oracle         || `sudo port install php70-oracle`         ||
+|| PostgreSQL               || php70-postgresql     || `sudo port install php70-postgresql`     ||
+|| SQLite                   || php70-sqlite         || `sudo port install php70-sqlite`         ||
+
+
+= Step 3: PHP Configuration file setup = #configuration
 
 Set up your PHP configuration files. For development purposes use:
 {{{
@@ -46,7 +63,7 @@
 }}}
 then make changes to that newly created php.ini file - ''/opt/local/etc/php70/php.ini''
 
-= Step 3: Install phpMyAdmin  = #phpmyadmin
+= Step 4: Install phpMyAdmin  = #phpmyadmin
 
 Use MacPorts to install the latest version of `phpMyAdmin`.
 
@@ -56,7 +73,7 @@
 
 '''phpMyAdmin''' must be configured before it can be used. We do this in Step 5 below.
 
-= Step 4: Visit [[howto/MAMP]] for integration information =
+= Step 5: Visit [[howto/MAMP]] for integration information =
  [[howto/MAMP]] must be consulted next for modifications to the Apache Configuration file to enable PHP and MySQL.
 
 = Trouble shoot =
@@ -101,7 +118,7 @@
 
 As a last check, reboot and verify that everything has autostarted and is running (i.e., repeat the above tests).
 
-= Step 5: Configure phpMyAdmin =
+= Step 6: Configure phpMyAdmin =
 
 Edit the phpMyAdmin configuration file at ''/opt/local/www/phpmyadmin/config.inc.php''. \\
 A sample configuration file is installed at /opt/local/www/phpmyadmin/config.sample.inc.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