Changes between Version 33 and Version 34 of howto/PHP


Ignore:
Timestamp:
Aug 30, 2023, 12:24:03 PM (8 months ago)
Author:
vladimir-xaro (Vladimir Slavgorodskiy)
Comment:

change to latest packages and remove non-existent package php8*-mssql (latest version of php56-mssql)

Legend:

Unmodified
Added
Removed
Modified
  • howto/PHP

    v33 v34  
    2828
    2929
    30 This page shows how to install and use the php81 family of ports, but you can use another version if you prefer; all of these ports use a similar directory layout.
     30This page shows how to install and use the php82 family of ports, but you can use another version if you prefer; all of these ports use a similar directory layout.
    3131
    3232= Step 1: Install PHP SAPIs = #install
     
    3535
    3636||=SAPI                    =||=Port                =||=Install command                         =||
    37 || Command line             || php81                || `sudo port install php81`                ||
    38 || Apache 2 module          || php81-apache2handler || `sudo port install php81-apache2handler` ||
    39 || FastCGI                  || php81-cgi            || `sudo port install php81-cgi`            ||
    40 || FastCGI Process Manager  || php81-fpm            || `sudo port install php81-fpm`            ||
     37|| Command line             || php82                || `sudo port install php82`                ||
     38|| Apache 2 module          || php82-apache2handler || `sudo port install php82-apache2handler` ||
     39|| FastCGI                  || php82-cgi            || `sudo port install php82-cgi`            ||
     40|| FastCGI Process Manager  || php82-fpm            || `sudo port install php82-fpm`            ||
    4141
    4242
    4343= Step 2: Install PHP Modules = #modules
    4444
    45 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 php81` to see all the ports that are available.
     45The 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 php82` to see all the ports that are available.
    4646
    4747Installing a PHP module automatically makes it available to all PHP SAPIs of the same PHP version.
     
    5050
    5151||=Database server         =||=Port                =||=Install command                         =||
    52 || MSSQL                    || php81-mssql          || `sudo port install php81-mssql`          ||
    53 || MySQL, MariaDB, Percona  || php81-mysql          || `sudo port install php81-mysql`          ||
    54 || ODBC                     || php81-odbc           || `sudo port install php81-odbc`           ||
    55 || Oracle                   || php81-oracle         || `sudo port install php81-oracle`         ||
    56 || PostgreSQL               || php81-postgresql     || `sudo port install php81-postgresql`     ||
    57 || SQLite                   || php81-sqlite         || `sudo port install php81-sqlite`         ||
     52|| MySQL, MariaDB, Percona  || php82-mysql          || `sudo port install php82-mysql`          ||
     53|| ODBC                     || php82-odbc           || `sudo port install php82-odbc`           ||
     54|| Oracle                   || php82-oracle         || `sudo port install php82-oracle`         ||
     55|| PostgreSQL               || php82-postgresql     || `sudo port install php82-postgresql`     ||
     56|| SQLite                   || php82-sqlite         || `sudo port install php82-sqlite`         ||
    5857
    5958
     
    6261Set up your PHP configuration files. For development purposes use:
    6362{{{
    64 $ cd /opt/local/etc/php81
     63$ cd /opt/local/etc/php82
    6564$ sudo cp php.ini-development php.ini
    6665}}}
    6766or for a production server:
    6867{{{
    69 $ cd /opt/local/etc/php81
     68$ cd /opt/local/etc/php82
    7069$ sudo cp php.ini-production php.ini
    7170}}}
    72 then make changes to that newly created php.ini file - ''/opt/local/etc/php81/php.ini''
     71then make changes to that newly created php.ini file - ''/opt/local/etc/php82/php.ini''
    7372
    7473= Step 4: Install phpMyAdmin  = #phpmyadmin
     
    8786= Trouble shoot =
    8887If 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.
    89 Typically,  the file ''"Include etc/apache2/extra/mod_php81.conf"'' - is not being processed; the file is missing; or the contents incorrect. That file contains the two "AddType" lines below.
     88Typically,  the file ''"Include etc/apache2/extra/mod_php82.conf"'' - is not being processed; the file is missing; or the contents incorrect. That file contains the two "AddType" lines below.
    9089
    9190==  Verify your config file again! ==
     
    9796}}}
    9897This will return either "Syntax OK" or a specific line by line error listing.
    99  The typical error message:  ''"Could not open configuration file /opt/local/etc/apache2/extra/httpd-mod_php81.conf: Permission denied"''
     98 The typical error message:  ''"Could not open configuration file /opt/local/etc/apache2/extra/httpd-mod_php82.conf: Permission denied"''
    10099After correcting any config errors and saving the updated config file, simply run:
    101100{{{