vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Functions.php (https://vborg.vbsupport.ru/showthread.php?t=47601)

dotagious 01-11-2003 07:54 AM

Functions.php
 
I’m running vBulletin 2.2.9 and have tried to modify my functions.php file a hundred times. It doesn’t seem to matter what hack I’m trying to modify it for, it will produce a parse error and make my site unavailable.

I have tried this for a required block vbportal of code and for a custom photo gallery hack. On both occasion I’ve rechecked my edits 100 times and know they are being modified correctly. I have used a text editor, and also even tried directly editing the files from the server. In all cases, a parse error is generated.

Does anyone else run into this problem or have a solution for me?

I have made sure the edits are correct, made sure there is no blank space at the bottom, etc. and nothing seems to work. This has been going on for at least two months now and nothing seems to resolve this issue.

dotagious 01-11-2003 03:39 PM

ttt

Steve Machol 01-11-2003 03:48 PM

What text editor are you using? It sounds like the editor is causing the problem.

dotagious 01-11-2003 05:12 PM

AEdiX

.... but I have also tried to make the changes right from the server, and the same thing happens. My errors always refer to sessions.php, which I've replaced with the default just to make sure. I have also modified a dozen other files with the same editor and it went fine.

dotagious 01-11-2003 05:28 PM

I'm only running 4 hacks.

1. Thread Preview
2. Quick Reply
3. vBPortal
4. Photopost Hack

Out of the 4 hacks, vbportal requires an edit to functions.php for the topics option to work... and my custom photopost hacks requires a small modification. Neither modification wants to work.

Steve Machol 01-11-2003 05:42 PM

A parse error means there's something wrong with either the PHP file or the template. It would help if you posted the complete error message.

dotagious 01-11-2003 07:53 PM

Damn... I'm at work :(

I made a copy of it somewhere, I'll try to find it and post it.

It?s obviously something wrong with the PHP file, hence the error message, but can?t figure out what. Especially considering the fact I have tried several times to apply the edits to the original file.

dotagious 01-12-2003 02:51 AM

ttt

Steve Machol 01-12-2003 03:51 AM

I'm not sure what 'ttt' is supposed to mean but if you're waiting for my help I still need to see the actual error message. :)

dotagious 01-12-2003 05:25 AM

ttt= to the top

LOL

Ok, I just tried it again using a THIRD text editor and still get the same damn error.

Parse error: parse error in /home/offtopic/public_html/forums/admin/functions.php on line 827

Fatal error: Call to undefined function: vbdate() in /home/offtopic/public_html/forums/admin/sessions.php on line 400


This is line 827 AFTER the new code is added:

Code:

$buffer = str_replace(""", "\"", $buffer);

Steve Machol 01-12-2003 05:40 AM

The problem is in line 400 of sessions.php. What's on this line and what editor are you using?

Xenon 01-12-2003 12:08 PM

steve sorry i have to say, but you are wrong here.
line 400 of sessions.php calls vbdate() which has never been defined, because the functions.php is corrupted.

@dot:
replace this line:
PHP Code:

$buffer str_replace(""", "\[i][/i]""$buffer); 

with this:
PHP Code:

$buffer addslashes($buffer); 

this should fix the error.

dotagious 01-12-2003 03:28 PM

I don't have:

Code:

$buffer = str_replace(""", """, $buffer);

Instead, I have:

Code:

$buffer = str_replace(""", "\"", $buffer);
... and this is in functions.php right?

Xenon 01-12-2003 03:35 PM

np

you're welcome :)

dotagious 01-12-2003 03:46 PM

Quote:

Originally posted by Xenon
np

you're welcome :)

Look above you last post... we posted at the same time..LOL

Anywho.. if that is the line you mean, I replaced it as requested and I get a completely different error now. :( If I give full access to my server, control panel, etc. is there ANYWAY you could take a look. This has been going on forever and it's making me insane.

Steve Machol 01-12-2003 05:34 PM

Quote:

Originally posted by Xenon
steve sorry i have to say, but you are wrong here.
Not too quibble, bu I wasn't wrong. The problem was with line 400 of session.php. The fact that vbdate is actually defined in functions.php was overlooked, but there still could have been a problem with that line and the editor he's using.

Another thought came to me. Perhaps after editing these files, he's not uploading them in ASCII.

dotagious 01-12-2003 06:08 PM

I have tried several different editors.. so I don't think that is the problem. I have also edited the files directly from the server with no luck. I am also making sure to upload the files in ASCII format and make sure there is no blank space at the bottom. Every other edit I have done to every other file has been done with success. I'm positive it's something specific to functions.php, but can't figure out what. This has even happend when I tried to edit the same file on a former site of mine. Same host, same server, but different account. Same thing happened.

Xenon 01-12-2003 06:47 PM

Well functions.php works for all of us to edit, so the problem must be your editor or you upload it the wrong way, there's nothing we can do...
perhaps, the file is to long for your editor, try UltraEdit, that's what al lot of us use...

@Steve: touche :)

dotagious 01-12-2003 06:57 PM

Quote:

Originally posted by Steve Machol
The problem is in line 400 of sessions.php. What's on this line and what editor are you using?

This is line 400 in my sessions.php

Code:

$bbuserinfo['lastvisitdate'] = vbdate($dateformat." ".$timeformat,$bbuserinfo['lastvisit']);

dotagious 01-12-2003 06:59 PM

Quote:

Originally posted by Xenon
Well functions.php works for all of us to edit, so the problem must be your editor or you upload it the wrong way, there's nothing we can do...
perhaps, the file is to long for your editor, try UltraEdit, that's what al lot of us use...

@Steve: touche :)


Considering (a) no other file I?ve edited has this problem, (b) I?ve used several different editors and edited from the server directly, and (c) I?m transferring in the correct format (ASCII) and make sure there is no empty space at the bottom, it?s difficult to believe.

Smoothie 01-13-2003 06:52 AM

have you tried to add your hack to an unhacked set of files to see if you get the same error?

dotagious 01-13-2003 06:53 AM

It was from the default file from the start. Although I replaced the default file with a new default file to make sure.

Blitz King 02-07-2003 08:02 PM

Use EditPlus2. I had the same problem, then I tried it with EditPlus and it worked fine.

N9ne 02-07-2003 10:36 PM

When in doubt, use notepad.

recumbent615 02-07-2003 11:28 PM

When in doubt use vi !


All times are GMT. The time now is 02:41 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.01068 seconds
  • Memory Usage 1,765KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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