Jump to content

Problem with the PDO connect on rare hosting


KaMeKuN
 Share

Recommended Posts

Hi, im having problem to install PW;  "The server requested authentication method unknown to the client ", i can connect normaly with php conection.

$link = mysql_connect('moretrealestatecom.fatcowmysql.com', 'db', 'pass');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db('db');

 
But if i try with PDO return SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client:
 

$dsn = 'mysql:host=moretrealestatecom.fatcowmysql.com;dbname=db';
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
); 

try {
    $online_dbh = new PDO($dsn, 'morelstatedb', 'pass', $options);
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Congratulations!";
} catch (PDOException $e) {
    echo $e->getMessage();
} 

post-1401-0-06231700-1422152147_thumb.pn

Link to comment
Share on other sites

Hi, im having problem to install PW;  "The server requested authentication method unknown to the client ", i can connect normaly with php conection.

$link = mysql_connect('moretrealestatecom.fatcowmysql.com', 'db', 'pass');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db('db');

But if i try with PDO return SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client:

$dsn = 'mysql:host=moretrealestatecom.fatcowmysql.com;dbname=db';
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
); 

try {
    $online_dbh = new PDO($dsn, 'morelstatedb', 'pass', $options);
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Congratulations!";
} catch (PDOException $e) {
    echo $e->getMessage();
} 

Thanks for your response; i have all requeriment of PW Green.

PHP version 5.5.6

  •  
  • PDO (mysql) database
  • Filter functions (filter_var)
  • MySQLi (not required by core, but may be required by some 3rd party modules)
  • GD 2.0 or newer
  • JSON support
  • PCRE support
  • CTYPE support
  • ICONV support
  • SESSION support
  • HASH support
  • SPL support
  • Found Apache module (cgi): mod_rewrite
  • ZipArchive support
  • /site/assets/ is writable
  • /site/modules/ is writable
  • /site/config.php is writable
  • .htaccess looks good
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...