Custom WHM plugin - 404 page not found
Hi,
I'm writing a new WHM plugin. The plugin gets registered properly using AppConfig and it appears in the 'plugins' section of WHM, but when I click on it, I get a 404 error.
The plugin navigates here:
.../cpsessxxxxxxxxxx/cgi/altas.php
The interface file is here:
/usr/local/cpanel/whostmgr/docroot/cgi/altas.php
The interface code:
[CODE=php]
The config file:
Here's what I tried: - changing the permissions on the file; - using atlas.cgi written in perl instead of atlas.php - placing atlas.php and atlas.cgi in different locations ...always the same result: 404. What am I missing?
The config file:
name=atlas
displayname=Atlas
icon=atlas.png
service=whostmgr
acls=any
target=_self
url=/cgi/altas.php
entryurl=altas.phpHere's what I tried: - changing the permissions on the file; - using atlas.cgi written in perl instead of atlas.php - placing atlas.php and atlas.cgi in different locations ...always the same result: 404. What am I missing?
-
Hi @chris445 , Sorry for the delay. I hope to have time to take a look at this issue today. 0 -
@chris445 You'll first want to clean up your php to make sure it fits within the requirements of the language and within the here. At this point, the plugin should appear in the left navigation menu in WHM and the php page should load. 0 -
Thanks for the help, @cPanelTJ, but we're still having the same problem. 1. The content of atlas.php is copied from your post and located in /usr/local/cpanel/whostmgr/docroot/cgi/altas.php, the permissions are 0755 like all the other files. 2. atlas.conf is in /var/cpanel/apps/atlas.conf 3. register_appconfig is successful: the atlas link appears in WHM under plugins 4. When I click on it, I still get cPanel's 404 error. We're stuck in our development efforts until we figure this out. There must be something else we're missing, something that's not in the documentation, because we followed the documentation to the letter. Everything works until the point when we're trying to run the plugin. Please see the screenshots. Any ideas would be appreciated. Thanks! 0 -
@chris445 I was able to create the files, register the app, and view the page by using the following atlas.conf file: service=whostmgr url=/cgi/atlas.php acls=all entryurl=atlas.php displayname=Atlas target=_self name=atlas user=$authuser
You may be missing theuser=$authuser
item.0
Please sign in to leave a comment.
Comments
4 comments