php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #31591 env information needs clarification
Submitted: 2005-01-18 04:01 UTC Modified: 2006-09-08 17:50 UTC
From: aronnax_98 at yahoo dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: aronnax_98 at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-01-18 04:01 UTC] aronnax_98 at yahoo dot com
Description:
------------
When I try to call apache_getenv(...), PHP claims that 
the function doesn't exist.  The function is present in 
the online PHP manual.

Reproduce code:
---------------
echo apache_getenv('SOME_ENV_VARIABLE');

Expected result:
----------------
VALUE_OF_SOME_ENV_VARIABLE

Actual result:
--------------
Fatal error: Call to undefined function: apache_getenv() 
in /www/php/dryerase/config.php on line 21

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-18 12:12 UTC] sniper@php.net
Yes, it is available, but only with Apache2.
Documentation should have a note about it.

 [2005-01-18 19:44 UTC] philip@php.net
This requirement has been documented, but some questions: 

1) Assuming putenv() or apache_setenv() aren't used, will apache_getenv(), getenv(), and the Superglobals always have the same value?

2) How do these functions differ? putenv() vs. apache_setenv(), etc.

 [2005-04-05 15:31 UTC] vrana@php.net
These functions differ only in availability (both of them may or may not exist) and utilization of safe_mode AFAIK. They are bound in the meaning that apache_setenv("X", "a") affects getenv("X") but putenv("X=a") doesn't affect apache_getenv("X").
 [2006-09-08 17:50 UTC] philip@php.net
This has been documented.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 17:01:27 2024 UTC