vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   error with functions.php and sessions.php (https://vborg.vbsupport.ru/showthread.php?t=46162)

danrak 11-27-2002 06:15 PM

error with functions.php and sessions.php
 
Ok, everytime I try and edit the functions.php to do a hack, I recieve this error:
Quote:

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:
Quote:

$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:
Quote:

$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

Quote:

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:
Code:

$buffer = str_replace(""", "\"", $buffer);
change it to this:
Code:

$buffer = str_replace('"', '\"', $buffer);
or that would be better:
Code:

$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


All times are GMT. The time now is 07:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01343 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete