Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : "The path of the domain you selected could not be found."



Threaded Mode | Print  

 "The path of the domain you selected could not be found." (12 Replies, Read 640 times)
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
Hello,
I'm testing Softaculous with remote API with their steep :1) act=adduser, 2) act=adddomain and 3) act=software, but it's fail at this final steep 3.
I can create a user with this :
PHP Code

 $post = array('saveuser' => 1,
                
'username' => $login,
                
'user_email' => $email,
                
'uid' => $uid,
                
'num_users' => '0'); 



where $login is "test", $email a valid email and $uid the Linux UID.
Then I create a "domain" like this :
PHP Code

 $post = array('domain' => $domain,
                
'username' => $user,
                
'path' => $path,
                
'backup_dir' => $path.'/backups',
                
'data_dir' => $path.'/datadir',
                
'savedomain' => 1); 


where $domain is "test20210618wp.franceserv.com", $user is "test" and $path is "/home/httpd/t/e/s/test/test20210618wp.franceserv.com"
and it's working on this steep...

Now, when I try to install a script (Wordpress with a Premium licence) :
PHP Code

 $post = array('softsubmit' => '1',
                
'softdomain' => $domain,
                
'softdirectory' => $sub_folder// Peut ĂȘtre vide
                
'softdb' => $db_name,
                
'dbusername' => $db_user,
                
'dbuserpass' => $db_pass,
                
'dbprefix' => $db_prefix,
                
'hostname' => 'sql.franceserv.fr',
                
'admin_username' => $admin_user,
                
'admin_pass' => $admin_pass,
                
'admin_email' => $admin_email,
                
'language' => $admin_language,
                
'site_name' => $site_name,
                
'site_desc' => $site_description); 



