I am trying to use php with libmysqld. I manage to compile php on windows 2000 
with cygwin because I am used to deal with Unix systems.

I have compiled php using --with-mysqli --enable-embedded-mysqli --with-xsl 
options (cgi version). Then I have tried the php examples in 
php-src/ext/mysqli/tests/ on a innodb DB that works.

With a binary version of php 5.1.2 (doesn't include libmysqld) I can access to 
the DB without problems using this script (table test on database test is 
innoDB) :

$link = mysqli_connect("", "root", "", "test", 3306);
if (mysqli_connect_errno()) {
        printf("Echec de la connexion : %s\n", mysqli_connect_error());
$result = mysqli_query($link, "SELECT * FROM test");
while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {
        printf ("ID: %s  Name: %s <br />", $row[0], $row[1]);  

But when I try with my own php with mysqli embedded (on the same DB and mysqld 
is down) with this script (just tring to connect) :
if (!extension_loaded('mysqli')){
        die('skip mysqli extension not available');

$driver = new mysqli_driver();

if (!$driver->embedded) {
        echo 'Mysqli embedded disabled';
} else {
        $path = "/cygdrive/c/Program Files/EasyPHP1-8/mysql/data";
        $host = $user = $passwd = NULL;
        $args = array(
        $driver->embedded_server_start(TRUE, $args, NULL);

I'm getting a seg fault :
$ php test_embedded.php
060405 10:35:26 [Warning] Setting lower_case_table_names=2 because file system 
for /cygdrive/c/Program Files/EasyPHP1-8/mysql/data/ is case
Segmentation fault (core dumped)

On the log file (testrun.log) I get this error :
InnoDB: Fatal error: cannot read from file. OS error number 17.
InnoDB: Error: tried to read 16384 bytes at offset 0 0.
InnoDB: Was only able to read -1.

I've checked the permissions, everyone has the rights to write/read/execute all 
the files (on windows/cygwin)

Both php (compiled and binary version) have the same innodb options...
So what's going on ? Is my own php miss configured ?

Thank you very much.

Jean-Philippe Braun

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to