Good morning,
I'm building a cPanel plugin. On my /usr/local/cpanel/base/frontend/paper_lantern/myplugin/index.php, I've put following code:
Now I'm facing a strange problem. When clicking on my plugin's icon on cPanel, this code show following error:
Does I did something wrong?
Note that on my another plugin, the same code works without any problem.
I'm building a cPanel plugin. On my /usr/local/cpanel/base/frontend/paper_lantern/myplugin/index.php, I've put following code:
PHP:
<?php
ini_set('display_errors', 'on');
echo getenv('CPANEL_PHPCONNECT_SOCKET');
include("/usr/local/cpanel/php/cpanel.php");
$cpanel = new CPANEL();
print $cpanel->header("Mail Abuse");
?>
<?php
print $cpanel->footer();
$cpanel->end();
?>
Code:
Fatal error: Uncaught RuntimeException: There was a problem fetching the env variablecontaining the path to the socket in /usr/local/cpanel/php/cpanel.php:146 Stack trace: #0 /home/account/.cpanel/.cpanel_phpengine.1614268526.137078w9d0V_qrbz(8): CPANEL->__construct() #1 {main} thrown in /usr/local/cpanel/php/cpanel.php on line 146
Note that on my another plugin, the same code works without any problem.
Last edited by a moderator: