Error after update attempt

Discussion in 'Installation/Configuration' started by binover, Dec 6, 2011.

  1. binover

    binover New Member

    Hi all, I inherited an ISPConfig 3 server with after testing I guess it crushed after an update attempt.

    Here is the error when I try to run the udate.php script

    PHP Notice: Undefined variable: conf in root/ispconfig3_install/install/update.php on line 76

    When I search the variable the result is:

    $conf_old = $conf;

    is any way to save this instalation? and if is not, which be the steps to a backup and reinstall?.

    All the sistem is running ok but I dont have the panel to administrate it.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check if the mysql login details in the files /usr/local/ispconfig/server/lib/ and /usr/local/ispconfig/server/lib/mysql_clientdb.conf are correct.
  3. binover

    binover New Member

    Thanks for the replay till!!

    I have no data in either of that files :S

    rw------- 1 root root 0 nov 3 17:00
    -rw------- 1 root root 0 nov 3 17:00 mysql_clientdb.conf

    can I restored it?

    Thanks again!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have a backup of them?
  5. binover

    binover New Member

    sadly I do not think so, the previous administrators are not know for the 'great work' if you know what I mean...
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, its possible to rebuild them. A backup would just be easier :)

    1) The file /usr/local/ispconfig/server/lib/mysql_clientdb.conf

    $clientdb_host                  = 'localhost';
    $clientdb_user                  = 'root';
    $clientdb_password              = 'InsertYourRootPasswordHere';
    Replace 'InsertYourRootPasswordHere' with your mysql root password.

    Next the files /usr/local/ispconfig/server/lib/ and /usr/local/ispconfig/interface/lib/

    //** Web-only
    if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
    	Header("Pragma: no-cache");
    	Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
    	Header("Content-Type: text/html; charset=utf-8");
    //** SVN Revision
    $svn_revision = '$Revision: 1525 $';
    $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
    //** Application
    define('ISPC_APP_TITLE', 'ISPConfig');
    define('ISPC_APP_VERSION', '3.0.3');
    //** Database
    $conf['db_type'] = 'mysql';
    $conf['db_host'] = 'localhost';
    $conf['db_database'] = 'dbispconfig';
    $conf['db_user'] = 'ispconfig';
    $conf['db_password'] = 'InsertYourISPConfigPasswordHere';
    $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
    $conf['db_new_link'] = false;
    $conf['db_client_flags'] = 0;
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']			= 'mysql';
    $conf['dbmaster_host']			= '';
    $conf['dbmaster_database']		= '';
    $conf['dbmaster_user']			= '';
    $conf['dbmaster_password']		= '';
    $conf['dbmaster_new_link'] 		= false;
    $conf['dbmaster_client_flags']  = 0;
    //** Paths
    $conf['ispconfig_log_dir'] = '/var/log/ispconfig';
    define('ISPC_ROOT_PATH', realpath(dirname(__FILE__).'/../')); // The main ROOT is the parent directory to this file, ie Interface/. NO trailing slashes.
    define('ISPC_LIB_PATH', ISPC_ROOT_PATH.'/lib');
    define('ISPC_CLASS_PATH', ISPC_ROOT_PATH.'/lib/classes');
    define('ISPC_WEB_PATH', ISPC_ROOT_PATH.'/web');
    define('ISPC_THEMES_PATH', ISPC_ROOT_PATH.'/web/themes');
    define('ISPC_WEB_TEMP_PATH', ISPC_WEB_PATH.'/temp'); // Path for downloads, accessible via browser
    define('ISPC_CACHE_PATH', ISPC_ROOT_PATH.'/cache');
    //** Paths (Do not change!)
    $conf['rootpath'] = substr(dirname(__FILE__),0,-4);
    $conf['fs_div'] = '/'; // File system separator (divider), "\\" on Windows and "/" on Linux and UNIX
    $conf['classpath'] = $conf['rootpath'].$conf['fs_div'].'lib'.$conf['fs_div'].'classes';
    $conf['temppath'] = $conf['rootpath'].$conf['fs_div'].'temp';
    //** Server
    $conf['app_title'] = ISPC_APP_TITLE;
    $conf['app_version'] = ISPC_APP_VERSION;
    $conf['app_link'] = '';
    $conf['modules_available'] = 'admin,mail,sites,monitor,client,dns,help';
    $conf['server_id'] = '1';
    //** Interface
    $conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools';
    //** Demo mode
    /* The demo mode is an option to restrict certain actions in the interface like 
    *  changing the password of users with sys_userid < 3 etc. to be 
    *  able to run the ISPConfig interface as online demo. It does not
    *  affect the server part. The demo mode should be always set to false
    *  on every normal installation
    $conf['demo_mode'] = false;
    //** Logging
    $conf['log_file'] = $conf['ispconfig_log_dir'].'/ispconfig.log';
    $conf['log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error
    //** Allow software package installations
    $conf['software_updates_enabled'] = false;
    //** Themes
    $conf['theme'] = 'default';
    $conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
    $conf['logo'] = 'themes/default/images/ispc_logo.png';
    //** Templates
    $conf['templates'] = '/usr/local/ispconfig/server/conf';
    //** Default Language
    $conf['language'] = 'en';
    $conf['debug_language'] = false;
    //** Default Country
    $conf['country'] = 'DE';
    //** Misc.
    $conf['interface_logout_url'] = ''; // example: http://www.domain.tld/
    //** Auto Load Modules
    $conf['start_db'] = true;
    $conf['start_session'] = true;
    //** Constants
    and replace 'InsertYourISPConfigPasswordHere' with the password of the ispconfig mysql user. You can find the password of the ispconfig use in one of the following files: Take a look in the /etc/postfix/ folder, there you find several config file names that start ith mysql... and end with ~. These files contain the login details for the ispconfog user before the failed update was run, copy the password from one of these files and insert it in the files in the place where you find 'InsertYourISPConfigPasswordHere'.

    Then rerun the ispconfig update by running the command on the shell and choose to reconfigure services when the updater asks you.
  7. binover

    binover New Member

    TILL THAK YOU VERY MUCH, I'm testing it but it seems everything is working fine after I follow your steps.


Share This Page