I using this Yubico authentication PHP class: https://github.com/Yubico/php-yubico. I create php file test.php with this code:
<?php
require_once 'Auth/Yubico.php';
$otp = "ccbbddeertkrctjkkcglfndnlihhnvekchkcctif";
# Generate a new id+key from https://api.yubico.com/get-api-key/
$yubi = new Auth_Yubico('42', 'FOOBAR=');
$auth = $yubi->verify($otp);
if (PEAR::isError($auth)) {
print "<p>Authentication failed: " . $auth->getMessage();
print "<p>Debug output from server: " . $yubi->getLastResponse();
} else {
print "<p>You are authenticated!";
}
?>
And do all instructions in this github library. When I open this script I get:
Warning: require_once(): open_basedir restriction in effect. File(/usr/share/php/Auth/Yubico.php) is not within the allowed path(s): (/var/www/hmci/data:.) in /var/www/hmci/data/www/hmci.ru/php-yubico/test.php on line 2 Warning: require_once(/usr/share/php/Auth/Yubico.php): failed to open stream: Operation not permitted in /var/www/hmci/data/www/hmci.ru/php-yubico/test.php on line 2 Fatal error: require_once(): Failed opening required 'Auth/Yubico.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/hmci/data/www/hmci.ru/php-yubico/test.php on line 2
How to solve this problem?