"Deprecated" error - unsure how to proceed.

skiesclear

Joined: 2007-02-03
Posts: 36
Posted: Tue, 2012-09-11 23:08

My gallery has been working fantastically for years, which is probably why I did not update it as often as I should have. It is still version 2.1, and one day, it came up with this:

Deprecated: Assigning the return value of new by reference is deprecated in /home/content/f/e/r/ferahga/html/index.php on line 47

Deprecated: Assigning the return value of new by reference is deprecated in /home/content/f/e/r/ferahga/html/bootstrap.inc on line 43

I'm not very technical. My site is hosted by GoDaddy, which I realize is not the most popular around here, but I've really had no issues that I know of with them. I'm unable to provide the usual G2/System Information, because I cannot get past the "deprecated" screen, so here is what I've tried so far.

-backed up my db
-backed up my g2data folder

-attempted to "upgrade gallery" through GoDaddy, which of course failed.
-attempted to "restore" through GoDaddy, which of course failed.
-read documentation on upgrading from 2.1, to 2.2.6, to 2.3.1 before trying to get to 3. I am able to go through the install, and can come up with a fresh, empty version of Gallery, but cannot get my backed-up data into it. It seems to install it in a place other than my root directory.
-called GoDaddy, who said the problem was that my PHP version was no longer supported, and so I updated to PHP 5.3.
-deleted my old 4.0 SQL db and created a new one (5.0), and imported my backup into it. It's there, changed config.php to point to it.. still no luck.

Because I don't know why it broke to begin with, and I don't have a working copy of 2.1 anymore to migrate to later versions, I'm at a loss. I've scoured the forums and this is the closest thread to my problem that I could find: http://gallery.menalto.com/node/108084 , I'm still unsure how to proceed.

Thanks in advance for any thoughts or ideas.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2012-09-12 00:45
skiesclear wrote:
I don't know why it broke to begin with

Sounds like it's because: "the problem was that my PHP version was no longer supported, and so I updated to PHP 5.3." It's not uncommon for some things to be deprecated in newer php versions. You (or your hosting provider) can sometimes just suppress the errors and everything will work again.

If you don't have a lot of user-entered data that you care about (eg comments) you can install a new version of Gallery3 (without deleting your G2), then use the G3 serveradd module to import the G2 photos.

The other option is to make modifications to the G2 code to work around any deprecated functions.

 
skiesclear

Joined: 2007-02-03
Posts: 36
Posted: Wed, 2012-09-12 16:24

Thanks for your help! The deprecated error occured both before and after the PHP change. I will call the provider and see if they can suppress the errors like you suggested. I liked my comments but I'd rather have the gallery back with or without them, so the serveradd module will be my next step.

Thanks again

 
scoopy

Joined: 2005-03-14
Posts: 19
Posted: Sat, 2012-09-22 01:34

Have also been cruising along for far too long with my G2 setups until recently. I am running two separate galleries and found one was still working while the other was showing the same error:

Quote:
is deprecated in /home/content/f/e/r/ferahga/html/bootstrap.inc on line 43

So I thought I would compare the two bootstrap.inc files... especially line 43:

The working gallery looked like this:

Quote:
$gallery = new Gallery();

While the non-working gallery looked like this:

Quote:
$gallery =& new Gallery();

So I removed that extra & character and it started working again (have no idea why or how)... but both galleries are now working like before except there are still many PHP Deprecated errors that remain and are quickly making for very large error_log files... so I guess its time to tackle some upgrades.

---
Show Me Your Pix and I will show you mine.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2012-09-22 04:17
scoopy wrote:
... I guess its time to tackle some upgrades.

Yes it is. Upgrade to v2.3.2 now.

--
dakanji.com