Hello,
I am currently migrating servers and after installing PHP/MySQL I am getting problems with any scripts that attempt a database connection along the lines of:
PHP Notice: Use of undefined constant localhost - assumed 'localhost' in /var/www/html/database.php on line XX
I realise that the fix is to add quotes around each usage of localhost, but as we are hosting many websites for different users who all use the unquoted form of localhost, I would rather set it up as a constant again.
My question basically, is why did localhost function as a constant on my old installation (Fedora - MySQL - 4.0.27-standard / PHP 4.3.10), but not on my new installation (Centos - MySQL - 4.1.20 / PHP 4.3.9)?
Apart from solving my problem, I am curious.
Thanks,
Russell.