|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-05-19 14:34 UTC] danhen at web dot de
Description:
------------
Completely "bcompiled" projects via bcompiler_write_file() doesn't provide globals like $_SERVER at runtime. If an uncompiled file is included which references one of these vars they are available.
Currently I'am dealing with this problem by placing the following lines in bcompiler_read:
zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
zend_is_auto_global("_REQUEST", sizeof("_REQUEST")-1 TSRMLS_CC);
zend_is_auto_global("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
but I think there exists a cleaner solution for it.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 01:00:01 2025 UTC |
Need more info on this ticket. Which version of PHP and bcompiler you're using? Which SAPI? I've just tested latest bcompiler with PHP 5.3 and Apache 1.3 with the following code: <? function gl($arr) { $s = "\$$arr"; echo "<p>$s:<br>"; if ($arr == '_GET') print_r($_GET); elseif ($arr == '_SERVER') print_r($_SERVER); elseif ($arr == '_ENV') print_r($_ENV); else echo "unsupported"; echo "</p>\n"; } echo '<P>FILE=', __FILE__; gl('_GET'); gl('_SERVER'); gl('_ENV'); ?> both $_GET, $_SERVER and $_ENV arrays were ok, no zend_is_auto_global() calls are in the latest sources.