UAPI Session
Does anyone here know what and where is $ENV{'REMOTE_DBOWNER'}?
I am trying to use php UAPI session the result status is true but data is false.
I am not sure what went wrong, i suspect something to do with $ENV{'REMOTE_DBOWNER'}.
{"data":{"created":0},"errors":null,"messages":null,"metadata":{},"status":1}
-
Hello @Sebastian Ng, Here's a quote from our UAPI Functions - Session::create_temp_user - Software Development Kit - cPanel Documentation Thank you. 0 -
"; //echo $query; $curl = curl_init(); // Create Curl Object curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,0); // Allow self-signed certs curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0); // Allow certs that do not match the hostname curl_setopt($curl, CURLOPT_HEADER,0); // Do not include header in output curl_setopt($curl, CURLOPT_RETURNTRANSFER,1); // Return contents of transfer on curl_exec $header[0] = "Authorization: Basic " . base64_encode($user.":".$password) . "\n\r"; curl_setopt($curl, CURLOPT_HTTPHEADER, $header); // set the username and password curl_setopt($curl, CURLOPT_URL, $query); // execute the query $result = curl_exec($curl); $resultjson = json_decode( $result ); echo $resultjson->data->session_temp_user; echo $resultjson->data->created; echo $result; if ($result == false) { error_log("curl_exec threw error \"" . curl_error($curl) . "\" for $query"); // log error if curl exec fails } curl_close($curl); ?> result {"data":{"created":0},"errors":null,"messages":null,"metadata":{},"status":1} 0 -
Hello, Could you provide more details about what you are attempting to do with the custom script? For instance, are you developing a cPanel plugin that requires access to phpMyAdmin? Or, are you attempting to simply generate a cPanel login session? If it's simply to generate the cPanel login session, you can follow the guide at: Guide to API Authentication - Single Sign On - Software Development Kit - cPanel Documentation Thank you. 0 -
Dear Michael, Can you tell me more about the difference between this 2 functions? I would like to experience more in future i know which to use. Thank you. Best regards, Sebastian Ng 0 -
Dear @cPanelMichael I am planing to call my own function from /frontend/paper_lantern/mail/own.html I try single sign on it doesn't work. Regards, Sebastian Ng 0 -
I am planing to call my own function from /frontend/paper_lantern/mail/own.html
This is considered a cPanel plugin. We document the best approach to developing a cPanel plugin at: Guide to cPanel Plugins - Software Development Kit - cPanel Documentation Could you review this document (and the additional documents linked on it) and let us know if this helps clarify what's required? Thank you.0 -
Dear @cPanelMichael , How to set this thread as solve? Regards, Sebastian Ng 0 -
How to set this thread as solve?
Could you confirm if the document referenced in my last response was able to help answer your questions? Thank you.0 -
@cPanelMichael, Yes the reference document did able to help me Sebastian 0
Please sign in to leave a comment.
Comments
9 comments