Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Softacolous API WordPress installation script



Threaded Mode | Print  

 Softacolous API WordPress installation script, Having problems (3 Replies, Read 3881 times)
OnlyPapaJonh
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hi,

I have a problem installing WordPress through the Softaculous API
Code

softaculous.com/docs/API#Install_a_Script

I am using Axios to make the POST request like this

Code


      const post = {
        'softsubmit': 'Install',
        'softproto': '3',
        'softdomain': 'domain.com',
        'softdirectory': this.documentRoot,
        'softdb': softdb,
        'dbusername': `${this.userName}_db`,
        'dbuserpass': `${this.adminPassword}db`,
        'hostname': 'localhost',
        'admin_username': this.userName,
        'admin_pass': this.adminPassword,
        'admin_email': 'admin@example.com',
        'language': 'en',
        'site_name': `WordPress ${this.userName}`,
        'site_desc': 'WordPress Site TEST SOFTACULOUS API',
        'dbprefix': dbprefix,
        'backup_location': '0',
        'auto_backup': '0',
        'autobackup_cron_min': null,
        'autobackup_cron_hour': null,
        'autobackup_cron_day': null,
        'autobackup_cron_month': null,
        'autobackup_cron_weekday': null,
        'themesearchstring': null,
        'theme_id': null,
        'theme_name': null
      }

      if (this.adminPassword !== '') {
        const options = {
          method: 'POST',
          url: url,
          headers: {'content-type': `application/x-www-form-urlencoded`},
          data: qs.stringify(post)
        }

        console.log(url)
        console.log(post)
        console.log(options)

        axios(options)
          .then((response) => {
            console.log(response)
          })
          .catch((err) => {
            console.error(err)
          })
      } else {
        this.adminPassword = false
        this.passError = 'Choose a password.'
      }



And well, nothing happens, there is no Error message and the installation is certainly not successful.

Code


Request URL: [cant post urls]domain.com:2083/cpsess2410579244/frontend/paper_lantern/softaculous/index.live.php?act=software&soft=26&tab=overview&jsnohf=1&soft=26&multi_ver=1

Query String Parameters
act: software
soft: 26
tab: overview
jsnohf: 1
soft: 26
multi_ver: 1

Form Data
softsubmit: Install
softproto: 3
softdomain: domain.com
softdirectory: jeje
softdb: naq12gb
dbusername: admin_db
dbuserpass: 123db
hostname: localhost
admin_username: admin
admin_pass: 123
admin_email: admin@example.com
language: en
site_name: WordPress admin
site_desc: WordPress Site TEST SOFTACULOUS API
dbprefix: sw9smz_
backup_location: 0
auto_backup: 0
autobackup_cron_min:
autobackup_cron_hour:
autobackup_cron_day:
autobackup_cron_month:
autobackup_cron_weekday:
themesearchstring:
theme_id:
theme_name:


What am I missing, anyone tried something like this before or something?
IP: --   

Softacolous API WordPress installation script
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5644
Status:
Hi,

Please change the URL to :

Request URL: https://domain.com:2083/cpsess2410579244/frontend/paper_lantern/softaculous/index.live.php?act=software&soft=26&api=json

Let us know what you get in response.

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

Softacolous API WordPress installation script
OnlyPapaJonh
Group: Member
Post Group: Newbie
Posts: 2
Status:
This helped, I saw my error.
There was a problem with the MySQL connection.
After commenting out these, it worked out fine.

Code

'dbusername': `${this.userName}_db`,
'dbuserpass': `${this.adminPassword}db`,
'hostname': 'localhost',


So its solved, thank you.
IP: --   

Softacolous API WordPress installation script
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5644
Status:
Glad to know your issue is resolved.

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

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 16, 2024, 7:40 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.039