Changes between Version 30 and Version 31 of howto/PHP


Ignore:
Timestamp:
Apr 13, 2023, 2:29:48 PM (13 months ago)
Author:
cyberon-org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • howto/PHP

    v30 v31  
    128128= Step 6: Configure phpMyAdmin =
    129129
    130 As the final step let's configure and test `phpMyAdmin`  to access MySQL.
     130Step 4 was the installation of phpMyAdmin. Next let's  configure and test if `phpMyAdmin`  can access MySQL.
    131131
    132132First create the config.inc.php file:
     
    142142
    143143
    144 To check your phpMyAdmin installation, point your browser to http://localhost/phpmyadmin and verify that phpMyAdmin loads and you see it's login page.
     144To check your phpMyAdmin installation, point your browser to `http://localhost/phpmyadmin` and verify that phpMyAdmin loads and you get it's login page.
    145145Try to login as root with the MySQL password for root.\\
    146 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,\\
    147 that phpMyAdmin can't handle. So let's change the encryption for the user root in mySQL to a lower level:
     146There is a fair chance you can't login and will see two pink colored boxes with cryptic error codes in it. The reason for it is, that mySQL uses strong encryption,\\
     147that phpMyAdmin can't handle. So let's change the encryption for the user root in mySQL to a weaker level:
    148148
    149149{{{
     
    153153}}}
    154154
    155 Now accessing databases in MySQL with phpMyAdmin should work. So installing a CMS like Drupal or WordPress should be a piece of cake.
    156 First step is to create a new user in mysql and his database. Download for example WordPress and copy it's files in your DocumentRoot.
    157 When installing it, you will see that macOS prevents WordPress from creating a config file in the DocumentRoot. Create that file manually and copy the contents provided by WordPress in it.
    158 Within a minute your Wordpress website is up and running. **Excellent job done !! ** \\
    159 
    160  
    161 If you want to consult the phpMyAdmin manual, we should copy it into your DocumenRoot :
     155Now accessing databases in MySQL with phpMyAdmin should work. Installing a CMS like Drupal, Joomla or WordPress should be a piece of cake.
     156First step is to create in mysql a new user and the new user's database. Next download for example WordPress and copy it's files into your DocumentRoot.
     157When installing WP, you will see that macOS prevents WP from creating the file wp-config.php in your DocumentRoot. Create that file manually and copy in it the contents provided by WP.
     158Continue the installation, and in less than a minute your Wordpress website is up and running. **Excellent job done !! ** \\
     159 \\
     160
     161There is no need to edit the config.inc.php file, so feel free to skip the following lines and goto Step 7:\\
     162However if you are a curious person, check the following: locate in this config file the line:
     163{{{
     164$cfg['Servers'][$i]['auth_type']   = 'cookie';    // Authentication method (config, http or cookie based)? - default is Cookie.
     165}}}
     166It will be right at the beginning in the section labeled: "/* Authentication type */"
     167
     168Instead of the default value 'cookie', you might consider changing it to 'config' or 'http'.
     169Details on the three different options can be found in the chapter 'using-authentication-modes' in the phpmyadmin manual.  \\
     170
     171If you want to consult the phpMyAdmin manual, copy it into your DocumenRoot :
    162172{{{
    163173$ cp -R /opt/local/www/phpmyadmin/doc/html /Users/username/Sites/phpmyadmin-doc
    164174}}}
    165 
    166 Just open localhost/phpmyadmin-doc in your browser et voilà! There it is.
    167 
    168 There is no need to edit the config.inc.php file, so feel free to skip the following:\\
    169 
    170 However if you are curious, check the following: locate the line:
    171 {{{
    172 $cfg['Servers'][$i]['auth_type']   = 'cookie';    // Authentication method (config, http or cookie based)? - default is Cookie.
    173 }}}
    174 It will be right at the beginning in the section labeled: "/* Authentication type */"
    175 
    176 Change the value from 'cookie' to 'config'.
    177 
    178 You will need to add the following two lines immediately after it.
    179 {{{
    180 $cfg['Servers'][$i]['user']        = 'root';      // MySQL user
    181 $cfg['Servers'][$i]['password']    = '';          // MySQL password (only needed with auth_type = 'config')
    182 }}}
    183 
    184 Where ' ' is an empty password; fill it with your MySQL root password. \\
    185 '''NOTE:''' You should change the 'auth_type' from 'config' to 'cookie' or 'httpd' so that you do not need to  provide the password you selected for the MySQL root user in the 'password' option.
    186 (I.e. leaving it in plain text in this config file.) \\
    187 However, as this is to simply get you "up-and-running," details for configuring those two authorization options are not given here.
    188 Details on "Using Authentication Modes" can be found at "''https://docs.phpmyadmin.net/en/latest/setup.html#using-authentication-modes''."
    189 
    190 = Step 6: Install pmadb = #pmadb
     175Open localhost/phpmyadmin-doc in your browser et voilà! There it is.
     176
     177= Step 7: Install pmadb = #pmadb
    191178Some consider the installation of pmadb "optional." \\
    192179However, phpMyAdmin will flag the fact that it is missing and therefore certain features are not functional, with the message: