1- Set your php include path: (key.inc.php in include_path option selected)
Method #1: Use php.ini to define include path (preferred and safest method)
Edit your php.ini and add this line:
include_path = ".:/home/my_user/php_includes"
Method #2: Use .htaccess file to define include path (only if PHP run in apache module mode)
Create a file named .htaccess in the top directory of your app, with this content:
php_value include_path ".:/home/my_user/php_includes"
Method #3: Use .user.ini file to define include path (only if PHP run in php-fpm mode)
Create a file named .user.ini in every directory where there are encrypted files, with this content:
include_path = ".:/home/my_user/php_includes"
Method #4: Rectify the encrypted file: Use encrypted file to define include path
Add the following line at the beginning of every encrypted file:
set_include_path("/home/my_user/php_includes");
Method #5: Rectify the encrypted file: Use encrypted file to define include path
Add the following line at the beginning of every encrypted file:
ini_set("include_path", "/home/my_user/php_includes");
Method #6: Rectify the encrypted file
Rectify the following string in every encrypted file:
$keyfile="key.inc.php";
by
$keyfile="/home/my_user/php_includes/key.inc.php";
2- move file key.inc.php into this directory
3- reload webserver and/or php-fpm
If key.inc.php in include_path option not selected, the key.inc.php file must be in the same directory where the encrypted files are:
$keyfile="key.inc.php";
Or in another directory:
$keyfile="/home/my_user/php_includes/key.inc.php";