Salve. Innanzitutto mi scuso per non aver scritto oggi ma ho avuto problemi.
Ho provato entrambe le funzioni mysqli (e non mysql che so bene essere deprecata) e pdo, ma nulla. Sempre errore.
Mi interesserebbe approfondire l'utilizzo di PDO, se possibile.
Il codice che ho utilizzato é questo (ho celato alcune parti di user, uname e pw):
che genera, però, questo messaggio di errore:codice:<?php $hostname = "62.149.150.xxx"; $dbname = "Sql301yyy_4"; $user = "Sql301yyy"; $pass = "ezzzzzze"; $db = new PDO ("mysql:host=$hostname;dbname=$dbname", $user, $pass); ?>
"
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file' in D:\inetpub\webs\provailtuositoit\php\pagina.php:9 Stack trace: #0 D:\inetpub\webs\provailtuositoit\php\pagina.php(9) : PDO->__construct('mysql:host=62.1...', 'Sql301yyy', 'ezzzzzze') #1 {main} thrown in D:\inetpub\webs\provailtuositoit\php\pagina.php on line 9
"
Deduco dal messaggio che si tratta di un problema di sicurezza legato a pw e uname.
Fatemi capire dove sbaglio.
P.S.: utilizzo uno spazio su ARUBA e, ovviamente, un DB MySQL

Rispondi quotando