php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35404 _SERVER
Submitted: 2005-11-26 07:55 UTC Modified: 2005-12-07 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: kam66be at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.1.0 OS: Linux
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: kam66be at gmail dot com
New email:
PHP Version: OS:

 

 [2005-11-26 07:55 UTC] kam66be at gmail dot com
Description:
------------
I found that my script have the problem that _SERVER is not superglobal, and _SERVER sometimes cause 'PHP Notice:  Undefined variable: _SERVER'

Reproduce code:
---------------
<?php

function test()
{
echo $_SERVER['REQUEST_TIME'];
echo '<br/>';
echo $_SERVER['REQUEST_URI'];
}

?>

Expected result:
----------------
1132987751<br/>
/test.php

Actual result:
--------------
<br/>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-26 10:05 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2005-11-26 21:18 UTC] etnu at etnu dot org
Are you using an opcode cache?

If so, set auto_globals_jit = Off in php.ini. That seemed to do the trick for me when I encountered the same problem.
 [2005-12-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-08-31 13:50 UTC] sperson at lfdj dot com
Same problem here after upgrade from PHP 5.1.5.
Server versions :
- PHP 5.1.6
- APC 3.0.11

The solution with "auto_globals_jit off" simply works for us.

Please note that while the server was in PHP 5.1.5 we never faced the problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC