Jump to content

WHMCS Upgrade - New Fatal Error on Admin Login Page (WhmcsLoader)


Recommended Posts

I just upgraded my WHMCS from v7.3 to the latest version (8.0.13?). Plus I updated my hosting PHP version from 7.1 to 7.4. I upgraded via my CPanel, and Softalisoucs with the upgrade script, and then deleted the install folder after it looked like I was able to upgrade.  Everything looked fine, till I went to my admin area, where my admin login page is not working. On my admin login page I see this error:

Oops!
Something went wrong and we couldn't process your request.

Please go back to the previous page and try again.

For additional assistance, please reference the WHMCS TroubleShooting Guide »

So I enabled error reporting. Now I get this error:

Fatal error: Declaration of WHMCS\Language\Loader\WhmcsLoader::load($resource, $locale, $domain = ) must be compatible with Symfony\Component\Translation\Loader\LoaderInterface::load($resource, string $locale, string $domain = 'messages') in /ROOT/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Language/Loader/WhmcsLoader.php on line 0

and on the bottom of the Oops message this:

Whoops\Exception\ErrorException: Declaration of WHMCS\Language\Loader\WhmcsLoader::load($resource, $locale, $domain = ) must be compatible with Symfony\Component\Translation\Loader\LoaderInterface::load($resource, string $locale, string $domain = 'messages') in /ROOT/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Language/Loader/WhmcsLoader.php:0
Stack trace:
#0 /ROOT/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(64, 'Declaration of ...', '/home2/pard671/...', 0)
#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()
#2 {main}

Not sure what happened, but it had to do with the upgrade or maybe the ioncube loader the hosting company had to add to my account for my PHP v7.4.  Please advise where to check or what I can do to fix this.

Link to comment
Share on other sites

9 hours ago, leopard16 said:

Please advise where to check or what I can do to fix this.

Quote

Please switch to at least PHP 7.2 and then try again.

i'd suggest reducing the PHP version - its possible you're using a newer version of 7.4 that was released after WHMCS and may be incompatible..

Link to comment
Share on other sites

I had a similar problem. The cause was that the upgrade script of WHMCS did not remove some obsolete files. 

I suggest to download the WHMCS version which you upgraded to, remove the /vendor directory (it's in the root WHMCS directory) and reupload it from the downloaded archive.

Link to comment
Share on other sites

39 minutes ago, string said:

I had a similar problem. The cause was that the upgrade script of WHMCS did not remove some obsolete files. 

I suggest to download the WHMCS version which you upgraded to, remove the /vendor directory (it's in the root WHMCS directory) and reupload it from the downloaded archive.

I re-uploaded the WHMCS installation files (v8.1.3) minus the /vendor directory and overwrote the old files. Issue still persists.

Link to comment
Share on other sites

5 minutes ago, leopard16 said:

minus the /vendor directory

Did you remove the /vendor directory and then reupload it? Your message sounds like you reuploaded everything else, except the vendor directory.

Also note: You need to remove the directory first, to remove all old files, which are possibly in conflict with the new version.

Link to comment
Share on other sites

9 hours ago, string said:

Did you remove the /vendor directory and then reupload it? Your message sounds like you reuploaded everything else, except the vendor directory.

Also note: You need to remove the directory first, to remove all old files, which are possibly in conflict with the new version.

Ooops, my first message about the issue being fixed was wrong. I was looking at wrong website. Your assessment was correct, originally I did overwrite all files except /vendor folder. This time, I deleted vendor folder, then uploaded new vendor from WHMCS download installation. Issue still persists. 

Edited by leopard16
I was looking at wrong site.
Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hi @leopard16,

I have witnessed such an error before and it was caused by using an unsupported version of PHP in WHMCS 8.x (such as 7.1). 

WHMCS 8.x supports PHP 7.2, 7.3 and 7.4.

How are you confirming the PHP version being used? Under the “Utilities” menu admin side, you will find a PHP Info page, which you can view to confirm the PHP version being used. This page just uses the phpinfo() function to output such information. 

Link to comment
Share on other sites

10 hours ago, WHMCS Alex said:

Hi @leopard16,

I have witnessed such an error before and it was caused by using an unsupported version of PHP in WHMCS 8.x (such as 7.1). 

WHMCS 8.x supports PHP 7.2, 7.3 and 7.4.

How are you confirming the PHP version being used? Under the “Utilities” menu admin side, you will find a PHP Info page, which you can view to confirm the PHP version being used. This page just uses the phpinfo() function to output such information. 

The WHMCS folde has a PHP.info file that says 7.4.19 as well. See this link here: WHMCS folder PHP This is the only way I believe WHMCS is running PHP v74.

I was thinking along the PHP lines as well. Reason: My primary site and root public_html folder were running Wordpress PHP v7.2 in the past, this area was Wordpress.  The WHMCS installation was in a sub-folder on this site primary site. WHMCS was only running PHP v7.1 and would break when I tried to upgrade. Both primary folder and WHMCS folder always had different PHP versions in the past. Anytime I tried to update both PHPs on both sites to match, there were issues. One site would break then the other would work. This time when I upgraded I wanted this fixed. Both Wordpress and WHMCS running the same PHP versions. So I upgraded both to PHP v7.4. It took support 3 different sessions and .htaccess rules to fix to get both sties to run on PHP v7.4 (although WHMCS never properly upgraded).

I see no php.ini in root folder or public_html folder in either installation, not even the WHMCS folder either. There is a directive in both .htaccess files(for Wordpress and WHMCS folders)  listing the PHP version . As far as me knowing which PHP each installation is using, I see CPanel says the site is at v7.4 plus Wordpress installation under server settings says it says v7.4.19 - :  Wordpress installation> tools> site Health> server info> PHP version> 7.4.19 (Supports 64bit values). Not sure if this is taken from the .htaccess directive support added to Wordpress or not. Again, I don't see a php.ini file anywhere.

My subfolder of this installation that is running WHMCS has a PHP.info file that says 7.4.19 as well. See this link here: WHMCS folder PHP This is the only way I believe WHMCS is currently running PHP v7.4.

Still given that both installations I had were breaking each others site in the past becuase support back in the day added different PHP versions to each installation, and given that it took support 3 times to install the PHP and get ioncube loader installed this time, I am not sure they did this right. I don't see a php.ini file in any public_html folders.  I can help but think somehow they botched up my PHP version on my installation. Perhaps I need to reach out to support and seek more help.  They made me believe it was a WHMCS issue.

Link to comment
Share on other sites

Problem Solved! My hosting provider fixed the issue, it did have something to do with PHP.  I believe there was an older version of PHP further up my root folder that was likely the issue.  I think my previous WHMCS cron job was attached to that older PHP.  Thank you all for your assistance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated