1--TEST-- 2SQLite3 load extension 3--SKIPIF-- 4<?php 5require_once(dirname(__FILE__) . '/skipif.inc'); 6$r = new ReflectionClass("sqlite3"); 7if (!$r->hasMethod("loadExtension")) { 8 die("skip - sqlite3 doesn't have loadExtension enabled"); 9} 10?> 11--INI-- 12open_basedir=. 13sqlite3.extension_dir=. 14--FILE-- 15<?php 16 17require_once(dirname(__FILE__) . '/new_db.inc'); 18 19$directory = dirname(__FILE__); 20 21touch($directory . '/myext.txt'); 22 23var_dump($db->loadExtension('myext.txt')); 24var_dump($db->close()); 25unlink($directory . '/myext.txt'); 26 27echo "Done\n"; 28?> 29--EXPECTF-- 30Warning: SQLite3::loadExtension(): Unable to load extension at '.%emyext.txt' in %s on line %d 31bool(false) 32bool(true) 33Done 34