• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

Do I need to compile Apache with mod_headers in order to manipulate headers in PHP?


Do the installed Apache modules influence what PHP functions are usable? For instance, if I disable mod_expires, mod_negotiation and mod_headers, can I still manipulate headers with PHP using header()? Also, if I disable mod_so, can I dynamically load PHP extensions, like APC1.0.xx.so inside php.ini?

I am installing Apache 2.2.11.

2 Solutions

you should be able to use the header() function those modules are usefull for apache directives from .htaccess and other contexts (read more here: http://www.php-editors.com/apache_manual/mod/mod_headers.html )

you need mod_so to "Loading of executable code and modules into the server at start-up or restart time" more details here: http://www.php-editors.com/apache_manual/mod/mod_so.html so basically you could load PHP as a dynamic module if it was build that way.  So you should be able to load your extension from php.ini. Nevertheless you should test everything works as expected
tomp_glAuthor Commented:
Thanks for responding. I found that mod_headers etc were not needed to manipulate headers in PHP with header().

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now