Notice:Use of undefined constant

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

 



Hi,

On my system (Fedora 2) we (users) can use the following php:
PHP 4.3.10 (cgi) (built: Dec 21 2004 09:18:25)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
According to our system administrator php works in safe mode. I do not know (think) if there is any other special setup or not.


In a file, which is included into all my scripts, I defined constants (for MySQL access). PHP claims these constants as undifined constants, however, if I let them print out they have the right values (HOST='localhost'; NOT: HOST='HOST').

The output of my script:
----
PHP Notice: Use of undefined constant HOST - assumed 'HOST' in /home/hegedus/bin/hae_chng.php on line 4
PHP Notice: Use of undefined constant USER - assumed 'USER' in /home/hegedus/bin/hae_chng.php on line 5
PHP Notice: Use of undefined constant PWD - assumed 'PWD' in /home/hegedus/bin/hae_chng.php on line 6
PHP Notice: Use of undefined constant DB - assumed 'DB' in /home/hegedus/bin/hae_chng.php on line 7
User: haetu
Host: localhost
----


One solution could be to suppress php notices, but I think this is not the right treatment. Do you have any idea?

Thanks for your help in advance,
Tamas

--
Tamas Hegedus, Research Fellow | phone: (1) 480-301-6041
Mayo Clinic Scottsdale         | fax:   (1) 480-301-7017
13000 E. Shea Blvd             | mailto:hegedus@xxxxxxxx
Scottsdale, AZ, 85259          | http://hegedus.brumart.org

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux