View Full Version : error with functions.php and sessions.php
danrak
11-27-2002, 06:15 PM
Ok, everytime I try and edit the functions.php to do a hack, I recieve this error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/tsf/public_html/admin/functions.php on line 812
Fatal error: Call to undefined function: vbdate() in /home/tsf/public_html/admin/sessions.php on line 399
The only way to get rid of it is to re-upload the file from the original. This is driving me nuts.
Velocd
11-27-2002, 09:17 PM
Xenon will probably tell you this soon, but you are not allowed to post full vBulletin files on the site; it's against the rules.
edit: Never mind, he's already edited your post.
-------------
Now to your problem.
Post the code chunk around line 812 of your functions.php, but not the whole file.
Also, which hack are you trying to install?
Xenon
11-27-2002, 09:18 PM
removed your files
you are not allowed to post vb-files here!!!!
to help out, there is just an error in functions.php, which produces the error in sessions.php
post the lines 808-817 of your functions.php can help
danrak
11-27-2002, 10:53 PM
Ok, sorry.
I think I may have found the problem. Line 808 had this:
$openingpos = strpos($buffer,'<?');
Could that be it? I have no idea how it got there. I'm reffering to <? in there.
If not lines 808-817 are as follows:
$openingpos = strpos($buffer,'<?');
$closingpos = strrpos($buffer, '?');
$buffer=substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5);
}
$buffer = str_replace(""", "\"", $buffer);
}
return "</normalfont><blockquote><pre><smallfont>PHP:</smallfont><hr>$buffer<hr></pre></blockquote><normalfont>";
}
danrak
11-27-2002, 11:03 PM
Originally posted by Velocd
Also, which hack are you trying to install?
It is doing this when I try and do any hack that invovles the functions.php. The last hack I tried to do was the order of the smilies. Also with the attachment as files hack, and a few others I can not think of. I think the store was one of them too.
Erwin
11-28-2002, 12:21 AM
Are you cutting and pasting using a TEXT editor? Or are you using something like Wordpad which can cause formatting errors?
danrak
11-28-2002, 01:03 AM
I'm using the editor in Cpanel on my webhost.
Xenon
11-28-2002, 11:24 AM
this line cannot work:
$buffer = str_replace(""", "\"", $buffer);
change it to this:
$buffer = str_replace('"', '\"', $buffer);
or that would be better:
$buffer = addslashes($buffer);
danrak
11-28-2002, 03:42 PM
It is working now, thank you.
Xenon
11-28-2002, 06:27 PM
:)
you're welcome
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.