|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26939 undefined variable/function (though haven't used the one specified)
Submitted: 2004-01-16 16:45 UTC Modified: 2004-01-31 23:16 UTC
From: Nico dot Laus dot 2002 at gmx dot de Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5CVS-2004-01-16 (dev) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
34 - 28 = ?
Subscribe to this entry?

 [2004-01-16 16:45 UTC] Nico dot Laus dot 2002 at gmx dot de
since I installed PHP5RC1-dev (Apache 2, Win/Linux), I have encountered a quite strange bug. It gives me an "variable not defined" but some lines above it is been defined. I've also got one message telling me that
"Fatal error: Unknown function: _GET() in index.php on line 12"
but neither I use such function, nor I declare one. only one line above, I acces the $_GET[] variable. This happens in very different situations with different variables and even "real" funtions. In PHP5 beta 2, this hasn't happened.

It's also very strange, that this bug appears randomly. So I cannot even give a reproduce code because even simple examples like

$test[0] = 'test';
print $test[0];


if ($_GET['test']=='test')
print 'test';

can cause this problem


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-16 18:58 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

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.

 [2004-01-16 19:17 UTC] Nico dot Laus dot 2002 at gmx dot de
well, as I told, there are no special details possible about this.
Seems, that the variable handler is somehow screwed up, or it's because I do use __destruct() more often now, but I don't know, how this can affect variables at runtime. At least, the thing with _GET() could be a hint to the solution. Because this is no function of mine.

I can give one more example:
I got an object $user and sometimes when accessing functions in it, PHP tells me that it cannot access this on a non-object, though I haven't deleted or reset it.

well, I can't give you a short example and as I told, there are no special conditions for this error to happen
 [2004-01-16 19:35 UTC]
What I wanted to know is the environment. Are you seeing this with CLI on both platforms? Are you using same SAPI module on both platforms? Same configuration? (if you claim it happens on both..)

 [2004-01-19 06:00 UTC] Nico dot Laus dot 2002 at gmx dot de
ok, on Windows, I use the php-cgi.exe

Windows XP:
P4 2,53GhZ, 512MB RAM, Apache 2.0.47, MySQL 4.1.1
configuration is almost the same, php.ini is almost the recommended ini:
register_long_arrays = On
cgi.force_redirect = off
one extension:

Pentium III (Katmai) 450MHz - 512KB
SuSE Linux 8.2
Linux version 2.4.20-4GB ( (gcc version 3.3 20030226
(prerelease) (SuSE Linux))

apache2-2.0.47 with (or similar file(name))
MySql. 4.1.0_max

PHP Version 5.0.0RC1-dev
Configure Command
'./configure' '--with-apxs2=/usr/local/httpd/current/bin/apxs'
'--with-mysql=/usr/local/mysql/current/' '--with-zlib-dir=/usr/lib/' '--enable-versioning'
'--enable-track-vars=yes' '--enable-url-includes' '--enable-trans-sid'
'--enable-sysvshm=yes' '--enable-ftp' '--with-config-file-path=/etc' '--with-gd'

further information about the _GET()-function error:
Fatal error: Unknown function: _GET() in index.php on line 12

11 if (isset($_GET['top']))
12	define('BLOCK_DB_WRITE',true);
13 else
14	define('BLOCK_DB_WRITE',false);

I've got another example of the error:

Fatal error: Unknown function: name() in /www/dsa-final/ on line 55

line 55:
define('LIMIT_CANCELTIME_1',0 /*von 'kein Vertrag' in ?*/);
 [2004-01-19 09:31 UTC] Nico dot Laus dot 2002 at gmx dot de
I just got another example of this error

Fatal error: Unknown function: #037B0B() in /www/dsa-final/ on line 31

 [2004-01-19 14:17 UTC]
Do you have Zend Optimizer there? (Or ANY other zend extension, like some cache..?)

 [2004-01-19 14:54 UTC] Nico dot Laus dot 2002 at gmx dot de
I don't use any optimizer, neither zend, nor another

last time I checked for such optimizer, Zend optimizer wasn't available for PHP5

the only extension I use, is the MySQL-extension
 [2004-01-19 19:47 UTC]
Remove --enable-versioning from your linux configure line!
It's known to cause problems..and try with the latest CVS snapshot.

 [2004-01-22 13:29 UTC] Nico dot Laus dot 2002 at gmx dot de
I ran the windows server for several hours with a snapshot of yesterday, no error occured, I still have to test it with Linux, I'll reopen this report, if there are still errors,

thanks for your help
 [2004-01-25 12:04 UTC] Nico dot Laus dot 2002 at gmx dot de
well, the bug seems away under windows, but not with Linux (although having disbaled enable-versioning)!
still errors like

Fatal error: Cannot use object of type User as array in index.php on line 19

19 if (isset($_GET['top']))
 [2004-01-25 19:16 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

 [2004-01-31 23:16 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 06:03:37 2023 UTC