From: [EMAIL PROTECTED] Operating system: Slackware Linux Kernel 2.4.5 PHP version: 4.2.2 PHP Bug Type: Output Control Bug description: Constants / Global variables non printable
I'm not sure if this is a problem with constants and pre-registered globals, or the printing mechanism. When setting up a constant such as this: define("SELF", $SCRIPT_NAME); and then printing with any of the following: echo SELF; print(SELF); pritnf("%s", SELF); The output is nothing, however, if I do this: printf("%s", SELF . "?foo=bar"); it will print properly. I believe it's a problem with the globals, as when I try just to print $SCRIPT_NAME or $SCRIPT_FILENAME I go no output unless I concat'ed it to something else such as shown above. My PHP configuration is as such: './configure' '--with-apxs=/usr/sbin/apxs' '--disable-short-tags' '--enable-bcmath' '--with-zlib-dir=/usr/lib' '--enable-ftp' '--with-gd=/usr/local/gd-1.8.4' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--enable-sockets' '--without-mysql' '--with-pgsql=/usr/local/pgsql' On Slackware (8.0) Linux, Kernel 2.4.5, Apache 1.3.20. For this particular script, I was working with sessions, and DID use the following lines to disable some sessions settings: ini_set("session.use_cookies", 0); ini_set("session.use_trans_sid", 0); The script was written prior to 4.2.2 and the auto enabled trans_sid was creating extra data in my GET's that I had already accounted for in my own script. -Richard -- Edit bug report at http://bugs.php.net/?id=20224&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20224&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20224&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20224&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20224&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20224&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20224&r=support Expected behavior: http://bugs.php.net/fix.php?id=20224&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20224&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20224&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20224&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20224&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20224&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20224&r=isapi