ID: 35706 User updated by: andy at mandlnet dot co dot uk Reported By: andy at mandlnet dot co dot uk -Status: Feedback +Status: Open Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 4.4.1 New Comment:
I have now downgraded to 4.3.10 so can not provide you with a URL for examples however, If you create a new virtual host and a script containing the following: <?php define('CMS_CONFIG_MYSQL_HOST','localhost'); define('CMS_CONFIG_MYSQL_USERNAME','username'); define('CMS_CONFIG_MYSQL_PASSWORD','password'); define('CMS_CONFIG_MYSQL_DATABASENAME','databasename'); echo "Constants Defined"; ?> Visit this site and then using a different virtual server on the same physical server use the script posted earlier to display all constants. You may have to reload each page a few times before the constants are displayed, but it does eventually. Previous Comments: ------------------------------------------------------------------------ [2005-12-16 11:41:38] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-12-16 11:31:39] andy at mandlnet dot co dot uk Description: ------------ Defined constants appear to carry over occasionally between sites on the same server. We have downgraded to PHP 4.3.10 now and this has fixed the problem. Reproduce code: --------------- <?php foreach(get_defined_constants() as $key => $value) { printf("%s = ", $key); var_dump($value); } ?> Expected result: ---------------- Sometimes you will get just a normal result, if you have a site on the same server that uses defined constants sometimes they appear at the bottom. It should display all defined constants from E_ERROR = int(1) to GD_BUNDLED = int(0) as no others have been defined in our script. Actual result: -------------- Occasionally we got : CMS_VERSION_MAJ = int(4) CMS_VERSION_MIN = int(0) CMS_VERSION_INC = int(3) CMS_VERSION = string(5) "4.0.3" CMS_CONFIG_SITENAME = string(11) "<deleted>" CMS_CONFIG_CHIEF_EMAIL = string(21) "<deleted>" CMS_CONFIG_ADMIN_CLIENTHELPCONTACT = string(58) "<deleted>" as well as constants defined for database conectivity. (username and password) from other virtual hosts on the same server. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35706&edit=1