Changes between Version 99 and Version 100 of howto/MAMP


Ignore:
Timestamp:
Apr 12, 2023, 12:54:06 PM (13 months ago)
Author:
cyberon-org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • howto/MAMP

    v99 v100  
    3333$ # or, if you're using php7...
    3434$ sudo /opt/local/bin/apxs -a -e -n php7 mod_php74.so
     35$ #  and for php8... it's slightly different:
     36$ sudo /opt/local/bin/apxs -a -e -n php mod_php82.so
    3537}}}
    36 This should return the message:
     38This should return a message like:
    3739 ''[activating module `php5' in /opt/local/etc/apache2/httpd.conf]''
    3840
     
    5759# Or...
    5860Include etc/apache2/extra/mod_php74.conf
     61# Or...
     62Include etc/apache2/extra/mod_php82.conf
    5963}}}
    6064
     
    6569# Or...
    6670LoadModule php7_module modules/mod_php74.so
     71#
     72# And again notice the difference for php82:
     73LoadModule php_module  lib/apache2/modules/mod_php82.so
    6774}}}
    6875
     
    8592# exit # OR rm php.ini.bak && exit
    8693}}}
     94
     95If you are unfamiliar with multiline Terminal commands like the cat command above: Each line ends with a backslash. Give Enter after the backslash and you will enter the next line.\\
     96To make things easy: Copy the first line `cat php.ini | sed \` with Command V and past it in the Terminal with Command C. Hit Enter and copy and paste the next line, etc... \\
     97
    8798The "`grep`" check should return:
    8899{{{
     
    91102mysqli.default_socket=/opt/local/var/run/mysql8/mysqld.sock
    92103}}}
     104
     105For proper setup of MySQL for PHP **all three lines** must be present. If there is one missing, for example mysql.default_socket=/opt/local/var/run/mysql8/mysqld.sock, \\
     106Open the php.ini file in your editor and add somewhere the line 'mysql.default_socket='.  Next repeat the cat command above but only for the missing part.\\
     107'Grep' should show now the three requires lines.
    93108
    94109Restart Apache so that your changes take effect
     
    102117This is used to test the configuration after you have integrated it with Apache and MySQL.
    103118
    104 Create a file named `phpinfo.php` that contains the following line
     119Create in Apache's DocumentRoot a file named `phpinfo.php` that contains the following line
    105120
    106121{{{
    107122<?php phpinfo(); ?>
    108123}}}
    109 and place it in your Apache "`DocumentRoot`" directory (nominally: "`/opt/local/www/apache2/html`") or your own user "`Sites`" directory if you activated user directories as specified above.
     124In case you don't remember,  your Apache "`DocumentRoot`" is either the default directory  "`/opt/local/www/apache2/html`" or your own user "`Sites`" directory if you activated user directories as specified above.
    110125Point your browser to `http://localhost/phpinfo.php` (or `http://localhost/~username/phpinfo.php` as applicable) and verify that the correct version of PHP is active and that MySQL support is active (you may want to search the page for "`mysql`"). \\
    111126Note that this file needs to be readable and executable.