Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/06/2016, 14:20
Avatar de mveraa
mveraa
 
Fecha de Ingreso: diciembre-2002
Ubicación: santiago-chilito
Mensajes: 1.931
Antigüedad: 21 años, 4 meses
Puntos: 2
conexion de server php5 a otro server php4

hola necesito orientación respecto a un tema.

tengo acceso a un server antiguo php4 y tengo otro server php5 ambos en la misma red.

no puedo actualizar el php4 por diversos temas.

entonces lo que queria hacer es conectarme desde mi php5 al mysql del 4

usando
$mysqli = new mysqli("172.16.34.0", "xxx", "xxxx", "xxx");
if ($mysqli->connect_errno) {
echo "Fallo al conectar a MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
echo $mysqli->host_info . "\n";

y me da este error:
Fallo al conectar a MySQL: (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

Que no entiendo mucho la verdad.

entonces lo probe con otro codigo:

$enlace = mysql_connect('172.16.34.0', 'xxxxl', 'xxx');

if (!$enlace)
{
die('No pudo conectarse: ' . mysql_error());
}

echo 'Conectado satisfactoriamente';
mysql_close($enlace);

y tampoco me deja.

a alguien se le ocurre como poder hacer la conexion?

Saludos y gracias.
__________________
"Cuando se adelanta un oponente, enfréntalo y salúdalo; si intenta retroceder, déjalo seguir su camino"