Bug #2084: Constants don't get recognized

From: Date: Tue, 17 Aug 1999 10:53:15 +0000
Subject: Bug #2084: Constants don't get recognized
Groups: php.dev 
Request: Send a blank email to php-dev+get-9908@lists.php.net to get a copy of this message
From: emilio_tunon@nl.compuware.com Operating system: Linux (Red Hat 6.0) PHP version: 3.0.9 PHP Bug Type: Other Bug description: Constants don't get recognized Using something like xxtest.php3 it does not seem to recognize/acknowledge the constant definitons, the return value of define shows ok but when the constant actually gets used it does not become translated, instead one gets the constant name (XXTOP). I tried infinite times without success, even restarted the web server. At some point, all of a sudden it started working. I implemented then something else following the same approach and then again the original was working but the 'cloned' one was not working. The same happened when trying to load the define'd constants from a file with include(). And in this case require() would not even work. --- xxpaths.php3 --- function xxPaths() { global $SERVER_NAME; if ($SERVER_NAME == "www.production.com") { $home = "/usr/home/someone"; $whome = "$home/www"; $top = $SERVER_NAME; } else { $home = "/home/someone"; $whome = "$home/public_html"; $top = "homehost.isp.com/~someone"; } define("XXTOP", "http://$top"); define("XXHOME", "$home"); define("XXWHOME', "$whome"); } ----- xxtest.php3 ------ include("xxpaths.php3"); xxPaths(); print( XXTOP . "/php3lib");

« previous php.dev (#9908) next »