I found the place where the code breaks.
The code assumes that ini_get('user_ini.filename')
does not fail.
In my setup, it does fail since the file does not exist, so ini_get
returns FALSE!
As a result – the error message on admin complains that ‘file not found’ – but fails to tell which file it was looking for! since ini_get() fails…
Feature request: provide the name of the file to provide or generate it automatically!
Please see the code below. Is it correct to use .htaccess
in this case?
PHP_SAPI occurs in 2 places. I did not look at the other one.
function update_cookie_security_directives() {
$lines = array();
$is_apache = get_option('hh_method') == 'htaccess';
$htaccess = get_home_path().'.htaccess';
if (strpos(PHP_SAPI, 'cgi') !== false) {
$iget = ini_get('user_ini.filename');
if (!$iget || $iget == ""){
error_log("iget FAILED = ". $iget);
$filename = $htaccess;
}else
$filename = get_home_path().ini_get('user_ini.filename');
$lines = php_cookie_security_directives();
}
I also get the following message on admin board upon activating the plugin:
NOTE: it does not provide the file name required.
Warning!
The following file was not found. Please make sure the file exists and has write permissions: /home/my-directory/public_html/my-domain.com/
-
This reply was modified 5 years, 8 months ago by mulli.bahr.
-
This reply was modified 5 years, 8 months ago by mulli.bahr.
-
This reply was modified 5 years, 8 months ago by mulli.bahr.