PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label mod-env. Show all posts
Showing posts with label mod-env. Show all posts

Sunday, July 3, 2022

[FIXED] How to enable mod_env in Apache

 July 03, 2022     apache, apache2, mod-env, xampp     No comments   

Issue

I'm trying to set Environment variables for PHPMailer and need to enable mod_env in the httpd.conf. I know if you're using Apache (and mod_env is enabled), then Envirnoment variables can be specified in .htaccess. Here is my httpd.conf in XAMPP:

Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/"
Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs

<Directory "/Applications/XAMPP/xamppfiles/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Solution

mod_env is loaded or enabled like every other module, with the LoadModule directive. It's probably already enabled. If it isn't, the pattern will be quite obvious.

You can check loaded modules with apachectl -M

If you want to use directives provided by mod_env, like "SetEnv" you'll have to actually look up their syntax in the manual and type them into your configuation.



Answered By - covener
Answer Checked By - Katrina (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home
View mobile version

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing