php-mysql not installed -> installation just dies without any error-message

Discussion in 'Installation/Configuration' started by d@ten, Sep 11, 2009.

  1. d@ten

    d@ten New Member

    Hey,

    when php-mysql is not installed (properly) the installation-script just dies:

    Code:
    test:~/ispconfig3_install/install# php5 -q install.php 
    
    
    --------------------------------------------------------------------------------
     _____ ___________   _____              __ _       
    |_   _/  ___| ___ \ /  __ \            / _(_)      
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _ 
      | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |
     _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| |
     \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, |
                                                  __/ |
                                                 |___/ 
    --------------------------------------------------------------------------------
    
    
    >> Initial configuration  
    
    Operating System: Debian Lenny/Sid or compatible
    
        Following will be a few questions for primary configuration so be careful.
        Default values are in [brackets] and can be accepted with <ENTER>.
        Tap in "quit" (without the quotes) to stop the installer.
    
    
    Select language (en,de) [en]: 
    
    Installation mode (standard,expert) [standard]: 
    
    Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [test]: 
    
    MySQL server hostname [localhost]: 
    
    MySQL root username [root]:    
    
    MySQL root password []: foobar
    
    MySQL database to create [dbispconfig]: 
    
    MySQL charset [utf8]: 
    
    test:~/ispconfig3_install/install#
    
    According the code:
    Code:
    			//* Initialize the MySQL server connection
    			if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) {
    				$conf['mysql']['master_host'] = $tmp_mysql_server_host;
    				$conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user;
    				$conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password;
    				$conf['mysql']['master_database'] = $tmp_mysql_server_database;
    				$finished = true;
    			} else {
    				swriteln($inst->lng('Unable to connect to mysql server').' '.mysql_error());
    			}
    
    the real error-message is suppressed (with the '@') but the error should be handled (it should show up 'Unable to connect to mysql server').
    Unfortunately, in this case, <mysql_connect> seems to not return <false>.

    Removing the '@', the installation script shows me the following:

    Code:
    [..]
    Fatal error: Call to undefined function mysql_connect() in /root/ispconfig3_install/install/install.php on line 122
    
    Greetings,

    d@ten
     
  2. till

    till Super Moderator

    I've added this to the bugtracker.
     

Share This Page