Deprecated: Function ereg() is deprecated in /home/

BlackPanda

Joined: 2005-03-25
Posts: 49
Posted: Sat, 2012-07-14 05:08

The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version: 1.5.1, I think, that is what one of the files said in my gallery. Where do I find the version?
Apache version: 2.2.21
PHP version (don't just say PHP 4, please): 5.3.9
Graphics Toolkit: How do I find out?
Operating system: Linux
Web browser/version (if applicable):

I moved my perfectly working gallery from one hosting co. to another. After moving I got a half a page of text like this:

Deprecated: Function ereg() is deprecated in /home/...../public_html/....../gallery/classes/AlbumDB.php on line 76

Any ideas how to fix it or suggestions for maybe an easy upgrade to a newer version of Gallery?

I would prefer to fix my gallery first, then upgrade, so I have a good working gallery in case something goes wrong in the upgrade.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2012-07-14 17:45

This is because G1 was written for PHP 4 while your new host uses PHP 5.3.9.

The "ereg" function, along with a few others, was deprecated as from PHP 5.3.0.
What you see are warning messages that these functions will be removed from PHP sometime in the future.

Your choices are

1. Ask your host to switch off these warning messages which can be done in the PHP server settings. If they do, everything will work as normal but the whole site will break completely once they upgrade PHP at some point. I can't imagine a responsible host just making such an upgrade willy nilly and this major upgrade is probably a while away anyway.

2. Update the entire G1 to remove these deprecated functions

3. Migrate to the G2 or G3 streams. G2 was similarly updated in the v2.3.1 release and G3 was written for PHP 5.3.0 to start with. Both streams have migration tools to help move from G1.

*** EDIT ***
Some of the deprecated functions have already started to be removed as of PHP 5.4.0

--
dakanji.com

 
BlackPanda

Joined: 2005-03-25
Posts: 49
Posted: Sat, 2012-07-14 13:27

How do I find out for sure which version I have? So, I can make the decision as to whether I need to upgrade v1 or upgrade to 2 or 3.

Thank you for your explanation, very much appreciated!

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2012-07-14 14:33

No idea. I have never used G1.

The last release however, probably best for migration, can be found here: http://sourceforge.net/projects/gallery/files/gallery/1.5.10

For G1 to G2 Migration: http://codex.gallery2.org/Gallery2:migration
For G1 to G3 Migration: http://gallery.menalto.com/node/102190

--
dakanji.com

 
BlackPanda

Joined: 2005-03-25
Posts: 49
Posted: Sun, 2012-07-15 14:28

I decided I would upgrade to gallery 2, but I am unable to login to gallery. I'm guessing because of all the Deprecated Functions.

How do I upgrade if I can't login to my gallery?

Is it possible to upgrade to version two without Pre-Migration Prep?

 
BlackPanda

Joined: 2005-03-25
Posts: 49
Posted: Sun, 2012-07-15 19:45

Ok, I installed version 2 and I'm getting this message:

Error (ERROR_MISSING_VALUE)

in modules/migrate/classes/Gallery1DataParser.class at line 72 (GalleryCoreApi::error)
in modules/migrate/classes/Gallery1DataParser.class at line 225 (Gallery1DataParser::loadFile)
in modules/migrate/classes/Gallery1DataParser.class at line 109 (Gallery1DataParser::loadAlbumFields)
in modules/migrate/ChooseObjects.inc at line 260 (Gallery1DataParser::getAlbumList)
in modules/migrate/ChooseObjects.inc at line 213 (ChooseObjectsView::_createG1AlbumTree)
in modules/core/SiteAdmin.inc at line 201 (ChooseObjectsView::loadTemplate)
in modules/core/classes/GalleryView.class at line 300 (SiteAdminView::loadTemplate)
in main.php at line 445 (GalleryView::doLoadTemplate)
in main.php at line 94
in main.php at line 83

I read on another post that albums owned by admin can't be imported. Is this correct? If so, why not? And how do I import my albums then?