Log in

View Full Version : Upgrade Error... please help?


Ohiosweetheart
02-14-2009, 02:43 AM
I just upgraded a forum from 3.5.4 to 3.8.1. The upgrade ran smoothly, but when prompted to login to the acp afterwards, this blank page came up with the following error -

Unable to add cookies, header already sent.
File: /home/hairsty/public_html/forum/global.php(833) : eval()'d code
Line: 115and this message across the top of the page -
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/hairsty/public_html/forum/global.php(833) : eval()'d code on line 115
any ideas what this could be??

Thanks in advance.

TigerC10
02-14-2009, 03:07 AM
I suspect that you did not upload all of the files properly. Usually this only happens if you run the upgrade script without uploading all of the .php files correctly.

Try re-uploading all of the .php files again.

Ohiosweetheart
02-14-2009, 03:12 AM
Thanks Tiger, I'm in the middle of doing that right now. I hope it works!

--------------- Added 1234588998 at 1234588998 ---------------

No that didn't work. I re-uploaded everything, and ran the upgrade script again.
I still have the same error messages.

TigerC10
02-14-2009, 03:33 AM
Once the upgrade script runs, you don't need to run it again.

According to my global.php file, this is line 115...

else
{
$vbulletin->userinfo['lastvisitdate'] = -1;
}


Open your global.php file and scroll down to line 115. Make sure that this is the line you've got.

If you can't add the cookie data, you might have changed your forum URL. Try uploading tools.php from the do_not_upload folder. Run it, and try updating the cookie info just in case.

Lynne
02-14-2009, 03:35 AM
I'm guessing there is a problem with your header template since this is line 833 in global.php:

eval('$header = "' . fetch_template('header') . '";');

Or, perhaps a plugin that is eval in that template? Have you tried disabling your plugins?

TigerC10
02-14-2009, 03:40 AM
Good call, Lynne. I like that idea more than mine now. Unfortunatly, he can't get into the AdminCP to resolve the issue... I wonder how to solve this.

Ohiosweetheart
02-14-2009, 03:49 AM
Lynne I have tried to disable the plugins by typing
define('DISABLE_HOOKS', true); in the config file under <?php
but that's not working either

Lynne
02-14-2009, 03:55 AM
"He" is a "she". :D

The plugins can be disabled through the config.php file.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

edit: I didn't see that you posted when I was posting... did you try also removing any files that are not standard vb files that may be getting 'called' in one of your templates?

TigerC10
02-14-2009, 04:00 AM
"He" is a "she". :D

My bad! I meant no offense! >.< I just didn't check on the profile.

The only way I can see fixing this error is to get the default header template and update it manually in the database.

Here's the default code, as for manually updating it in the database... There are a multitude of ways of doing that.

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>
</td>
</tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]

Ohiosweetheart
02-14-2009, 04:00 AM
yikes, I don't know how to figure out which one that would be :(

btw thanks so much for your ongoing help here Lynne.

--------------- Added 1234591445 at 1234591445 ---------------

and no offense taken Tiger!

--------------- Added 1234591485 at 1234591485 ---------------

omg I SO don't want to mess with the database if I don't have to.

TigerC10
02-14-2009, 04:08 AM
Here's the SQL syntax you should use:

UPDATE vb_template set template="{Insert header code from my previous post here}" where title="header";

The "vb_" is your table prefix, delete/change as necessary.


Or if you have phpMyAdmin installed (most people do) you won't need the SQL code - you just need to go to the template table, and search for all of the templates where the title is "header".

Lynne
02-14-2009, 04:09 AM
Are you sure you can't get into your admin cp directly? The admin cp doesn't use templates or the global.php file.

Ohiosweetheart
02-14-2009, 04:16 AM
no ma'am. When you login to the acp, your confirmation page uses the style that is your default. That's what this is doing, hence the errors. I know it has to do with that style. It's an old style. 3.5.4

Is there no way to disable a style without going into the acp?

