hussamrub

Topic: Please I need help

when i upload all files in the server and open the URL the message error is

Warning: mysqli::mysqli() expects parameter 5 to be long, string given in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.Db.php on line 20

Warning: mysqli::query() [mysqli.query]: Couldn't fetch Db in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.Db.php on line 72

Warning: mysqli_error() [function.mysqli-error]: Couldn't fetch Db in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.Db.php on line 73

Warning: mysqli::query() [mysqli.query]: Couldn't fetch Db in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.Db.php on line 31

Warning: mysqli_error() [function.mysqli-error]: Couldn't fetch Db in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.Db.php on line 32

Fatal error: Call to a member function fetch_assoc() on a non-object in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.JobberSettings.php on line 23

many people talking about this error here and i tried to read the solutions and fixed the error but i can't sad please any one can help me my Conf file is :

<?php
$__instances['local'] = array(
    'prefix' => 'http://www.arab-talent.com/beta/',
    'db_host' => 'localhost',
    'db_port' => 3306,
    'db_user' => 'db140099',
    'db_password' => 'xxxxxxxxxxxxxxx',
    'db_name' => 'db140099_job',
    'db_prefix' => '',
    'app_url' => 'http://www.arab-talent.com/beta/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'On',
    'location' => 'local',
    'environment' => 'dev',
    'rewrite_mode' => 'apache_mod_rewrite'
);

$__instances['live'] = array(
    'prefix' => 'http://www.arab-talent.com/beta/',
    'db_host' => 'internal-db.s140099.gridserver.com',
    'db_port' => 3306,
    'db_user' => 'db140099',
    'db_password' => 'xxxxxxxxxxxxxxx',
    'db_name' => 'db140099_job',
    'db_prefix' => '',
    'app_url' => 'http://www.arab-talent.com/beta/',
    'ini_error_reporting' => E_ALL,
    'ini_display_errors' => 'on',
    'location' => 'online',
    'environment' => 'prod',
    'rewrite_mode' => 'apache_mod_rewrite'
);

foreach ($__instances as $__instance)
{
    if (isset($_SERVER['HTTP_HOST']))
    {
        $_compare_to = $_SERVER['HTTP_HOST'];
    }

    if (strstr($_compare_to, $__instance['prefix']))
    {
        define('DB_HOST', $__instance['db_host']);
        define('DB_PORT', $__instance['db_port']);
        define('DB_USER', $__instance['db_user']);
        define('DB_PASS', $__instance['db_password']);
        define('DB_NAME', $__instance['db_name']);
        define('DB_PREFIX', $__instance['db_prefix']);

        define('LOCATION', $__instance['location']);
        define('ENVIRONMENT', $__instance['environment']);
       
        define('APP_URL', $__instance['app_url']);
        define('REWRITE_MODE', $__instance['rewrite_mode']);
        ini_set('error_reporting', $__instance['ini_error_reporting']);
        ini_set('display_errors', $__instance['ini_display_errors']);
       
        break;
    }
}
?>

hussamrub

Re: Please I need help

my hosting is (mt) any problem with this hosting company ??

hobo

Re: Please I need help

Try:   'prefix' => 'arab-talent.com',
Did you install database yet?

hussamrub

Re: Please I need help

thank u hobo smile yes i installed database , i changed the prefix and open the site, but i have new problem sad

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.Db.php on line 20
Database Connection Error:
Debug

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Fatal error: Call to a member function query() on a non-object in /nfs/c09/h04/mnt/140099/domains/arab-talent.com/html/beta/_includes/class.JobberSettings.php on line 19