[MacPorts] howto/PHP modified

MacPorts Wiki noreply at macports.org
Wed Apr 12 15:10:44 UTC 2023


Page "howto/PHP" was changed by cyberon-org
Diff URL: <https://trac.macports.org/wiki/howto/PHP?action=diff&version=29>
Revision 29
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/PHP
=========================================================================
--- howto/PHP (version: 28)
+++ howto/PHP (version: 29)
@@ -127,19 +127,7 @@
 
 = 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.
-
-Consult the documentation on your server at ''"/opt/local/www/phpmyadmin/doc/html/config.html"''
-
-NOTE: This option expects ''"/opt/local/www/phpmyadmin/doc/html"'' to be accessible under "<Document Root>." This can be accomplished by
-{{{
-$ cd <Document Root>
-$ ln -s /opt/local/www/phpmyadmin/doc/html/ phpmyadmin-doc
-}}}
-and then accessing ''http://<servername>/phpmyadmin-doc/''
-
-Finally, you need to set up the `phpMyAdmin` configuration to access MySQL.
+As the final step let's configure and test `phpMyAdmin`  to access MySQL.
 
 First create the config.inc.php file:
 {{{
@@ -147,7 +135,22 @@
 $ sudo cp config.sample.inc.php config.inc.php
 }}}
 
-This will create a file `config.inc.php` in the `phpMyAdmin` directory. \\
+Assuming that you have /Users/username/Sites as DocumentRoot for Apache, copy and paste `phpMyAdmin` in it :
+{{{
+$ sudo cp -R /opt/local/www/phpmyadmin/ /Users/username/Sites/phpmyadmin
+}}}
+
+In your browser open `localhost/phpmyadmin`, and you will see phpMyAdmin's inlog page. Try to login as root with the MySQL password for root.\\
+There is a fair chance you can't login and will see two pink colored squares with cryptic error codes in it. The reason for it is that mySQL uses strong encryption,\\
+that phpMyAdmin can't handle. So let's change the encryption for the user root in mySQL to a lower level:
+
+{{{
+$ mysql -u root -p
+mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'here your password for root';
+mysql> exit
+}}}
+
+ 
 Next, Edit that file, and locate the line:
 {{{
 $cfg['Servers'][$i]['auth_type']   = 'cookie';    // Authentication method (config, http or cookie based)? - default is Cookie.
@@ -169,6 +172,15 @@
 Details on "Using Authentication Modes" can be found at "''https://docs.phpmyadmin.net/en/latest/setup.html#using-authentication-modes''."
 
 To check your phpMyAdmin installation, point your browser to http://localhost/phpmyadmin and verify that phpMyAdmin loads and can access your database (by providing a username and password, depending on the authentication method you selected).
+
+Consult the documentation on your server at ''"/opt/local/www/phpmyadmin/doc/html/config.html"''
+
+NOTE: This option expects ''"/opt/local/www/phpmyadmin/doc/html"'' to be accessible under "<Document Root>." This can be accomplished by
+{{{
+$ cd <Document Root>
+$ ln -s /opt/local/www/phpmyadmin/doc/html/ phpmyadmin-doc
+}}}
+and then accessing ''http://<servername>/phpmyadmin-doc/''
 
 
 = Step 6: Install pmadb = #pmadb
-------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 macOS

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 admin at macports.org.


More information about the macports-changes mailing list