PDA

View Full Version : functions.php


geniuscrew
04-09-2003, 03:18 PM
Hi

I deleted some code using our hosts File Editor, and now my forums aren't working :(

This is the error

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/******/public_html/forum/admin/functions.php on line 1029

Fatal error: Call to undefined function: vbsetcookie() in /home/******/public_html/forum/admin/sessions.php on line 241

I've tried uploading a different functions.php which was working but I get the same error. Even uploading a vB 2.3.0 functions.php file gives exactly the same errors even though it shouldn't.


Please help as my forums are down.

Xenon
04-09-2003, 09:16 PM
you should provide a bit of your code so we can see where the erooro is located ;)

geniuscrew
04-09-2003, 09:45 PM
My bad. Here it is:


error_reporting($oldlevel);
$buffer = ob_get_contents();
ob_end_clean();
if ($addedtags) {
$openingpos = strpos($buffer,'<?');
$closingpos = strrpos($buffer, '?');
$buffer=substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5);
} // line 1029
$buffer = str_replace(""", "\"", $buffer);
}




Thanks

geniuscrew
04-10-2003, 10:04 AM
Help please!

Xenon
04-10-2003, 01:15 PM
hmm, can't see an error there....
maybe you forgot a {} when you changed your files....
or your uploader is corrupted..

geniuscrew
04-10-2003, 01:20 PM
That maybe it - but is there a quick "PHP" checker or something similar available?

Thanks

geniuscrew
04-11-2003, 10:25 AM
*bump* I have no forums!!!!!!

Xenon
04-11-2003, 11:40 AM
try to upload unhacked functions.php, sessions.php and global.php.

does the bug occur now?

geniuscrew
04-11-2003, 12:51 PM
That worked thanks - but i think this means I'll have to upgrade the board because i uploaded those files from the 2.3.0 version whereas we were running 2.2.9

Xenon
04-11-2003, 03:50 PM
upgrading wouldn't hurt ;)

geniuscrew
04-11-2003, 11:31 PM
Done! - thanks a lot Xenon [again -_-]

:)

Xenon
04-12-2003, 12:00 PM
as always, you're welcome ;)