Cannot add new website suddenly (The server already host few websites.)

Discussion in 'General' started by anton1018, Jul 30, 2015.

  1. anton1018

    anton1018 New Member

    It was no problem when I added new sites before.
    However, I cannot do that yesterday.
    No any error message show in ispconfig interface, but I checked that here had no any new folder(e.g. clients/client[id]/web[id]) created by ispconfig.
    I cheked MySQL, the data of the websites account is normal.
    I search by web but cannot found the solution with similar case.
    Please help for this,
    Thank you very much
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. anton1018

    anton1018 New Member

    Thanks for your help.
    when I run the command: /usr/local/ispconfig/server/ , It show that:
    "PHP Parse error: syntax error, unexpected '[' in /usr/local/ispconfig/server/plugins-available/ on line 407"
    Is it the reason of I can't add a new sites?
    But this I had not modified by day one, how come it show error now?
    BTW the following is the code:

    $sql = "SELECT * FROM mail_domain WHERE domain = ?";
    *****line 407 **** $domain_rec = $app->db->queryOneRecord($sql, explode("@",$data['old']['email'])[1]); *****line 407 ****
    if (is_array($domain_rec)) {
    $mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id'];
    $mail_backup_files = 'mail'.$data['old']['mailuser_id'];
    exec(escapeshellcmd('rm -f '.$mail_backup_dir.'/'.$mail_backup_files).'*');
    //* cleanup database
    $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?";
    $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']);
    if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']);

    $app->log('Deleted the mail backups for: '.$data['old']['email'], LOGLEVEL_DEBUG);

    It seems no any error on it.
    Do you have any suggest?

    Thank you so much!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you installed a non released dev version from git on your server as this code is not in ISPConfig which is the current stable release. Dev versions from GIT are only for developers, the code is not usable for production servers as you can see on your system. You should restore a backup of your server from a timepoint before you installed the dev code.
  5. anton1018

    anton1018 New Member

    Thank you very much!
    I solved the problems now

Share This Page