Lynne
02-14-2009, 04:21 AM
Oh boy.... um..... I don't know? I'm not thinking 100% right now (kinda sick and tired also). Have you ever used tools.php? I'm wondering if that would help here. I think you can change to a totally default style using that, but to be honest, I've never had to use it.

TigerC10
02-14-2009, 04:22 AM
Are you sure you can't get into your admin cp directly? The admin cp doesn't use templates or the global.php file.

It uses your style in the redirect page, I'm sure you've seen it. It's really only noticible when you use a drastically different background in your style (like black).

Oh boy.... um..... I don't know? I'm not thinking 100% right now (kinda sick and tired also). Have you ever used tools.php? I'm wondering if that would help here. I think you can change to a totally default style using that, but to be honest, I've never had to use it.

Yeah, I've only ever used tools.php to reset cookie data.

Ohiosweetheart
02-14-2009, 04:25 AM
I've used tools.php once. You think I can change to the totally default style using tools? I'll try it. Where do I upload it to?

Lynne
02-14-2009, 04:26 AM
You upload it to your admin cp folder, I believe.

Just looked and there is a style option - "This will take the latest style from ./install/vbulletin-style.xml" However, after I selected that, I still had to login. So, perhaps that won't do what you want.

Put in a Support Ticket?

TigerC10
02-14-2009, 04:30 AM
Actually, you upload it to /install - I was surprised when it didn't work in the AdminCP directory.

It tells you if you uploaded it to the wrong place though.

Ohiosweetheart
02-14-2009, 04:32 AM
I'll have to put in a support ticket I'm thinking. Altho they may not want to help since the issue is with a non-default style?

Thank you both for trying to help. This has me stumped. I've never ever had this issue with an upgrade before. I do them all the time.

TigerC10
02-14-2009, 04:35 AM
I do them all the time.

Obviously not, since you were upgrading from 3.5.4 to 3.8.1. :p


Although, you upgraded, your templates are not updated - this is to avoid breaking a template's look. You have to perform a "reversion" to update the templates. If you don't revert the templates, you can get stuck in this mess. With such a drastic update, I'm not surprised that you lost some functionality from the templates not having been updated properly.

Ohiosweetheart
02-14-2009, 04:38 AM
LOL yes this is the 5th upgrade I've done this week. I do them quite frequently. This is not my forum, it's a new clients' forum, and a very old style.
I do know about reverting templates. etc. However. if I can't get into the acp, I can hardly revert them, can I ;)

TigerC10
02-14-2009, 04:40 AM
^_^ That figures.

Well, you can always do the database query I gave you.

Ohiosweetheart
02-14-2009, 04:49 AM
Thanks for your efforts Tiger!

Dismounted
02-14-2009, 11:16 AM
You can disable logging in to fix it up first. Make sure you have at least .htaccess authentication up though.

In /admincp/global.php, find:
// ############################################ Start Login Check ####################################
Remove everything in between that and:
if (file_exists(DIR . '/includes/version_vbulletin.php'))
Make sure you reupload global.php afterwards.

Ohiosweetheart
02-14-2009, 01:02 PM
THanks but I'm not touching the database. The owner has opened a support ticket at vb.com.

Thank you Dismounted :)

Lynne
02-14-2009, 03:42 PM
Good to know, Hanson! :up:

Peggy, it will be interesting to know what the solution is to your problem on that site (if they are told by the vb team).

Ohiosweetheart
02-16-2009, 06:07 AM
Lynne it was indeed a corrupted header template. The style was so old that it wasn't compatible with 3.8.1.

Jake Bunce had us do this -
It looks like your header is corrupt. Try running this query on your
database to delete the header template:

DELETE FROM template
WHERE title = 'header'

Then run the "install/upgrade.php" file to completion. That will
rebuild the header with the default template.


It worked, and of course the client can't use that style. I feel bad about that, but there's nothing I could do.

Thanks again for your help y'all!