so .... i don't recompile php ... i change only a small think  on
apachectl script
the line HTTPD=/usr/sbin/httpd has transformed in two line ... like this

MYSEQUOIA="/usr/lib/mysequoia/libmysequoia.so:/usr/lib/libcarob.so:/usr/lib/php/extensions/mysql.so:/usr/libexec/apache/libphp4.so"
HTTPD="env LD_PRELOAD=$MYLSEQUOIA /usr/sbin/httpd"

and it works 
for testing i have asmall php page like this:

<?php
    $mysql_link = false;

    function GetConnection()
    {
        global $mysql_link;
        if( $mysql_link )
            return $mysql_link;
        $mysql_link = mysql_connect( 'localhost:25322', 'vuser',
'vuser') or die('Could not connect to server.' );
        mysql_select_db('avangateDB', $mysql_link) or die('Could not
select database.');
        return $mysql_link;
    }
    function CleanUpDB()
    {
        global $mysql_link;
        if( $mysql_link != false )
            mysql_close($mysql_link);
        $mysql_link = false;
    }

    $sql = "CREATE TABLE IF NOT EXISTS users (number INT NOT NULL
AUTO_INCREMENT PRIMARY KEY, surname VARCHAR(255) NOT NULL, firstname
VARCHAR(255) NOT NULL) TYPE=InnoDB";
    print "<br>Creating table: \'utilizator\'....";
    mysql_query( $sql, GetConnection() );

    print "<br>Insting a value ....";
    $sql = "INSERT INTO users (surname,firstname) VALUES
('mihai','costache'),('mihaii','costachee'),('mihaiii','costacheee')";
    mysql_query( $sql, GetConnection() );

    print "<br>Searching the values from table ....";
    $sql = "SELECT * FROM users";
    $rez = mysql_query( $sql, GetConnection() );
    if(mysql_num_rows($rez)) {
      print "<table>";
        while($row=mysql_fetch_array($rez))  {
                print
"<tr><td>".$row['number']."</td><td>".$row['surname']."</td><td>".$row['firstname']."</td></tr>";
        }
        print '</table>';
    } else {
       print "<br>Nothing";
    }
    print "<br>Close db link";
    CleanUpDB();
?>


thanks

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

Reply via email to