window.OneSignalDeferred = window.OneSignalDeferred || []; OneSignalDeferred.push(function(OneSignal) { OneSignal.init({ appId: "e97841c1-e1ca-43c4-9a58-d25485f65cc9", }); }); How to fix: PHP installation appears to be missing the "MySQL Extension"

How to fix: PHP installation appears to be missing the "MySQL Extension"

 

How to fix: PHP installation appears to be missing the "MySQL Extension" 

 

How to fix: PHP installation appears to be missing the "MySQL Extension"
How to fix: PHP installation appears to be missing the "MySQL Extension" 

Did you update your PHP and get an odd error? Have no fear, for Josh is here. We'll teach you how to fix this annoying error and get your website up and running in no time.


In this blog you'll learn:

  • How to spot the "MySQL Extension" Error after updating your PHP
  • How to locate your .htaccess file
  • How to backup your .htaccess file
  • How to comment or delete what is causing the error
  • How to be super excited about fixing your site


How to spot the "MySQL Extension" Error after updating your PHP

Fix an issue when you changed your PHP version with MultiPHP Manager. In this example, I recently changed my PHP version to 7.3. It's exactly what my site needs, but I'm having a really interesting and strange issue on my site.

How to fix it. Today I will teach you. The first thing I want to show you how to do, is we've got our PHP info page that's already created. I can see that I'm on 7.3. That perfect.

The only bad part is when I actually go to my site, it's got an error here. It's got some content warnings and also says that my PHP installation is missing the MySQL extension. Today I'm going to show you how to resolve this issue really quickly. The first thing I want to do is go to my file manager for the document root for this site. I'm working on-muczalatv.com.

Since that's my primary domain, that's always going to be in the mypublic_html folder, so we'll jump here into file manager and I'm just going to scroll down to find that folder. Here it is. We'll double-click to get inside of it. 


How to locate your .htaccess file

The file I'm looking for today is my .htaccess file. This is a really important file to Apache, which is the webserver because it gives us a lot of different directives on what PHP version we should use, and a whole bunch of different rules and rewrites. Pretty much everything that the web server uses, so I want to go look inside this file to see if there's anything that I could make a change to. I'll right-click and I'll do view, just to get a look at it first.

Down here you will see, at the very bottom the new PHP handler that was put in by MultiPHP Manager. You can note it because it says, "Begin cPanelcPanel generated handler here do not edit". Right above it is actually my old PHP handler.

That was from the PHP selector, which is an older version of a program inside of cPanel that allows us to change or manipulate our PHP version. These two are actually conflicting, so what I need to do is go through and either remove or edit out the older one so that the new one can fully take effect. Now that I've got an idea of what I need to do, I'll you how to do it. I'll click the right X out of here to exit the view.


How to backup your .htaccess file

I'll want to take a full backup of this file before I make any changes. It's super important, so I can always roll back. Even though the site is broken, it'll be good to know where I start. I'm gonna do a copy, and then all I need to do is give it the full path to the file. I'll do .htaccess and I'll just do '.bak' for backup. Copy over that file. I've got that file right here so in case I need to roll back I've always got that option.

I'm going to go right-click and edit the initial .htaccess file. As we noted earlier, we've got our old handler here and our new handler all the way at the bottom. What I'm gonna do is essentially disable this add handler right here. I can do one of two things.


How to comment or delete what is causing the error

I can either completely remove this block of text right here, or I can comment it out. I'm a huge fan of non-destructive editing, and I like to use comments because it just makes it easier if I need to roll back. What I'm gonna do is go through and add a hashtag to each one of these lines. A little octothorp there. What it's gonna do is essentially render that null and void inside the .htaccess file, so it's not gonna be read by Apache.

How to be super excited about fixing your site

I'm essentially disabling that completely. Now that I know it's all commented out, and you can see the colors change from their normal black or purple to green, and I've got a hashtag in front of each one of these, I will save changes. I got my success bar down there at the bottom which tells me it's good. Let's head back to my site, and I'm gonna do a quick hard refresh. My site is back! I've officially fixed it. I'm really glad to show you this option because it is something that you may come across when switching from the older PHP selector to our newer MultiPHP Manager. I think the theMultiPHP Manager is a little easier. I'm really glad to show you this, and I hope

 

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.