getenv() and directadmin api

Ed Co

New member
Joined
Aug 6, 2013
Messages
1
Hello.

I'm trying to use the directadmin api, but when I try to get username and password with getenv, it returns an empty string:

include_once ('inc/httpsocket.php');

$user = getenv('username');
$pass = getenv('passwd');

I can't get username and password from getenv(), so we're not able to use set_login:

$sock->set_login("${user}","${pass}");

Do you know what's happening? am I doing something wrong?

Thanks.
 
Back
Top