API problem

larsisgoed9

Verified User
Joined
Mar 23, 2011
Messages
10
Dear DirectAdmin forum,

I got a problem with the DirectAdmin API.
A few months ago everything is working perfect, but now it won't anymore. I trie to connect to my server and then I got as a respone the login screen, or nothing, so I think there is something really wrong.

This is a sample of how I use the DirectAdmin api for changing the bandwidth and diskspace:

Code:
$Socket = new HTTPSocket;
					$Socket->connect("IP IS RIGHT", 2222);
					$Socket->set_login("admin", "PASSWORD IS RIGHT");
									
					$Socket->set_method('POST');
									
					if($sel_package['type'] == 1){
						$command = 'CMD_MODIFY_RESELLER';
					} else{
						$command = 'CMD_MODIFY_USER';
					}
						
					$Socket->query( '/'.$command,
						array(
							'action' 	=> 'customize',
							'user' 		=> $sel['daname'],
							'bandwidth' => ($_POST['extrabw']*1000)+$sel_package['bandwidth'], 
							'quota'		=> ($_POST['extrads']*1000)+$sel_package['quota'], 
							'aftp' => 'ON',
							'cgi' => 'ON', 
							'php' => 'ON', 
							'spam' => 'ON', 
							'cron' => 'ON', 
							'catchall' => 'ON', 
							'ssl' => 'ON', 
							'ssh' => 'OFF', 
							'sysinfo' => 'OFF', 
							'dnscontrol' => 'ON'
						)
					);
					
					$result5 = $Socket->fetch_body();
All variables are right and I controlled them twice.

The only thing what changed at the server is my password (it was 10 characters, now its 75) and I installed ConfigServerFirewall instead of APF Firewall, but I tried to turn off the firewall and then it doens't work also.

I use PHP version 5.2.17

I hope someone could help me, I really appreciate that!
 
Last edited:
Hello,

Did you read directadmin logs? Did you change SSL setting for directadmin? Hostname?

Are sure, that with getting APF stopped you get all iptables rules flushed? What
Code:
iptables-save
shows when you stop APF?
 
Back
Top