Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when open_basedir is enabled #2543

Open
LuckyFellow opened this issue Nov 8, 2017 · 0 comments
Open

Issues when open_basedir is enabled #2543

LuckyFellow opened this issue Nov 8, 2017 · 0 comments

Comments

@LuckyFellow
Copy link

During setup, step 3 breaks with the following error message, if I specify the "Certificate Folder": /etc/ssl/certs/

( ! ) Warning: is_readable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): Call Stack
Time Memory Function Location
1 0.0002 364016 {main}( ) .../step3.php:0
2 0.0063 648848 checkPathsReadable( ) .../step3.php:49
3 0.0064 649416 is_readable ( ) .../step3.php:75

That is, because in public_html/nZEDb/www/install/step3.php
This routine checks read access to every folder in the path /etc/ssl/certs/

function checkPathsReadable($location)
{
	$paths = preg_split('#\/#', $location);
	$directory = '';
	if ($paths && count($paths)) {
		foreach ($paths as $path) {
			$directory .= DS . $path;
			if (!is_readable($directory)) {
				return false;
			}
		}
		return true;
	}
	return false;
}

Of course I did not grant access to the folders /, /etc and /etc/ssl in my open_basedir configuration, but only to the destination folder: /etc/ssl/certs/

Please remove the readability check for every folder in the path and check only the destination folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants