Hi,
I made a quick plugin for WHM and put it in:
/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi
Here is the content:
The plugin appears in the WHM and when I clicked on it I got the error access denied. So I went and created a simplecommerce.conf file and used appconfig to register it and it appears in the list of registered apps.
Here is the content of the .conf file:
Now when I click on the plugin i get the error:
Internal Server Error
500
No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi): subprocess exited with status 13 (EACCES)
I looked at the error log and it says:
Duplicate logaccess: at cpsrvd-ssl line 6398
main::body_internal_error(500, 'No response from subprocess (/usr/local/cpanel/whostmgr/docroot/...') called at cpsrvd-ssl line 6457
main::internal_error('No response from subprocess (/usr/local/cpanel/whostmgr/docroot/...') called at cpsrvd-ssl line 9477
main::handle_subprocess_failure(3, undef, 2, 'No response from subprocess (/usr/local/cpanel/whostmgr/docroot/...') called at cpsrvd-ssl line 7710
main::subprocess_handler('/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi', 'IO::Handle=GLOB(0xa1b4b74)', 'GLOB(0xa1b4b5c)', 0) called at cpsrvd-ssl line 7570
main::cgiHandler('docroot', '/usr/local/cpanel/whostmgr/docroot') called at cpsrvd-ssl line 6963
main::dodoc_whostmgrd() called at cpsrvd-ssl line 1824
main::dodoc('HASH(0x8698d04)') called at cpsrvd-ssl line 1355
main::handle_one_connection() called at cpsrvd-ssl line 996
Internal Server Error: "GET /cpsess5397775926/cgi/addon_sc.cgi HTTP/1.1" 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi): subprocess exited with status 13 (EACCES)
Any ideas what is causing this?
Any help is appreciated, thanks!
I made a quick plugin for WHM and put it in:
/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi
Here is the content:
Code:
#!/usr/local/bin/perl
#WHMADDON:simplecommerce:Simple Commerce Admin
use lib '/usr/local/cpanel' , '/usr/local/cpanel/whostmgr/docroot/cgi' ;
use strict ;
print "Content-Type: text/html\n\n" ;
my %ACL = %Whostmgr::ACLS::default ;
if ( 'root' eq $ENV{'REMOTE_USER'} )
{
$ACL{'all'} = 1 ;
}
if ( !$ACL{'all'} )
{
exit ;
}
else
{
print "<meta http-equiv=\"refresh\" content=\"0;url=$ENV{'cp_security_token'}/cgi/simplecommerce/index.php\"/>" ;
}
Here is the content of the .conf file:
Code:
name=simplecommerce
# This is the name that will be displayed for your application in WHM.
displayname=Simple Commerce Admin
# service that will serve this app
service=whostmgr
# Physical path: /usr/local/cpanel/3rdparty/Foo.php
# Literal URL path: $server:$port/$cpsession/3rdparty/Foo.php
url=/cgi/addon_sc.cgi
# Directory containing php.ini
# - must exist in /usr/local/cpanel/3rdparty/etc/
#phpHandler=Foo
# Features required
features=any
# This is a comma-separated list of ACLs. The logged-in user must have at least one of these ACLs in order to access your application at the URL(s) provided.
acls=all
# This is the filename of the icon that is used by the application (For example: myapp_icon.png).
icon=sc_icon.jpg
Internal Server Error
500
No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi): subprocess exited with status 13 (EACCES)
I looked at the error log and it says:
Duplicate logaccess: at cpsrvd-ssl line 6398
main::body_internal_error(500, 'No response from subprocess (/usr/local/cpanel/whostmgr/docroot/...') called at cpsrvd-ssl line 6457
main::internal_error('No response from subprocess (/usr/local/cpanel/whostmgr/docroot/...') called at cpsrvd-ssl line 9477
main::handle_subprocess_failure(3, undef, 2, 'No response from subprocess (/usr/local/cpanel/whostmgr/docroot/...') called at cpsrvd-ssl line 7710
main::subprocess_handler('/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi', 'IO::Handle=GLOB(0xa1b4b74)', 'GLOB(0xa1b4b5c)', 0) called at cpsrvd-ssl line 7570
main::cgiHandler('docroot', '/usr/local/cpanel/whostmgr/docroot') called at cpsrvd-ssl line 6963
main::dodoc_whostmgrd() called at cpsrvd-ssl line 1824
main::dodoc('HASH(0x8698d04)') called at cpsrvd-ssl line 1355
main::handle_one_connection() called at cpsrvd-ssl line 996
Internal Server Error: "GET /cpsess5397775926/cgi/addon_sc.cgi HTTP/1.1" 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_sc.cgi): subprocess exited with status 13 (EACCES)
Any ideas what is causing this?
Any help is appreciated, thanks!