# auto_globals_jit breaks $_SERVER var

- Thread: https://externals.io/message/25360
- Original archive: https://news-web.php.net/php.internals/25360
- Started by Artzi on 2006-08-15T08:08:21+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #25360 — Artzi — 2006-08-15T08:08:21+00:00

URL: https://externals.io/message/25360#25360

I have the following in my php.ini:
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
The following PHP code prints nothing:

<?php
$webroot = $_SERVER['DOCUMENT_ROOT'];
$server = $_SERVER["HOST"];
$file = $_SERVER["SCRIPT_FILENAME"];
$transport = $_SERVER["REQUEST_TRANSPORT"];
$port = $_SERVER["SERVER_PORT"];
print "$webroot";
print "$server";
print "$transport";
?>

The rest of the php.ini is like php.ini-recommended that comes with the
source. Any idea what might be the problem?

Thanks,

Yoav.

---

## #25362 — Rasmus Lerdorf — 2006-08-15T08:24:10+00:00

URL: https://externals.io/message/25360#25362 · In reply to: #25360

Artzi, Yoav (Yoav) wrote:
> I have the following in my php.ini:
> register_globals = Off
> register_long_arrays = Off
> register_argc_argv = Off
> auto_globals_jit = On
> The following PHP code prints nothing:
> 
> <?php
> $webroot = $_SERVER['DOCUMENT_ROOT'];
> $server = $_SERVER["HOST"];
> $file = $_SERVER["SCRIPT_FILENAME"];
> $transport = $_SERVER["REQUEST_TRANSPORT"];
> $port = $_SERVER["SERVER_PORT"];
> print "$webroot";
> print "$server";
> print "$transport";
> ?>
> 
> The rest of the php.ini is like php.ini-recommended that comes with the
> source. Any idea what might be the problem?

You never answered my question from php-general.  Are you running APC, 
if so, which version?  Which version of PHP are you running?  Chances 
are an upgrade of either or both will fix this.

-Rasmus

---

## #25364 — Stut — 2006-08-15T08:33:14+00:00

URL: https://externals.io/message/25360#25364 · In reply to: #25362

Rasmus Lerdorf wrote:
> Artzi, Yoav (Yoav) wrote:
> > […]
>
> You never answered my question from php-general.  Are you running APC, 
> if so, which version?  Which version of PHP are you running?  Chances 
> are an upgrade of either or both will fix this.

We have seen a similar problem with Zend Platform (2.2.0) and PHP 5.1.4. 
On the first request everything is fine, but on a refresh all the 
superglobals are empty. Turning off auto_globals_jit fixes it, as does 
disabling the Zend Platform. Dunno if that helps you or not.

-Stut
