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." (14 Replies, Read 3109 times)
franceserv
Group: Member
Post Group: Newbie
Posts: 21
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: 5647
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.

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

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 21
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: 5647
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.

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

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 21
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: 5647
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.

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

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 21
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: 5647
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.

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

"The path of the domain you selected could not be found."
franceserv
Group: Member
Post Group: Newbie
Posts: 21
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: 21
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: 21
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: 21
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: 5647
Status:
Hi,

Glad to know it works now :)

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

"The path of the domain you selected could not be found."
urgido
Group: Member
Post Group: Newbie
Posts: 31
Status:
Hi
I have a similar problem here with premium license.

PHP Code

 $softaculous_idscript='26';
                function 
instalar_wordpress(
                    
$usuario,
                    
$password,
                    
$hostname,
                    
$script,
                    
$softdomain,
                    
$softdirectory,
                    
//$softdb,
                    
$admin_username,
                    
$admin_pass,
                    
$admin_email,
                    
$language,
                    
$site_name,
                    
$site_desc,
                    
$dbprefix,
                    
$sets_name,
                    
$protocolo
                    
){
                    
$url 'https://'.$usuario.':'.$password.'@'.$hostname.':2222/CMD_PLUGINS/softaculous/index.raw?'.
                        
'&act=software&api=json&soft='.$script;
        
                        
$post = array('softsubmit' => '1',
                        
'softdomain' => $softdomain// Must be a valid Domain
                        
'softdirectory' => $softdirectory// Keep empty to install in Web Root
                        /*'softdb' => $softdb,*/
                        
'admin_username' => $admin_username,
                        
'admin_pass' => $admin_pass,
                        
'admin_email' => $admin_email,
                        
'language' => $language,
                        
'site_name' => $site_name,
                        
'site_desc' => $site_desc,
                        
'dbprefix' => $dbprefix,
                        
'sets_name[]' => $sets_name,
                        
'softproto' => $protocolo
                        
);
                        
                        
// Set the curl parameters.
                        
$ch curl_init();
                        
curl_setopt($chCURLOPT_URL$url);
                        
curl_setopt($chCURLOPT_CONNECTTIMEOUT$time);
                        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
                        
                        
// Turn off the server and peer verification (TrustManager Concept).
                        
curl_setopt($chCURLOPT_SSL_VERIFYPEERFALSE);
                        
curl_setopt($chCURLOPT_SSL_VERIFYHOSTFALSE);
                        
                        if(!empty(
$post)){
                            
curl_setopt($chCURLOPT_POST1);
                            
curl_setopt($chCURLOPT_POSTFIELDShttp_build_query($post));
                        }
                        
                        
// Get response from the server.
                        
$resp curl_exec($ch);
                        
                        
// The response will hold a string as per the API response method. In this case its PHP Serialize
                        
$res json_decode($resp);
                        
                        
// Done ?
                        
return $res;    
                }

                
// RECIBIMOS EL SCRIPT Y SUS VALORES
                
$softaculous_dominio=$this->input->post('dominio');
                
$softaculous_sitename=$this->input->post('sitename');
                
$softaculous_sitedescr=$this->input->post('sitename_descr');
                
$softaculous_softproto=$this->input->post('prefijo');
                
$softaculous_dbprefix=$this->input->post('dbprefix');

                
// INSTALAR
                
$data_softaculous['softdomain'] = $softaculous_dominio;
                
$data['softdomain'] = $softaculous_dominio;
                
$data_softaculous['admin_pass'] = $this->pass_softaculous;
                
$data_softaculous['admin_email'] = $this->session->userdata('cliente_usuario');                
                
$data_softaculous['site_name'] = $softaculous_sitename;
                
$data_softaculous['admin_username'] = 'admin';
                
$data_softaculous['language'] = 'es_ES';
                
$data_softaculous['dbprefix'] = $softaculous_dbprefix;
                
$data_softaculous['site_desc'] = $softaculous_sitedescr;
                
$data_softaculous['softproto'] = $softaculous_softproto;
                
$data_softaculous['eu_auto_upgrade']=1;
                
$data_softaculous['auto_upgrade_plugins']=1;
                
$data_softaculous['auto_upgrade_themes']=1;
                
$data_softaculous['noemail']=1;
                if(
$this->input->post('folder')){
                    
$data_softaculous['softdirectory']=$this->input->post('folder');
                }else{
                    
$data_softaculous['softdirectory']="";
                }
                
                
$data['instalar_wordpress']=instalar_wordpress(
                    
$data['servicio']['server_user'],
                    
$this->encryption->decrypt($data['servicio']['server_password']),
                    
$data['servidor']['hostname'],
                    
$softaculous_idscript,
                    
$data_softaculous['softdomain'],
                    
$data_softaculous['softdirectory'],
                    
$data_softaculous['admin_username'],
                    
$data_softaculous['admin_pass'],
                    
$data_softaculous['admin_email'],
                    
$data_softaculous['language'],
                    
$data_softaculous['site_name'],
                    
$data_softaculous['site_desc'],
                    
$data_softaculous['dbprefix'],
                    
'',
                    
$data_softaculous['softproto']
                );
                
// INSTALAR 



Here is the output:
PHP Code

 stdClass Object ( [title] => Softaculous Softaculous - [error] => stdClass Object ( [softdomain] => No se puede encontrar la ruta del dominio seleccionado. ) [info] => stdClass Object ( [overview] => WordPress es un software Web para crear maravillosas páginas o blogEs una herramienta gratuita y al mismo tiempo no tiene precio por sus infinitas posibilidades



Can you guide me?
Thanks
IP: --   

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

Sorry for the delay in response.

In directadmin when you use username@password:hostname login method there is a session variable which is not available causing the Directadmin API call which we are using to get the list of domains to fail. Due to which you see the above error.

I have attached a working example file for installing a script on Directadmin with Softaculous API.


Edited by Brijesh : October 28, 2021, 12:25 pm

-----------------------
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 18, 2024, 6:03 pm.

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