1--TEST--
2PDO SQLite open_basedir check
3--EXTENSIONS--
4pdo_sqlite
5--INI--
6open_basedir=.
7--FILE--
8<?php
9chdir(__DIR__);
10
11try {
12    $db = new PDO('sqlite:../not_in_open_basedir.sqlite');
13} catch (Exception $e) {
14    echo $e->getMessage() . "\n";
15}
16try {
17    $db = new PDO('sqlite:file:../not_in_open_basedir.sqlite');
18} catch (Exception $e) {
19    echo $e->getMessage() . "\n";
20}
21try {
22    $db = new PDO('sqlite:file:../not_in_open_basedir.sqlite?mode=ro');
23} catch (Exception $e) {
24    echo $e->getMessage() . "\n";
25}
26
27?>
28--EXPECT--
29open_basedir prohibits opening ../not_in_open_basedir.sqlite
30open_basedir prohibits opening file:../not_in_open_basedir.sqlite
31open_basedir prohibits opening file:../not_in_open_basedir.sqlite?mode=ro
32