Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6011593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:16:57+00:00 2026-05-23T02:16:57+00:00

I initially set up a website on a LAMP server, but my employer needs

  • 0

I initially set up a website on a LAMP server, but my employer needs it moved to a WISP (windows/iis/sql server/php .. I don’t think this is a real term?) server, which I have done. I’m using IIS v 6, and I read that there is no SetEnv equivalent where you can set _SERVER variables. I rely on these variables for some configuration like the DB user/password and a site key for hashing. I’d strongly prefer to keep these out of the php code for security reasons.

The only solution I can think of is setting such variables with php.ini. I believe you can set a default DB connection, but I’d prefer not to do this anyway. Does php.ini have a SetEnv equivalent?

If not, is this possible to do with IIS anyway?

For example I want to be able to use a custom _SERVER[db_user] or _SERVER[site_key]. In my current .htaccess I have

SetEnv db_user tandu
SetEnv site_key blocked_for_your_protection
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:16:58+00:00Added an answer on May 23, 2026 at 2:16 am

    You set server variables in your php.ini file. Check the output of a phpinfo() command where this file is on your server.

    Have a look at the documentation about the php.ini settings.

    To edit the _SERVER settings, you have to set those directly in your server:

    Apache: works with htaccess and SetEnv
    IIS: http://www.php.net/manual/en/function.putenv.php in your *.php file or in the config:

    <serverVariables>
        <set name="db_user" value="abc" />
        <set name="site_key" value="abc" />
    </serverVariables>
    

    See http://forums.iis.net/t/1171675.aspx

    You can check your result on your phpinfo page. The variables must occur there!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a windows 2008 server and an asp website. I moved site to my
I want to make a movieclip invisible initially but i dont want to set
I have a website that's running on a Windows server and I'd like to
I'm currently use nyromodal in a website but I have some trouble to set
I have this jQuery datepicker code that initially set the minDate of the datepicker.
I'm having a table and i have a row which is initially set to
location.hash seems to be utterly broken in Safari 4: It can be set initially,
Is it possible to set the CSS properties of a DIV to not initially
I am using git to manage a dynamic website (PHP + MySQL) and I
We have set up Website Payments Pro account and I managed to use ruby

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.