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 6143517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:32:02+00:00 2026-05-23T18:32:02+00:00

here is the code: putenv(LC_ALL=ru_RU.utf8); print_r($_ENV) . PHP_EOL; echo getenv(‘LC_ALL’) . PHP_EOL; I get

  • 0

here is the code:

putenv("LC_ALL=ru_RU.utf8");
print_r($_ENV) . PHP_EOL;
echo getenv('LC_ALL') . PHP_EOL;

I get following response:

Array (
[USER] => www-data
[HOME] => /var/www
[FCGI_ROLE] => RESPONDER
[QUERY_STRING] =>
[REQUEST_METHOD] => GET
[CONTENT_TYPE] =>
[CONTENT_LENGTH] =>
[SCRIPT_FILENAME] => /var/www/cms/public/index.php
[SCRIPT_NAME] => /index.php
[REQUEST_URI] => /backend/users
[DOCUMENT_URI] => /index.php
[DOCUMENT_ROOT] => /var/www/cms/public
[SERVER_PROTOCOL] => HTTP/1.1
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_SOFTWARE] => nginx/1.0.2
[REMOTE_ADDR] => 127.0.0.1
[REMOTE_PORT] => 48644
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
[SERVER_NAME] => cmsdev.com
[REDIRECT_STATUS] => 200
[PATH_INFO] => /index.php
[HTTP_HOST] => cmsdev.com
[HTTP_USER_AGENT] => Mozilla/5.0 (
X11; Linux x86_64; rv:5.0
) Gecko/20100101 Firefox/5.0
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_LANGUAGE] => ru,en-us;q=0.7,en;q=0.3
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => PHPSESSID=ipsldis425a3pitimet7uehaa7; locale=ru_RU; timezone=%7B%22name%22%3A%22UTC%2B0%22%2C%22offset%22%3A0%7D
[HTTP_CACHE_CONTROL] => max-age=0
)

ru_RU.utf8 

So – it looks like instead of $_GET - it prints $_SERVER and it doesn’t contain LC_ALL. Any clues? (variables_order = "EGPCS").

  • 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-23T18:32:02+00:00Added an answer on May 23, 2026 at 6:32 pm

    It doesn’t print $_SERVER, it print $_ENV. Environment variables are set the web server which is why you see then when you print $_ENV. As it says in the $_ENV documentation, it says:

    An associative array of variables passed to the current script via the
    environment method.

    These variables are imported into PHP’s global namespace from the
    environment under which the PHP parser is running. Many are provided
    by the shell under which PHP is running and different systems are
    likely running different kinds of shells, a definitive list is
    impossible. Please see your shell’s documentation for a list of
    defined environment variables.

    Other environment variables include the CGI variables, placed there
    regardless of whether PHP is running as a server module or CGI
    processor.

    Those values are set when the script is first executed. When you call setenv(), those values are not automatically added to $_ENV. You either have to add them manually or use the getenv() function.

    This was also documented in the putenv documentation comments.

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

Sidebar

Related Questions

Here code of my project. I use direct Tcp connection But i get Could
Ok the error is showing up somewhere in this here code if($error==false) { $query
Here is code from MSDN . I don't understand why the work isn't just
Here a code to demonstrate an annoying problem: class A { public: A(): m_b(1),
enter code here I have a table on SQL server 2005 with bigint primary
The code here is X++. I know very little about it, though I am
enter code here Hi All, I have a simple windows service application that connects
Edit: The code here still has some bugs in it, and it could do
See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
I have this code here: var infiltrationResult; while(thisOption) { var trNode = document.createElement('tr'); var

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.