|
Posted by starman7 on 03/18/07 14:13
i'm installing a custom php bulletin board, the below code complains
about its configuration file having spaces or carriage feeds before or
after the beginning or end of the code. as far as i could tell the
above code evaluated for reasons other that that ... as my config.php
had no spaces, etc. and worked completely after removal of this block,
and even partially while the block remained - (but displayed the
error).
can anyone describe what this code does, and advise if removing it
makes the app any less secure? i removed it and everything worked as
expected. and/or suggest replacement code i can suggest to the author?
also - why is it looking at dbuser?
$config_content = @file_get_contents($phpbb_root_path . 'config.'.
$phpEx);
if ( strpos($config_content, 'dbuser') && (substr($config_content, 0,
5) != '<?php' || substr($config_content, -2) != '?>') )
{
print('· You have <u>damaged</u>: <b>config.'.$phpEx.'</b> file !<br /
>· File must begin with: <b><?php</b> and finish with <b>?></b>
with any other chars (spaces, tabs or new line) before <?php and
after ?><br />· You must correct the file !<br />· Remember <u>it
is not mistake</u>, if your text editor can not see this space, tab or
new line, use other editor with operating multi (CR/LF) format or
create new file with clean content.<br />· Forum will not work
correctly with damaged config.php file.<hr /><br />');
}
thanks,
s7
Navigation:
[Reply to this message]
|