From:             dennis at studiomagenta dot co dot th
Operating system: Linux Apache 1.3.41
PHP version:      5.2.5
PHP Bug Type:     Scripting Engine problem
Bug description:  Problem with use of 'require' or 'include'

Description:
------------
After including a 'require' statement in my PHP script I found that an
echoed output of variables in the same script inserted an unwanted and
unexpected space character (%20) before the first variable name. I found
the same problem when using 'include' instead of 'require'. The included
PHP script is located in the root of the web server, not in the public
area.

This space character effectively corrupted the name of the variable which
caused it not to be recognised by my receiving Flash program.

Output before including the 'require' statement:
reply=valid user&company_name=ABC

Output after including the 'require' statement:
%20reply=valid user&company_name=ABC

Reproduce code:
---------------
<?php
require '../../userpass.php';
echo "reply=valid user&company_name=ABC";
?>


And the sample code for the required file userpass.php:

<?php 
$mySQLdatabase = 'some_database';
$mySQLusername = 'some_login'; 
$mySQLpassword = 'some_password'; 
?>

Expected result:
----------------
reply=valid user&company_name=ABC

Actual result:
--------------
%20reply=valid user&company_name=ABC

-- 
Edit bug report at http://bugs.php.net/?id=44406&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44406&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44406&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44406&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44406&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44406&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44406&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44406&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44406&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44406&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44406&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44406&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44406&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44406&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44406&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44406&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44406&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44406&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44406&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44406&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44406&r=mysqlcfg

Reply via email to