Hi everybody,

I am trying to use the libmysequoia with PHP 5.1.4

This is my scenario:

*********************
*                   *
*      PHP          *
*                   *
*********************
  172.16.178.98
         X
         X
         X
         V
*********************
*                   *
*     SEQUOIA       *
*                   *
*********************
  172.16.178.112
    X           X
    X           X
    X           X
    V           V
********    **********
* My   *    *    My  *
* SQL  *    *   SQL  *
*      *    *       *
********    **********
172.16.      172.16.178.137
178.144


The Sequoia HOST (by the moment I have only one just to see it works)
and the MySQL nodes work perfectly but the conection from PHP is not
going well:

I have:
*. Downloaded the 5 .rpms and installed without errors
*. Changed all the sources from PHP5.1.4 and substituted "mysql_config"
with "mysequoia_config"
*. Conpiled the PHP with no errors.

But I have created a simple PHP script and it does not connect with
sequoia. Here I send the script:

<?
        $link = @mysql_connect("172.16.178.112", "sequoia", "sequoia");
        print_r($link);
        mysql_select_db("test",$link);
        $ClienteId=1;
        $Arr["Secoia"]["link"]=mysql_connect("172.16.178.112",
"sequoia", "sequoia");
        mysql_select_db("test",$Arr["Secoia"]["link"]);
        $Arr["Secoia"]["TipoId"]=2;
        $Arr["MySQL1"]["link"]=mysql_connect("172.16.178.144",
"sequoia", "sequoia");
        mysql_select_db("test",$Arr["MySQL1"]["link"]);
        $Arr["MySQL1"]["TipoId"]=3;
        $Arr["MySQL2"]["link"]=mysql_connect("172.16.178.137",
"sequoia", "sequoia");
        mysql_select_db("test",$Arr["MySQL2"]["link"]);
        $Arr["MySQL2"]["TipoId"]=4;
        $FechaFin = mktime("11", "0", "0", "5", "29", "2006");
        $i=0;
        while (mktime(date("H"), date("i"), date("s"), date("m"),
date("d"), date("y"))<=$FechaFin){
                mysql_query("INSERT INTO log (fecha, valor, tipo_id_fk)
VALUES ('" . date("Y-m-d H:i:s") . "'," . $i . ",1)", $link);
                foreach ($Arr as $Servidor){
                        $result = mysql_query("SELECT count(*) AS cuenta
FROM log WHERE tipo_id_fk=1", $Servidor["link"]);
                        if ($row=mysql_fetch_array($result)){
                                mysql_query("INSERT INTO log (fecha,
valor, tipo_id_fk) VALUES ('" . date("Y-m-d H:i:s") . "'," .
$row["cuenta"] . "," . $Servidor["TipoId"] . ")", $link);
                                mysql_free_result($result);
                        }
                }
                $i++;
        }
        foreach ($Arr as $Servidor)
                mysql_close($Servidor["link"]);
        mysql_close($link);
?>

I have no idea what's next.

Can someone help me?.

Thank you very much indeed in advanced,

With best regards,


Este mensaje es privado y CONFIDENCIAL y se dirige exclusivamente a su 
destinatario. Si usted ha recibido este mensaje por error, no debe revelar, 
copiar, distribuir o usarlo en ningun sentido. Le rogamos lo comunique al 
remitente y borre dicho mensaje y cualquier documento adjunto que pudiera 
contener. El correo electronico via Internet no permite asegurar la 
confidencialidad de los mensajes que se transmiten ni su integridad o correcta 
recepcion. JAZZTEL no asume responsabilidad por estas circunstancias. Si el 
destinatario de este mensaje no consintiera la utilizacion del correo 
electronico via Internet y la grabacion de los mensajes, rogamos lo ponga en 
nuestro conocimiento de forma inmediata.Cualquier opinion expresada en este 
mensaje pertenece unicamente al autor remitente, y no representa necesariamente 
la opinion de JAZZTEL, a no ser que expresamente se diga y el remitente este 
autorizado para hacerlo.

*********

This message is private and CONFIDENTIAL and it is intended exclusively for its 
addressee. If you receive this message in error, you should not disclose, copy, 
distribute this e-mail or use it in any other way. Please inform the sender and 
delete the message and attachments from your system.Internet e-mail neither 
guarantees the confidentiality nor the integrity or proper receipt of the 
messages sent. JAZZTEL does not assume any liability for those circumstances. 
If the addressee of this message does not consent to the use of Internet e-mail 
and message recording, please notify us immediately.Any views or opinions 
contained in this message are solely those of the author, and do not 
necessarily represent those of JAZZTEL, unless otherwise specifically stated 
and the sender is authorised to do so. 


_______________________________________________
Carob mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob

Reply via email to