Forum Moderators: coopster

Message Too Old, No Replies

require once BUG

         

OrlandoM

2:16 pm on Jan 18, 2010 (gmt 0)

10+ Year Member



Hi all!
I have added require_once("lib/mysql_qw.php) to my mixed HTML/PHP page. And after that one bug occured. In the place where it's inserted require_once when viewing this page through browser occures three symbols like that "abc" but in russian, when I comment require_once they dissapear. What's wrong? Can someone help?

andrewsmd

2:48 pm on Jan 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look in the lib/mysql_qw.php file to see if it is outputting something somewhere.

OrlandoM

3:22 pm on Jan 18, 2010 (gmt 0)

10+ Year Member



No there's nor echo, nor print inside it, only two functions to prevent SQL injections. If the bug was inside that file (lib/mysql_qw.php) then errors have to occure in place where sql operations are applied.

TheMadScientist

8:11 pm on Jan 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If the bug was inside that file (lib/mysql_qw.php) then errors have to occure in place where sql operations are applied.

Not necessarily... The file is read as part of the PHP where the require resides. Have you tried moving the require line to see if the error follows it? IOW, move the require line somewhere else in the file... Also have you tried requiring a different file to see if you get the same error? If it's truly the require line and not the file itself you should get the same error if you change the file required...

Just a Note: Your require does not have a closing " and () are not required, so you might try removing them and seeing if you get any different results:

Because include() is a special language construct, parentheses are not needed around its argument. Take care when comparing return value.

[us2.php.net...]