[SOLVED] G2B2 upgrade problem - php code output to browser!

RobFerrer

Joined: 2005-03-10
Posts: 33
Posted: Mon, 2005-04-25 16:13

Hi

Recently updated from G2 B2 from G2B1. Upgrade seemed to go fine, but now every page has
if (isset($itemId)) { $params['itemId'] = $itemId; } return array(GalleryStatus::success(), $urlGenerator->generateUrl($params)); } } ?>

at the top of it, and

@import url(<br />
<b>Notice</b>:  Undefined index:  layoutUrl in <b>/usr/home/robferrer/g2data/smarty/templates_c/%%2299673284/%%C4^C48^C480921F%%head.tpl.php</b> on line <b>9</b><br />
/layout.css.php);

in the <style> tag.

Have enabled debug on the gallery, but I am not yet used to it enough to work out what it all means!

Any help would be apreciated.

Thanks

Rob

----

Gallery URL (optional): http://www.robferrer.co.uk/gallery/
Gallery version: 2B2
Webserver (with version): Apache 1.3.31
Datatabase (with version): MySQL 4.0.21
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional): http://www.robferrer.co.uk/printvars/
Graphics Toolkit(s): GD, ImageMagick
Operating system: FreeBSD 4.10
Web browser/version: Firefox 1.0.3
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-04-25 17:21

http://www.robferrer.co.uk/gallery/upgrade/ and make sure in step " System Checks" that no files are missing / modified. and if there are missing/modified files, reupload these files.
you can also try to site admin -> maintenance -> flush template cache, flush db cache.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-25 17:29

at least modules/imageframe/classes/ImageFrameImpl.class is corrupt.. that is one causing the output you see.

 
RobFerrer

Joined: 2005-03-10
Posts: 33
Posted: Tue, 2005-04-26 08:09

Thanks for your help.

I hadn't noticed the integrity checks when I first upgraded - maybe I should pay more attention!

I have re-uploaded a lot of the files that were modified (there were a lot!), but it still says there are 20 modified files. These are .po and .mo language files (none are en-GB), makefiles and test.eps. Whether I upload them as ASCII or binary I still can't get them to be accepted.

I am now getting a different error: every page has this php code at the top:

Result() {
	return $this->_recordSet->FetchRow();
    }
}
?>

and the installer has this:

] = 'AuthenticateRequest.html';
	}
    }
}
?>
Result() {
	return $this->_recordSet->FetchRow();
    }
}
?>

The other symptom is that no photos are displayed except gallery highlights!

I have tried all the maintenance options and it makes no difference.

Sorry if it is me being stupid!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-04-26 15:09

grep -rl "_recordSet->FetchRow" .

this shows that modules/core/classes/GalleryStorage/DatabaseSearchResults.class is corrupt.

 
RobFerrer

Joined: 2005-03-10
Posts: 33
Posted: Tue, 2005-04-26 18:20

Thanks

I did a similar thing for some code displayed in the upgrader.

Neither of the files were found to be incorrect by the upgrader - does it just check sizes? Anyone know why I have been getting so many corrupted files? Does anyone else have similar problems?

One tiny problem I still have, which may have been present on previous versions, is that on the left hand menu, sub-albums (and presumably items), that have an apostrophe(') in them show '. It looks like the character is being encoded twice. Do other people get that, or is it an error in my installation. I may have a look in the code and see if I can find it.

Thanks everyone for your help. Gallery is a great piece of software.

Rob

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-04-26 19:12

it does only check size, although the MANIFEST files do contain checksums.
we decided it was too much of a performance hit to load the contents of every single file and calculate checksums during the install/upgrade.
perhaps we can add a manifest check in Site Admin / Maintenance that does the checksum check...

 
RobFerrer

Joined: 2005-03-10
Posts: 33
Posted: Wed, 2005-04-27 07:22

I thought that would be the case. I imagine a size check would be fine in the majority of cases. For some reason I seem to have got loads of corrupted files that have remained the same size! An extra option might be a good idea if the data is already there.