#33638 [NEW]: /phpweb/include/site.inc -- revert revision 1.254

From: Date: Mon, 11 Jul 2005 00:12:53 +0000
Subject: #33638 [NEW]: /phpweb/include/site.inc -- revert revision 1.254
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969369040@lists.php.net to get a copy of this message
From: rajesh at meetrajesh dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Livedocs problem Bug description: /phpweb/include/site.inc -- revert revision 1.254 Description: ------------ $_SERVER['SERVER_NAME'] and $_SERVER['HTTP_HOST'] are NOT the same if the webpage is being served on a non-standard port. I rsync the PHP manual and run the manual on http://localhost:9000/. $_SERVER['SERVER_NAME'] redirects the page back to http://localhost/ and all images are called from http://localhost instead of http://localhost:9000/ due to the use of $_SERVER['SERVER_NAME']. Using $_SERVER['HTTP_HOST'] corrects this problem. Reproduce code: --------------- Line 188 in /phpweb/includes/site.inc: - $MYSITE = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["SERVER_NAME"]) . '/'; + $MYSITE = 'http://' . preg_replace("!^www\\.!", "", $_SERVER["HTTP_HOST"]) . '/'; -- Edit bug report at http://bugs.php.net/?id=33638&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33638&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33638&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33638&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33638&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33638&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33638&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33638&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33638&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33638&r=support Expected behavior: http://bugs.php.net/fix.php?id=33638&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33638&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33638&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33638&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33638&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33638&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33638&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33638&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33638&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33638&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33638&r=mysqlcfg

« previous php.doc (#969369040) next »