andyang91

Registered
Oct 15, 2021
4
1
3
jakarta
cPanel Access Level
Website Owner
Hello,
I have 2 cpanel with 2 different provider and domain

Cpanel 1 :
Version 100.0.2
PHP ver : 7.4

Cpanel 2 :
Version 98.0.11
PHP ver : 7.2

I have php file for calling cPanel API and it works perfectly for Cpanel 1 above

The problem in cpanel 2. The php service does not return anything and are not processing the API. But when I using the url to create email address :

https://example.com:2083/execute/Email/add_pop?email=andy2&password=123456!Luggage

The result is I was asked for cpanel credential and then when I input the credential the email address was created. But when I`m using my php and using URL query string as I use in cpanel 1 it does not work. Does php version is the problem?

Thanks.

Edit : I attached my php method for calling cpanel API. The CURL method was using and both cpanel have CURL enabled when I checked using phpinfo
 

Attachments

Last edited:

andyang91

Registered
Oct 15, 2021
4
1
3
jakarta
cPanel Access Level
Website Owner
I`m trying to get curl error using various function like curl_errno and curl_error but only get 0 as respon. As the curl_exec the function only return NULL.