summaryrefslogtreecommitdiffstats
path: root/examples/detect.php
diff options
context:
space:
mode:
authorDan Wallis <mrdanwallis@gmail.com>2013-05-27 14:51:21 +1200
committerDan Wallis <mrdanwallis@gmail.com>2013-05-27 14:51:21 +1200
commitfeecdf1c0f9278d5abf71ad0ff17aa454147c2af (patch)
treeabd176efe8e67caa3d6860da7b26d69722584e03 /examples/detect.php
parented87a679d5ef18178b0f0c0c41f9e391e21267ac (diff)
downloadphp-openid-feecdf1c0f9278d5abf71ad0ff17aa454147c2af.zip
php-openid-feecdf1c0f9278d5abf71ad0ff17aa454147c2af.tar.gz
php-openid-feecdf1c0f9278d5abf71ad0ff17aa454147c2af.tar.bz2
Improves open_basedir detection
fredden@gordo:/tmp/php-openid/examples$ php detect.php | grep -C1 basedir If you are using a filesystem-based store or SQLite, be aware that open_basedir <http://www.php.net/manual/en/features.safe-mode.php#ini.open-basedir> is in effect. This means that your data will have to be stored in one of the fredden@gordo:/tmp/php-openid/examples$ php -i | grep basedir open_basedir => no value => no value fredden@gordo:/tmp/php-openid/examples$ vi detect.php fredden@gordo:/tmp/php-openid/examples$ php detect.php | grep basedir The *open_basedir* configuration restriction is not in effect. fredden@gordo:/tmp/php-openid/examples$ git diff detect.php diff --git a/examples/detect.php b/examples/detect.php index 9c59db3..90e3995 100644 --- a/examples/detect.php +++ b/examples/detect.php @@ -352,7 +352,7 @@ function detect_stores($r, &$out) } $basedir_str = ini_get('open_basedir'); - if (gettype($basedir_str) == 'string') { + if (gettype($basedir_str) == 'string' && $basedir_str) { $url = 'http://www.php.net/manual/en/features.safe-mode.php' . '#ini.open-basedir'; $lnk = $r->link($url, 'open_basedir'); fredden@gordo:/tmp/php-openid/examples$
Diffstat (limited to 'examples/detect.php')
-rw-r--r--examples/detect.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/detect.php b/examples/detect.php
index 9c59db3..90e3995 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -352,7 +352,7 @@ function detect_stores($r, &$out)
}
$basedir_str = ini_get('open_basedir');
- if (gettype($basedir_str) == 'string') {
+ if (gettype($basedir_str) == 'string' && $basedir_str) {
$url = 'http://www.php.net/manual/en/features.safe-mode.php' .
'#ini.open-basedir';
$lnk = $r->link($url, 'open_basedir');