Hi, I am trying to enable mod_headers, i have ispconfig 3 and have run this to install php7.1 - https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/ and now i want to enable modules such as mod_headers and more.. - how to enable please!! First i ran Code: a2enmod headers and the system ststated Code: Module headers already enabled . for good measure i Code: service apache2 restart restarted apache. I then ran Code: apachectl -t -D DUMP_MODULES and it showed Code: headers_module (shared) and it seems to be loaded, but when i run PHP: <?phpphpinfo()?> cgi.rfc2616_headers states shows 0 how do i get custom php directives to load it? as my developer is stating mod_headers is not activated or enabled from the output of php, but from what i see it is loaded and shared and is in mod-enabled. he used the php code PHP: f (function_exists('apache_request_headers')) {echo 'FUNCTION EXISTS.';} else {echo 'FUNCTION DOES NOT EXISTS.';print_r(apache_request_headers());} and that states Code: FUNCTION DOES NOT EXISTS. please help obi-wan!!
The apache header module and this PHP function are not related to each other, if the apache header module is loaded or not has no influence of the existence of that PHP function. When this function does not exist in PHP then either php is not compiled with that function to be enabled or the used php version does not has that function or the used php mode does not support it (see notes on that function in PHP manual about supported PHP modes and versions).
thanks for the reply till. if i wanted to try adding something though ispconfig apache directives, how should it be added, can you give me an example of 1 rule please. thanks
This is a working example which also uses mod_headers: Code: <IfModule mod_headers.c> Header always set X-Frame-Options SAMEORIGIN </IfModule>