Skip to main content

Missing MySQL extension - MultiPHP

Comments

20 comments

  • marjwyatt
    I used EasyApache4 to add the mysqlnd php extension to php 7.2. I have enabled the MultiPHP Manager feature using EasyApache4. I've also added a handler for PHP 7.2 to the installation. I switched one account/cPanel to the PHP 7.2 handler. I have restarted Apache Services. When I review phpinfo, I can see that it is using PHP Version 7.2.10 but when I review phpMyAdmin for that cPanel, it is still using PHP version: 5.6.30. It appears that there is more to this than I'm able to find information about on the web at large. Can anyone here provide direction or instruction on how I can complete this mission?
    0
  • sparek-3
    What version of WordPress is the site using?
    0
  • cPanelLauren
    Hi @marjwyatt In addition to @sparek-3's question I'd like to know where in phpmyadmin you're seeing it's running php 5.6 as I can confirm that the phpinfo pages reflect php 7.2 and php 5.6 respectively (The links were removed but I am able to view the history) That being said I can see the mysqlnd extension enabled on both and there should be no conflict. This is also not related to the version of MySQL you have installed. Can you show me in phpmyadmin where it shows the incorrect php version? For example my phpadmin in the "Web Server" section says the following: 54593 Thanks!
    0
  • sparek-3
    @cPanelLauren did the version of PHP that cPanel (the backend cPanel... port 2083) change to 7.2 in the Edge builds? I can confirm that my cPanel, cPanel version 11.74.0.8, is still showing PHP 5.6.30. Now, I don't have a problem with that and I understand that the PHP version for the backend cPanel (port 2083) is completely different from the front facing PHP version (ports 80 and 443).
    0
  • cPanelLauren
    @cPanelLauren did the version of PHP that cPanel (the backend cPanel... port 2083) change to 7.2 in the Edge builds? I can confirm that my cPanel, cPanel version 11.74.0.8, is still showing PHP 5.6.30. Now, I don't have a problem with that and I understand that the PHP version for the backend cPanel (port 2083) is completely different from the front facing PHP version (ports 80 and 443).

    You know what! It sure did! Updating the internal PHP was a big part of v76. PHPMyAdmin is reflecting cPanel's internal PHP version, not your PHP version @marjwyatt From my v74 test server: 54601 This has no impact on your sites though, all cPanel services including PHPMyAdmin run off of cPanel's internal PHP version as eluded to by @sparek-3 Thanks!
    0
  • marjwyatt
    @sparek-3 The WordPress version on that installation is 4.9.7, although I'm not sure why that is important to know. I have that same version running locally on Xampp with PHP 7.2 (VC15). @cPanelLauren I've uploaded an image of the webserver via phpMyAdmin on the cPanel where I have enabled PHP 7.2. I've also uploaded a couple more images showing the MultiPHP settings. On the account cPanel screenshot, there appears to be another "clue" there related to inherit. Yet, when I review MultiPHP settings for that same account in WHM, I do not see that this domain is set to inherit. 54597 54605 54609
    0
  • sparek-3
    PHP cut out the mysql functions in PHP 7.0 (or PHP 7.1? one of those) and older scripts (maybe WordPress before 4.7?) still relied on those older mysql functions. That's why I asked. Maybe an old plugin? Or may just be unrelated completely. But that was the rabbit hole I was chasing.
    0
  • cPanelLauren
    The confusion here is, as I mentioned in my last post, within PHPMyAdmin you're seeing cPanel's internal PHP version. Secondly, none of those domains listed is set to inherit, default/system php is 5.6 per that screenshot if the domains were set to inherit they would not explicitly be assigned PHP 7.2. The information about inherit is there is to let you know what the system/default PHP version is and how it's set. Again, the two are unrelated. The system/default version of PHP, your site's PHP version and cPanel's Internal PHP version.
    0
  • marjwyatt
    PHP cut out the mysql functions in PHP 7.0 (or PHP 7.1? one of those) and older scripts (maybe WordPress before 4.7?) still relied on those older mysql functions. That's why I asked. Maybe an old plugin? Or may just be unrelated completely. But that was the rabbit hole I was chasing.

    This has become somewhat of a rabbit hole chase, I do admit. I intentionally chose to experiment on a WordPress installation that was "vanilla" in nature. This site is only one version behind the latest release and has very few plugins installed. It is using the default theme, too. The conflict between cPanel's interpretation of "inherited" versus what I'm seeing related to that domain/account in WHM seems to be the rabbit hole to chase. I know that I'm missing something important.
    0
  • cPanelLauren
    @marjwyatt I'm not sure I understand the confusion remaining about inherited php. As I stated before none of your domains is using inherited php and the information under "system PHP" has nothing to do with your php version or the php version being shown in PHPMyAdmin. In fact everything seems to be displaying normally at this point. Per the screenshot both those domains are running PHP 7.2 none of them are using the system default of php 5.6 nor are they inheriting their verision of PHP.
    0
  • marjwyatt
    The confusion here is, as I mentioned in my last post, within PHPMyAdmin you're seeing cPanel's internal PHP version. Secondly, none of those domains listed is set to inherit, default/system php is 5.6 per that screenshot if the domains were set to inherit they would not explicitly be assigned PHP 7.2. The information about inherit is there is to let you know what the system/default PHP version is and how it's set. Again, the two are unrelated. The system/default version of PHP, your site's PHP version and cPanel's Internal PHP version.

    Okay. I expected to see something akin to what I'm seeing on my local installation of Xampp running VC15. 54613 What do I need to do to see/verify that I am actually using PHP 7.2 on my VPS account where I have activated it?
    0
  • marjwyatt
    @marjwyatt I'm not sure I understand the confusion remaining about inherited php. As I stated before none of your domains is using inherited php and the information under "system PHP" has nothing to do with your php version or the php version being shown in PHPMyAdmin. In fact everything seems to be displaying normally at this point. Per the screenshot both those domains are running PHP 7.2 none of them are using the system default of php 5.6 nor are they inheriting their verision of PHP.

    I guess my "gut" is telling me that I need to see the database in a second instance of mySQL? I don't know how to frame the question. Locally, on Xampp, I can only run one version at a time because of the port. Do I need to create a MySQL instance on a second port on my VPS to run them side-by-side?
    0
  • cPanelLauren
    Okay. I expected to see something akin to what I'm seeing on my local installation of Xampp running VC15. 54613 What do I need to do to see/verify that I am actually using PHP 7.2 on my VPS account where I have activated it?

    The phpinfo page is what you'd use to be certain. As far as your installation of Xampp configuration differences there cause it to display differently. cPanel runs all cPanel related services including phpmyadmin over specific ports using its own internal PHP - it really has little to do with *your* php version.
    I guess my "gut" is telling me that I need to see the database in a second instance of mySQL? I don't know how to frame the question. Locally, on Xampp, I can only run one version at a time because of the port. Do I need to create a MySQL instance on a second port on my VPS to run them side-by-side?

    I'm not really understanding what you're trying to accomplish with this do you think it would be possible to clarify what you mean? Why do you feel like you need a second MySQL instance, or more so what will that prove in this instance? Thanks!
    0
  • sparek-3
    Maybe you've already done this, since the links were removed, I'm not able to see it. You are trying to access a WordPress script on [plain]example1.tld[/plain] correct? When you go to [plain]http://example1.tld[/plain] that's when you get the - Your PHP installation appears to be missing the MySQL extension which is required by WordPress - correct? Put a phpinfo in that account's public_html folder Save it as phpinfo.php Now go to [plain]http://example1.tld/phpinfo.php[/plain] What version is it showing? Do you see a section labeled mysqlnd? Do you see a section labeled mysqli?
    0
  • marjwyatt
    @cPanelLauren Well, I guess that on Xampp, the only way to run PHP 5.6 and PHP 7.2 side-by-side was to change MySQL ports for one installation. Maybe I need to unlearn what I learned from Xampp. What I'm trying to avoid is a wholesale update to PHP 7.2 when PHP 5.6 becomes obsolete at the end of this year. Are you trying to tell me that enabling PHP 7.2 distinctly on various accounts that it can access a database using another version of PHP? @sparek-3 [QUOTE]When you go to [plain]http://example1.tld[/plain] that's when you get the - Your PHP installation appears to be missing the MySQL extension which is required by WordPress - correct?
    No. I solved that problem this morning when I added mysqlnd to the configuration. [QUOTE]Put a phpinfo in that account's public_html folder
    I had already uploaded this file. Following are the answers to your questions. [QUOTE]What version is it showing?
    PHP Version 7.2.10 [QUOTE]Do you see a section labeled mysqlnd?
    Yes. Here's the screenshot. 54617 [QUOTE]Do you see a section labeled mysqli?
    Yes. Here's the screenshot. 54617 54621
    0
  • sparek-3
    OK, I must've overlooked where this was resolved. No, you don't need separate MySQL (or the more generic name, database services) for each version of PHP. Your database service is just a service. PHP interfaces with that service if you tell it to. It has to know what hostname/IP (which if it's running on the same server, you use localhost or 127.0.0.1) and a port (which defaults to port 3306). That's how the TCP stack works - unique IP address and port per service. Now if you don't have the correct extensions installed for each version of PHP, then PHP may not know how to interface with the database service.
    0
  • cPanelLauren
    The information provided by @sparek-3 is correct and with that knowledge I think it might be fair to say at this juncture the issue is resolved. @marjwyatt can you confirm that the initial issue is resolved? Thanks!
    0
  • marjwyatt
    @cPanelLauren - I had already done most of the things that @sparek-3 was recommending before he chimed in on this thread but I certainly do appreciate their interest in wanting to help. I mulled over my confusion after your last reply, @cPanelLauren, and finally figured out what you were trying to convey to me. I think that I encapsulated it in my comment above: [QUOTE]Well, I guess that on Xampp, the only way to run PHP 5.6 and PHP 7.2 side-by-side was to change MySQL ports for one installation. Maybe I need to unlearn what I learned from Xampp.
    This understanding was augmented by reviewing WordPress minimum requirements which listed at their site and noted that their MySQL version was the same as what I was seeing. PHP version 7.2 or greater. MySQL version 5.6 or greater OR MariaDB version 10.0 or greater. HTTPS support I have successfully activated PHP 7.2.10 at two WordPress sites, so far. One with and one without PHP-FPM. I have a question about that further down. I do have a couple more questions about configuring PHP on EasyApache4 if you will indulge me. I believed it would be prudent to include all PHP extensions that are activated for PHP 5.6. I hit a little speed bump. When I tried to activate php72-php, I got the following response which causes me to not proceed. [QUOTE] The following conflicts are installed on this machine. They will be removed as part of this package selection: php56-php The following requirements are not installed on this machine. They will be added as part of this package selection: php72-php
    I understand that this component (php DSO) is an older PHP handler that runs PHP as an Apache module. I suppose I shouldn't worry about it because I do have a WordPress site running without that but it sort of begs the question about what is the preferred PHP handler to implement? The other question is related to PHP-FPM. The MultiPHP Screen of WHM cautions against implementing it server wide for fear it will consume too much server memory. Is it true that, if I am not using PHP-FPM to activate PHP 7.2, that I have to encode the handler into the .htaccess file? I'm sorry to be such a burden in my questions to you, @cPanelLauren. As always, I appreciate your assistance and patience.
    0
  • cPanelLauren
    Hi @marjwyatt You are not a burden and we are always more than happy to help answer questions!
    I understand that this component (php DSO) is an older PHP handler that runs PHP as an Apache module. I suppose I shouldn't worry about it because I do have a WordPress site running without that but it sort of begs the question about what is the preferred PHP handler to implement?

    You can only have one php version running DSO so that would be why you had an issue when attempting to install it for another version of PHP. What the preferred handler depends on what you want. Most PHP handlers have a set of benefits/pitfalls. I will say that handlers do not apply to php-fpm and by default we roll out servers with CGI and mod_ruid2. You can read about the handlers here PHP Handlers - EasyApache 4 - cPanel Documentation which could be helpful.
    The other question is related to PHP-FPM. The MultiPHP Screen of WHM cautions against implementing it server wide for fear it will consume too much server memory.

    It can consume a large amount of memory I believe 16mb per VirtualHost that has it applied for startup but if you have enough memory you shouldn't really need to worry about this
    Is it true that, if I am not using PHP-FPM to activate PHP 7.2, that I have to encode the handler into the .htaccess file?

    The .htaccess includes the handler automatically in an AddHandler directive where did you hear this? Thanks!
    0
  • marjwyatt
    The .htaccess includes the handler automatically in an AddHandler directive where did you hear this?

    I didn't hear or read it anywhere. It was based on observation. The handler is added to the .htaccess files but it is remarked out by default. In the case of one account, I had to "unremark" it to make the site run PHP 7.2, or so it appeared. I admit that I'm doing a lot of fumbling here. Server administration is not a core skill of mine, although I'm getting better at it with the help of this forum. I'll read over the link you supplied. Thanks for your help on this issue.
    0

Please sign in to leave a comment.