PHP 5.1.2 with embedded mysqli on windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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) :

<?php
$link = mysqli_connect("127.0.0.1", "root", "", "test", 3306);
if (mysqli_connect_errno()) {
	printf("Echec de la connexion : %s\n", mysqli_connect_error());
	exit();
}
$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) :
<?php
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(
		"--datadir=$path", 
		"--innodb_data_home_dir=$path",
		"--innodb_data_file_path=ibdata1:100M:autoextend",
		"--innodb_force_recovery=4",
		"--innodb_log_group_home_dir=/cygdrive/c/Program Files/EasyPHP1-8/mysql/logs/",
		"--innodb_log_files_in_group=2",
		"--innodb_log_archive=1",
		"--innodb_log_arch_dir=/cygdrive/c/Program Files/EasyPHP1-8/mysql/logs/",
		"--innodb_lock_wait_timeout=10",
		"--log-error=$path/testrun.log"
	);
	$driver->embedded_server_start(TRUE, $args, NULL);
	var_dump($driver);
	$driver->embedded_server_end();
}
?>

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
insensitive
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
http://patapon.info
eon@xxxxxxxxxxxx

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux