Tuesday, March 23, 2021

Centos 7.9, You don't have permission to access /phpmyadmin/ on this server.

 


Edit file phpMyAdmin.conf

sudo vi /etc/httpd/conf.d/phpMyAdmin.conf

And replace the existing <Directory> ... </Directory> node with the following:

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       #Require ip 127.0.0.1
       #Require ip ::1
       Require all granted
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

Monday, March 22, 2021

PHP: mysqli_connect(): Headers and client library minor version mismatch

 


PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50550 Library:50631 in /var/www/html/web_app/test/browser/dbconn.php on line 31

After researching online, I came to know that I would need to remove the following version of MySQL driver php-mysql and install php-mysqlnd  I did the following and got the following results:

Removal Step :

[root@target1 phpMyAdmin]# yum remove php-mysql
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.4.16-48.el7 will be erased
--> Processing Dependency: php-mysqli >= 5.3.7 for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.4.15.10-4.el7 will be erased
--> Finished Dependency Resolution

Installation step:

[root@target1 phpMyAdmin]# yum install php-mysqlnd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: dl.fedoraproject.org
 * extras: mirror.es.its.nyu.edu
 * updates: mirror.ette.biz
Resolving Dependencies
--> Running transaction check
---> Package php-mysqlnd.x86_64 0:5.4.16-48.el7 will be installed
--> Finished Dependency Resolution