Changes between Version 99 and Version 100 of howto/MAMP
- Timestamp:
- Apr 12, 2023, 12:54:06 PM (18 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/MAMP
v99 v100 33 33 $ # or, if you're using php7... 34 34 $ 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 35 37 }}} 36 This should return the message:38 This should return a message like: 37 39 ''[activating module `php5' in /opt/local/etc/apache2/httpd.conf]'' 38 40 … … 57 59 # Or... 58 60 Include etc/apache2/extra/mod_php74.conf 61 # Or... 62 Include etc/apache2/extra/mod_php82.conf 59 63 }}} 60 64 … … 65 69 # Or... 66 70 LoadModule php7_module modules/mod_php74.so 71 # 72 # And again notice the difference for php82: 73 LoadModule php_module lib/apache2/modules/mod_php82.so 67 74 }}} 68 75 … … 85 92 # exit # OR rm php.ini.bak && exit 86 93 }}} 94 95 If 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.\\ 96 To 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 87 98 The "`grep`" check should return: 88 99 {{{ … … 91 102 mysqli.default_socket=/opt/local/var/run/mysql8/mysqld.sock 92 103 }}} 104 105 For 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, \\ 106 Open 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. 93 108 94 109 Restart Apache so that your changes take effect … … 102 117 This is used to test the configuration after you have integrated it with Apache and MySQL. 103 118 104 Create a file named `phpinfo.php` that contains the following line119 Create in Apache's DocumentRoot a file named `phpinfo.php` that contains the following line 105 120 106 121 {{{ 107 122 <?php phpinfo(); ?> 108 123 }}} 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.124 In 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. 110 125 Point 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`"). \\ 111 126 Note that this file needs to be readable and executable.