Re: use of undefined constant
| From: | Chris | Date: | Thu, 26 Oct 2006 07:38:32 +0000 |
| Subject: | Re: use of undefined constant | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42597@lists.php.net to get a copy of this message | ||
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/