API for database actions via PHP
We were previously using the XMLAPI to handle automated database provisioning through PHP code (creating databases, users, assigning permissions), but have been in a bind since the XMLAPI was deprecated.
I've spent quite a few hours trying to get LiveAPI to work without success, using the information here: Guide to the LiveAPI System - PHP Class - Developer Documentation - cPanel Documentation
Although I think I've followed all the steps correctly, I can't get past instantiating the CPANEL object, seemingly because it fails to find certain environmental variables that it's looking for.
I also tried using the WHM API (Use WHM API to Call cPanel API and UAPI - Developer Documentation - cPanel Documentation), but ran into authorization issues and eventually hosed my cpanel user.
I'm kind of at my wits' end. Can anyone suggest a good way to accomplish these tasks from PHP code or point me to a functional example of doing so?
Please sign in to leave a comment.
Comments
0 comments