Fatal error: Uncaught Error: Class 'Phar' not found in

th3_gh0st

Registered
Aug 27, 2020
2
0
1
Sweden
cPanel Access Level
DataCenter Provider
So, trying to figure out what's causing this error because Phar is installed and active. But have now tried with PHP56, PHP73 and PHP74 and I get same results on version 90.0.5.

Code:
Fatal error: Uncaught Error: Class 'Phar' not found in /usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar:3
Stack trace:
#0 {main}
  thrown in /usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar on line 3
And first 5 lines of the wp-cli.phar is:

Code:
#!/usr/bin/env php
<?php
Phar::mapPhar();
include 'phar://wp-cli.phar/php/boot-phar.php';
__HALT_COMPILER(); ?>
Any help to solve this would be really nice! :)
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
I've not seen this issue before, can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
583
54
103
Houston, TX
cPanel Access Level
Root Administrator
@luisfalcon Hello! It looks like the previous user never responded with a ticket ID. Since you're experiencing this same issue, would you be able to open a support ticket using the link in my signature? Once done, let me know the incident ID so I can keep track of the progress and update this thread as necessary.

Thanks!
 

luisfalcon

Member
Feb 25, 2003
8
0
151
Sorry, found a way to fix it, this customer has cloudlinux installed and for some reason the alt family of php is not loading Phar, I changed the site to the ea family and it worked fine.
I would insist on fixing the alt family if we were not moving servers very soon and the new server wont have cloudlinux.