Can't create new Database

Discussion in 'ISPConfig 3 Priority Support' started by Spaetzle, Apr 5, 2023.

  1. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Hi
    I did not create new DBs in my environment for quite a while.
    Today I tried and it did not work.
    I created a new user for the website first without problems. After that I started creating a new DB. After filling out the form and pressing the "save" button a spinner shows for a short time. The dialog does not close and no hint is given that the server is doing something. Under normal circumstances the red bubble iat the top of ISPConfig is shown with a count of tasks that will be done.
    "Datalog history" does not show anything either.

    I use a multiserver setup with Panel-, Web-, NS-, Mail-, DB- server on ISPConfig 3.2.9.
    I can create new websites, NS entries and so on without problems. Only creating databases does not seem to work.

    Do you have a hint for me?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the error.log of the web server for errors when you create the database.
     
  3. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Hi Till
    Yes, I can see an error here:
    Is this a problem with ISPConfig or do i need to reconfigure something here or something else?

    Greetings
    Bernd
     
  4. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Hi
    I took a look into the file:

    Code:
    // Add default remote_ips from Main Configuration.
                            if(empty($global_config['default_remote_dbserver'])) {
                                    $remote_ips = array();
                            } else {
                                    $remote_ips = explode(",", $global_config['default_remote_dbserver']);
                            }
    
                            if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_addres\
    s']; }
    
                            if($server_config['ip_address']!='') {
                                    if($this->dataRecord['remote_access'] != 'y'){
                                            $this->dataRecord['remote_ips'] = implode(',', $remote_ips);
                                            $this->dataRecord['remote_access'] = 'y';
    Line 462, where the error is fired is:

    Code:
    if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_addres\
    s']; }
    I can not see where variable "$default_remote_db" is set in the running function. Could it be that this should be "$global_config['default_remote_dbserver']"? Same thin is in line 372.

    For more information: The Server is running php8.1. Since PHP has become more sensitive in newer versions, the problem might not occur with version <=8.1. Unfortunately, I don't know when PHP became more sensitive here.
     
    Last edited: Apr 6, 2023
  5. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Hi for another time ;-)
    Looking into the code in the git repository I see, that there is a fix for this in devlopment branch.
    Can I update the Panel- Server to svn to get the fix or do I need to update all member servers then. I am not very compfortable switching to svn as this is a production system with many sites on it.

    Or is it a good idea to change the files by hand on my system. I fear that I might have problems when installing the next update. Or is this no problem?

    Regards
    Bernd
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Either update to dev branch or download the file which contains the fix manually. This does not cause any issues with future updates.
     
  7. Spaetzle

    Spaetzle Member HowtoForge Supporter

    Hi
    Ok. I changed the filte. It seems to work now.
    Thanks for the hints and helping.

    Have happy easter days.
     
    till likes this.

Share This Page