PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

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
Comments
Atom
Comments

Copyright © PHPFixing