[RESOLVED] Fatal error: Call to undefined function: init() in /mysite/bootstrap.inc on line 42

01user55

Joined: 2009-03-04
Posts: 44
Posted: Sat, 2012-05-26 08:15


Gallery version : 2.3.0
PHP version : 4.4.9
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):
Database : MySql 5.0.91-log
Activated toolkits : ImageMagic, NetPbm
Operating system : Linux
Browser : Chrome 19.0.1084.46 m

I have a multi-site installation with a core site and 2 more multi-sites (3 galleries in total).
I downloaded the files for Gallery Ver. 2.3.2 and unzipped them, then uploaded them to my core installation and browsed to one of my galleries expecting to get an upgrade screen, but all I saw was a '0' in the top left corner of my screen.

I cmod my config.php file to 644 and my gallery directory to 777 and tried again. Now I got a 500 internal server error, so I tried to find my error log, but there is none available, only an access log. I then chmod recursively all 3 of my g2data directories (there were thousands of files in there!).
Nothing changed, so I tried browsing to upgrade/index.php directly and I got the fatal error message copied to the subject line above.

The upgrade instructions don't mention anything about permissions, but I did read about them in many posts. I can't access my installation to provide the other requested info.

Can I simply copy the original files back to the server to get back to where I was before attempting the upgrade, or will Gallery know that I have removed and then replaced the files?

What am I missing as far as upgrading to the more secure version (2.3.2)?

Thanks for any assistance you can provide!

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2012-05-26 08:49

If the version you had before was earlier than 2.2.6, then you should roll back to that version from your backup and upgrade to 2.2.6 first, make sure that is working fine, take a backup and upgrade from 2.2.6 to 2.3.2.

--
dakanji.com

 
01user55

Joined: 2009-03-04
Posts: 44
Posted: Sat, 2012-05-26 15:34
Dayo wrote:
If the version you had before was earlier than 2.2.6, then you should roll back to that version from your backup and upgrade to 2.2.6 first, make sure that is working fine, take a backup and upgrade from 2.2.6 to 2.3.2.

--
dakanji.com

Thanks for offering a suggestion Dayo, but as indicated by the information submitted using the form, I am attempting an upgrade from version 2.3.0. I wish I knew which files were new, then I could upload ONLY the changed files. Normally, Gallery supplies an option to upload and replace with a package of changed files ONLY, but this time we are only offered complete packages. I chose a minimal package, but originally upgraded from version 1 to 2 with a full package. I don't think that would make a difference (would it) since the minimal package would contain all the required new files.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2012-05-26 17:05

Right. Well the form is supposed to show your current version and since you didn't explicitly state which version you were upgrading from, I couldn't tell exactly.

Anyway, G2.3.0 to G2.3.2 should not cause any issues and if you are getting the error message in your title, it means perhaps you missed out some files when overwriting as "init" is a core function that should be in every G2 installation ... even 2.3.0 and the error message is saying the it can't be found (I.E., the file containing it is missing).

You can try copying the file set again and having another go. If this fails, roll back to yesterday's backup of your site which should put everything back alright and try again, making sure you copy over the full file set.

Not all G2 upgrades involve a small subset.
G2.3.1 to 2.3.2 has a small subset but there were too many files changed between 2.3.0 and 2.3.1 so to go to 2.3.2 from 2.3.0, you need to do the full overwrite.

--
dakanji.com

 
01user55

Joined: 2009-03-04
Posts: 44
Posted: Sun, 2012-05-27 02:42

Thanks Dayo!
I uploaded the themes folder and contents and it now works. I was under the impression that the themes files would all still be the same, but obviously not! It helps to have people in the know like you around that are willing to share your expertise and help those who don't understand what all these error messages mean and what functions Gallery is looking for. I made some custom navigational links in my gallery installations and didn't want to lose the customization, so was reluctant to overwrite the themes. In my searches, I did find some links to plug-ins that create links for you, so I will list them here for the benefit of anyone who may find this post with a similar situation as mine. (I have not tested my galleries yet, but have seen the main page for each.)

codex.gallery2.org/Gallery2:Modules:linksinhead is an application for making header links.
gallery.menalto.com/node/47277 has HTML code for side and top links.
gallery.menalto.com/node/38876 talks about creating a 'local' directory for storing custom files.