Re: use of undefined constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zbigniew Szalbot wrote:
Hello,

I am using PHP 5.1.6 (cli) and MySQL 5.1.11-beta on a FreeBSD 6.1 stable release. I am trying to make a custom database program work in this environment. I have it working under MS Windows XP Pro with MySQL 5.0.19-nt and php 4.3.10.

It seems everything is in order. A logging window pops up for me to enter username and password. I do it but I am never able to log in. I made sure the username and passwords are OK so this is not the problem.

In the error log I can see this: Use of undefined constant is_admin - assumed 'is_admin' in /path_to_file.

I bet you have something like:

$GLOBALS[is_admin]

You need quotes around that, or else (as you've seen) php thinks it's a constant:

$GLOBALS['is_admin']

A really quick and dodgy fix would be to turn error reporting down - but you should fix it properly.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux