Softaculous


Topic : Sample Auto Install API for DirectAdmin


Posted By: lunny on March 13, 2012, 2:56 pm
Hi,

Do you have any sample codes for using the Auto Install API on DirectAdmin?

I found an example for cpanel here http://www.softaculous.com/docs/Auto_Install_API

Do you have a DirectAdmin version with the correct file paths?

thanks.

Posted By: Brijesh on March 14, 2012, 6:22 am | Post: 1
Hi,

Just change the following code:
Code
$new->login = 'http://user:password@domain.com:2082/frontend/x3/softaculous/index.live.php';

to
Code
$new->login = 'http://user:pass@your.server.com:2222/CMD_PLUGINS/softaculous/index.raw';



-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: lunny on May 10, 2012, 10:59 am | Post: 2
I couldn't get any response using the following url. Tried pasting it in browser but got redirected to the login page instead.

http://user:pass@your.server.com:2222/CMD_PLUGINS/softaculous/index.raw

Is this the right way to login to DirectAdmin from URL (http://user:pass@your.server.com:2222/) ?

Posted By: Brijesh on May 10, 2012, 12:42 pm | Post: 3
Hi,

Sir this will not work in the browser. You will have to write a code in PHP or any other language to get it working.

Edited by Brijesh : May 10, 2012, 12:42 pm

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: lunny on May 10, 2012, 2:24 pm | Post: 4
Yes, I tried using the installapi.php that came with the Softaculous installation.

I modified the url in the php file and when I run the script, I got redirected to the Directadmin login page.

Neither running it from script nor pasting the url directly in browser works. Both gets redirected to DirectAdmin login page.

Posted By: lunny on May 10, 2012, 4:58 pm | Post: 5
Manage to get it working through other ways.

Is there any way to know what are the required fields for installing a script through the API? For example, some scripts require fields like site name, site description.. while some others require company name, etc.


Posted By: Brijesh on May 11, 2012, 5:21 am | Post: 6
Hi,

The required fields are :
Code
$new->data['softdomain'] = 'domain.com';
$new->data['softdirectory'] = 'folder';
$new->data['admin_username'] = 'admin';
$new->data['admin_pass'] = 'qwerty';


The remaining fields are optional and the default values that are suggested on the install form are taken by Softaculous for installation.


-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: lunny on May 11, 2012, 5:26 am | Post: 7
So there's no way I can call the API to dynamically determine the required fields right?

The only way is to refer to the install form and hardcode the fields when doing the auto install with the API?

Posted By: Brijesh on May 11, 2012, 5:50 am | Post: 8
Hi,

You can use your code to determine the fields.
For eg: if you want to fill your value in sitename
you can use the following code:
Code

$sitename = 'YOUR VALUE';
$new->data['site_name'] = $sitename;

The variable for Sitename is site_name. You can find the variables in the install.xml of the script.


-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: security_man on December 4, 2012, 12:46 pm | Post: 9
Quote From : lunny May 10, 2012, 4:58 pm
Manage to get it working through other ways.

Is there any way to know what are the required fields for installing a script through the API? For example, some scripts require fields like site name, site description.. while some others require company name, etc.


any way you could be more specific as to how you got it working?  Been pounding my head against it with my directadmin server for a while now too and would be grateful for the help :)

Posted By: Brijesh on December 4, 2012, 12:57 pm | Post: 10
Hi,

Sir we are waiting for your reply on ticket with the login details. We will resolve it asap.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.