Where $domain is "test20210618wp.franceserv.com", $softdirectory is empty (I tested with tons of attempts likes the full path, the / etc... I have this error message :
array(2) {
  ["softdomain"]=>
  string(55) "The path of the domain you selected could not be found."
  ["fatal_error_text"]=>
  string(65) "This User does not have any Domain. Please contact Administrator." }

And the path for the domain name exist (if it don't exist, it's not possible to create the domain in steep 2).
Do I need to set "$GLOBALS['softaculous_conf']['user_mod_dir'] = 1;" ? Or perhaps I have an error into my variables or the way into authentication as user and not as root with api_key ?
Thank you in advance.
IP: --   

"The path of the domain you selected could not be found."
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5001
Status:
Hi,

Sorry for the delay in response.

From the details you have provided it looks like you are passing the API Key and API Pass of the root user.

You have created a user "test" and added the domain under the "test" user.

However while installing a script you are using the API Key Pass of the root user hence Softaculous tries to find that domain under root user.

The solution for this is to pass the "loginAs" parameter in the URL while performing the install call so you can add the following parameter to the URL :
&loginAs=test

and Softaculous will then look for the domain under the "test" user and proceed with the installation under the "test" user.

Do let us know if you still face the issue.

-----------------------
Loginizer - WordPress Security Plugin
Follow us on Twitter
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
Great, thank you very much for your response, I didn't see the $loginAs variable into the documentation.
It's working, but now I have the limitation "Only alpha numeric characters are allowed for the Database name" and I need to use underscore inside database name, but I will continue to check the documentation and check if it's possible to overwrite it.
IP: --   

"The path of the domain you selected could not be found."
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5001
Status:
Hi,

Glad to know the loginAs parameter works.

We will update it to the documentation soon.

Underscore is allowed in the database name. Maybe you are using any other special character as well. Alphanumeric and underscore are allowed.

-----------------------
Loginizer - WordPress Security Plugin
Follow us on Twitter
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
Quote From : Brijesh June 22, 2021, 8:10 am
Underscore is allowed in the database name. Maybe you are using any other special character as well. Alphanumeric and underscore are allowed.

Then I found a bug because softdb is "test_db4" :
PHP Code

 $post = array('softsubmit' => '1',
                
'softdomain' => $domain,
                
'softdirectory' => $sub_folder,
                
'softdb' => $db_name,
                
'dbusername' => $db_user,
                
'dbuserpass' => $db_pass,
                
'dbprefix' => $db_prefix,
                
'hostname' => 'sql.franceserv.fr',
                
'admin_username' => $admin_user,
                
'admin_pass' => $admin_pass,
                
'admin_email' => $admin_email,
                
'language' => $admin_language,
                
'site_name' => $site_name,
                
'site_desc' => $site_description);

[...] 
curl and so on [...]
echo(
"softdb: |".$db_name."|");
    echo 
'Some error occured';
    
var_dump($res['error']);
    exit(); 


show this :
Quote
softdb: |test_db4|
Some error occuredarray(1) {
  ["softdb"]=>
  string(64) "Only alpha numeric characters are allowed for the Database name."
}
IP: --   

"The path of the domain you selected could not be found."
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5001
Status:
Hi,

It looks like you are using Softaculous Enterprise so you need to refer to the following guide :
https://www.softaculous.com/docs/api/enterprise-api/

Also note in Softaculous enterprise only pass the database name and Softaculous will add the username_ as the prefix while creating the database. So in your case the database name should be passed db4

The guide you were following remote-api is for Softaculous Remote which works over FTP. Enterprise works over NFS.

-----------------------
Loginizer - WordPress Security Plugin
Follow us on Twitter
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
Thank you again for your responses and help, it's precious.

Now I set "softdb" to "db4" because you told me Softaculous add the username to have this : "test_db4" which is good for me.

But now I have "The MySQL Connection could not be established" because "softdb" (the database name) is used as username on MySQL :

[Warning] Access denied for user 'db4'@'62.***.***.***' (using password: YES)

whereas the "dbusername" set previously is "test".

I'm really sorry about all these questions...
IP: --   

"The path of the domain you selected could not be found."
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5001
Status:
Hi,

You want to install the apps over NFS right ? Just to confirm so we can go ahead with the Softaculous Enterprise integration.

In order to complete the Softaculous Enterprise integration you need to create the following functions in enterprise.php as explained here :
https://www.softaculous.com/docs/developers/softaculous-enterprise-integration/#integrating

Here you can use your control panel APIs to create/list/delete databases and cron jobs.

-----------------------
Loginizer - WordPress Security Plugin
Follow us on Twitter
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
My own panel is not on the same machine of Softaculous, it's the reason I'm using curl() over network. I think I'm using the API by remote.
But I'm using Softaculous Enterprise because this machine can manipulate the files with an NFS mount (I prefer NFS than FTP).
I have already set enterprise.php (from enterprise.sample.php) and the SQL connection set inside this file is working correctly. But the class seem to don't be used when I use the API with curl() from the other machine.
It seems I'm in the middle of 2 situations.
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
I think I progress because I didn't see I needed to set inside enterprise.php : "$auto_managedb = 1" (and not "$auto_managedb = 0")

Now, the username is a real username and not a database name ("root" instead "db4") :
[Warning] Access denied for user 'root'@'62.***.***.***' (using password: YES)

As the access is rejected, I think Softaculous is using the password of the user "test" with the login "root", which is not correct.
I think I should rewrite the next version :
PHP Code

 function dbuser($dbuser){
                return 
$dbuser;
        } 



To ask to Softaculous, to use "test" for the user "test"... There are something I don't understand at the moment.
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
I found the way, I need to use the $_POST value inside the class functions.
I will continue on this way, now I understand why with $auto_managedb = 1, I need to define all.
IP: --   

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 8
Status:
Just a message to tell you ALL is working perfectly for me, even with Wordpress theme Set and I use "only" curl() with your API  ;-D

Thank you very much for your help and your great product, my users will be happy  :)
IP: --   

"The path of the domain you selected could not be found."
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5001
Status:
Hi,

Glad to know it works now :)

-----------------------
Loginizer - WordPress Security Plugin
Follow us on Twitter
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is July 29, 2021, 7:34 pm.

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