Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 03-03-2015, 08:57 AM
ae3799t ae3799t is offline
 
Join Date: Nov 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Add .PHP File as Plug-in - Admin Panel Will NOT Start

I do hope this is the right forum and apologize if not. I thought this might be one of those things that takes some programming knowledge, as well as an understanding of the forum itself. We have VB 4.2

One of our guys wrote a .PHP file to rotate banners, then he tried to add it to the Admin Panel as a Plug-in. Now when you try to log-on to the Admin Panel you get the following error message.

save from other path!Unable to add cookies, header already sent.
File: /home/roadtr5/public_html/forum/global.php(29) : eval()'d code
Line: 16

Does anyone understand this enough to figure out what happened from my description?
The forum is still up and you can look at things, but you cannot edit a thread and the sign-on page of the Admin Panel comes up to log-on, but when you do, you get a blank page with the above error.

Since the Admin Panel is hosed, you cannot edit the forum either, so we are basically down.

Any help would be greatly appreciated. I can only guess that one of the templates used for plugins was damaged, but even if I knew which one, I could not get to it by way of the Admin panel.
Reply With Quote
  #2  
Old 03-03-2015, 09:09 AM
the one the one is offline
 
Join Date: Nov 2013
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have access to your config file you could try this below

Edit config.php and add this directly below <?php:

Code:
define('DISABLE_HOOKS', true); then press save

Then go to your plugins and delete the one you are talking about then go back to your config.php remove define('DISABLE_HOOKS', true); press save
Reply With Quote
  #3  
Old 03-03-2015, 11:05 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do what michelle81 posted above to get back in your forum. As for the error, the problem is that the plugin is creating output (in this case, the message 'save from other path!'). The way vbulletin code works, no output is produced until just before the script ends, so a plugin cannot echo or print without causing that warning.
Reply With Quote
  #4  
Old 03-03-2015, 12:32 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Michelle nailed it, here's a more detailed bit of info for anyone interested: https://vborg.vbsupport.ru/showthread.php?t=259619
Reply With Quote
Благодарность от:
kh99
  #5  
Old 03-03-2015, 04:17 PM
ae3799t ae3799t is offline
 
Join Date: Nov 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You guys were right on, "all the way".

I disabled the addon.

To kh99 's point, under Plugin PHP Code" he had the following:

$topImage = 'forum/top-image-ads.php';
if(file_exists($topImage))
{
echo 'not exits';
}
else
{
echo 'save from other path!';
}

Is this where the echo you were talking about, or would it be in "top-image-ads.php"?

Also is there an article that might advise on the proper way to write an add-on?

Again. Many Thanks Frank :up:
Reply With Quote
  #6  
Old 03-03-2015, 05:16 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ae3799t View Post
You guys were right on, "all the way".

I disabled the addon.

To kh99 's point, under Plugin PHP Code" he had the following:

$topImage = 'forum/top-image-ads.php';
if(file_exists($topImage))
{
echo 'not exits';
}
else
{
echo 'save from other path!';
}

Is this where the echo you were talking about, or would it be in "top-image-ads.php"?
That looks like it, based on the message being the same. And that code doesn't do anything except print messages, so you could comment it out and see what happens.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:52 PM.


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.03726 seconds
  • Memory Usage 2,206KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete