I am currently trying to add an application to cPanel. Because I want the application to be authenticated if cPanel is and the application creates and accesses a MySQL database, I am looking at how phpMyAdmin works (because the flow is similar to what I want). I found the following code in a Template Toolkit file:
As best I can tell, the Template Toolkit file transitions between the main cPanel page and phpMyAdmin, which runs as a third party application.
I think that this code is obsolete and should be replaced with something else. The problem is that I'm having trouble understanding what Api1, Cgi, and phpmyadminlink combine to do. So how do I find out what it does, what UAPI code replaces it, and therefore what I actually want to do?
Alternately, perhaps this is an XY problem. Perhaps this entire way of linking to a third party application is obsolete and phpMyAdmin just hasn't caught up yet. How can I link to a third party application that works like phpMyAdmin in that
1. It requires a cPanel authentication.
2. It links from the main cPanel page.
3. The application itself doesn't have to change much. In particular, the files do not need to be renamed from .php to .live.php or .livephp. I realize that some functionality may change or need to be removed as inconsistent (e.g. phpMyAdmin loses the ability to create databases or edit privileges).
I've seen documentation like Add Plugins to the Jupiter theme but that doesn't really cover what I need. While I may have to add a LivePHP plugin to handle creating the initial database, domain, etc., the main thing that I need is the ability to add a third party application. The LivePHP would just be to help cover the holes where the application needs more integration. But I have an existing application. I don't want to rewrite the whole thing. I just want to tweak it into working.
Note: I've added OS and cPanel versions of my test platform to the post, but I'm not looking for version specific responses. Presumably any solution would be used on multiple versions.
Code:
[% SET CPANEL.CPVAR.dprefix = "../";
Api1.pre_exec("Cgi", "phpmyadminlink");
SET phpMyadmin_url = Api1.exec("Cgi", "phpmyadminlink", [undef]);
Api1.post_exec("Cgi", "phpmyadminlink");
-%]
I think that this code is obsolete and should be replaced with something else. The problem is that I'm having trouble understanding what Api1, Cgi, and phpmyadminlink combine to do. So how do I find out what it does, what UAPI code replaces it, and therefore what I actually want to do?
Alternately, perhaps this is an XY problem. Perhaps this entire way of linking to a third party application is obsolete and phpMyAdmin just hasn't caught up yet. How can I link to a third party application that works like phpMyAdmin in that
1. It requires a cPanel authentication.
2. It links from the main cPanel page.
3. The application itself doesn't have to change much. In particular, the files do not need to be renamed from .php to .live.php or .livephp. I realize that some functionality may change or need to be removed as inconsistent (e.g. phpMyAdmin loses the ability to create databases or edit privileges).
I've seen documentation like Add Plugins to the Jupiter theme but that doesn't really cover what I need. While I may have to add a LivePHP plugin to handle creating the initial database, domain, etc., the main thing that I need is the ability to add a third party application. The LivePHP would just be to help cover the holes where the application needs more integration. But I have an existing application. I don't want to rewrite the whole thing. I just want to tweak it into working.
Note: I've added OS and cPanel versions of my test platform to the post, but I'm not looking for version specific responses. Presumably any solution would be used on multiple versions.
Last edited by a moderator: