Step 8: GalleryStorageExtras could not be converted to string

lojza

Joined: 2010-03-20
Posts: 7
Posted: Sat, 2010-03-20 17:32

Hi,
I'm getting following error during installation, in step 8 I get
Catchable fatal error: Object of class GalleryStorageExtras could not be converted to string in /usr/share/gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 98
Versions of software and install log are bellow.
Thanks for help in advance


Gallery version: 1.3.0.1
PHP version: 5.3.2
Webserver: Apache/2.2.14
Database: mysqli 5.1.44
Operating system: Linux, FC13


2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Clear the cache directory
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/srv/gallery2/bobes//cache/entity)
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/srv/gallery2/bobes//cache/theme)
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/srv/gallery2/bobes//cache/module)
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/srv/gallery2/bobes//cache/derivative)
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] [1269105377] can't guarantee 180 -- extending!
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Check if the persistent storage is installed
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] <hr />
(mysqli): SHOW TABLES &nbsp;
<hr />

2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Load core module
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Loading plugin core
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Class not defined, trying to include it.
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/usr/share/gallery2/modules/core/module.inc)
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] core plugin successfully instantiated
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Hand over admin user parameters
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] NOT installing, rollback!
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] file_exists(/srv/gallery2/bobes/versions.dat)
2010-03-20 18:16:17 [TMP_SESSION_ID_DI_NOISSES_PMT] Error: Core module is only partially installed

 
iqpascal

Joined: 2010-03-22
Posts: 1
Posted: Mon, 2010-03-22 09:33

While googling on this error i found this topic:

I am getting the same error:

Catchable fatal error: Object of class GalleryStorageExtras could not be converted to string in /web/raymond/content/lib/adodb/drivers/adodb-mysqli.inc.php on line 98

Gallery version: 2.3.1
PHP version: 5.3.2
Webserver: Apache/2.2.15
Database: mysqli 5.1.44
Operating system: Ubuntu

No problems installing the latest Gallery 3 RC1

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2010-03-22 15:15

How did you guys install/upgrade Gallery? Did you use apt-get or what ever package manager is on your distro?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
lojza

Joined: 2010-03-20
Posts: 7
Posted: Wed, 2010-03-24 11:31

It was installed via yum (similar as apt-get on Debian), but I've also tried to install gallery-2.3.1 from sources downloaded from http://codex.gallery2.org/Gallery2:Download, getting the same error. The most strange thing is that one week ago I've installed it without any problems (it was just a test installation if it would suit my needs). There was no system update since this installation, I only removed gallery2 database from mysql and test data. Start to install gallery2 from scratch again and I've obtained this error. I expect that there is some problem in my mysql (as in the middle of filling gallery2 table rolback is called), but cannot figure out what kind of problem it can be.

 
lojza

Joined: 2010-03-20
Posts: 7
Posted: Wed, 2010-03-24 12:22

I forgot to paste tail of database filling log, here it is:

2010-03-24 13:12:11 [TMP_SESSION_ID_DI_NOISSES_PMT] <hr />
(mysqli): SELECT g2_Schema.g_info FROM g2_Schema WHERE g2_Schema.g_type = 'map' &nbsp;
<hr />

2010-03-24 13:12:11 [TMP_SESSION_ID_DI_NOISSES_PMT] <hr />
(mysqli): INSERT INTO g2_PermissionSetMap (g_module, g_permission, g_description, g_bits, g_flags) VALUES ('core','core.delete','[core] Delete item',128,0) &nbsp;
<hr />

2010-03-24 13:12:11 [TMP_SESSION_ID_DI_NOISSES_PMT] Call user func _createAccessListCompacterLock
2010-03-24 13:12:11 [TMP_SESSION_ID_DI_NOISSES_PMT] getParameter id.accessListCompacterLock for core plugin
2010-03-24 13:12:11 [TMP_SESSION_ID_DI_NOISSES_PMT] <hr />
(mysqli): ROLLBACK &nbsp;
<hr />

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6136
Posted: Wed, 2010-03-24 13:06
Quote:
Catchable fatal error: Object of class GalleryStorageExtras could not be converted to string in /usr/share/gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 98

means that an error string was received instead of the required object.
likely a database permissions error

make sure DB user, host and pass are correct. make sure DB user has permissions to create tables ect.

and start with a clean empty DB if possible.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2010-03-24 15:48
Quote:
It was installed via yum

<rant>Ugh, yeah, the package maintainers (across damn near ALL distros) don't seem to install or test Gallery at all, they just package it up and let everything fall where it may, breaking most of the time of the time. And even if you get it working via a distros package, you'll be guaranteed a broken install at tome point in the future when your packaging system decides to upgrade Smarty or something else that's in conflict with Gallery.</rant>

Try suprsidr's advice and if things still don't work, uninstall Gallery using yum and then download and install it manually.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
lojza

Joined: 2010-03-20
Posts: 7
Posted: Wed, 2010-03-24 21:05

well, I removed gallery2 installed via yum and downloaded gallery 2.3.1. again. During the installation I'm getting the same error:-(
As for database permissions: I've started with empty db, 43 tables were created, so obviously db user has permissions to create tables. The db rights are granted by following command:
grant all privileges on gallery2 to 'gallery2'@'localhost' identified by 'somePassword';
which is IMHO correct

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2010-03-24 22:03

Can you zip and attach the entire install log? It's located in your g2data directory.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
lojza

Joined: 2010-03-20
Posts: 7
Posted: Thu, 2010-03-25 09:50

ok, it's in attachment
thanks for help

AttachmentSize
install_45492c0e97.log_.zip22.82 KB
 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Thu, 2010-03-25 16:13

dang it, I was hoping that would give a bit more of a clue, some error thrown in the middle or something. But nothing.

First thing I'd try, is when installing, install as FEW modules and themes as possible.

If that doesn't work, then can you either post a link to phpinfo or print your phpinfo page to PDF and post that?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
lojza

Joined: 2010-03-20
Posts: 7
Posted: Thu, 2010-03-25 20:39

exactly. that was the reaoson I've posted the problem here - I had no idea were the problem could be and I was hoping that I would get some hitns here:-) Can I somehow switch on some more debug messages? I've tried to setup $gallery->setDebug('immediate'); in config.php, but nothing has changed:-(
As for modules: how can I set-up modules? The installation crashs in step 8 when core is installed, choice and installation of modules are done AFAIK in step 9.
As for phpinfo - my bet is that there is some problem in mysql or apache setting. I'll take a look on it (hopefully) over the weeknd and if I don't sucessed I'll post my phpinfo here.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6136
Posted: Thu, 2010-03-25 20:46

Andy would probably know off the top of his head.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
lojza

Joined: 2010-03-20
Posts: 7
Posted: Sat, 2010-03-27 01:09

well, I did some debug...
in $GALLERY2_ROOT/lib/adodb/drivers/adodb-mysqli.inc.php line 98
mysqli_options($this->_connectionID,$arr[0],$arr[1]);
has to replaced by
mysqli_options($this->_connectionID,$arr[0],$arr[1][0]);
For some reason, expected parameter MySqlStorage is wrapped by GalleryStorageExtras, which cases the fail.

I guess, that this holds in some specific cases only: I installed gallery2 without any problems one week ago and on my laptop as well (with no need to do any changes in the code). Unfortunately, I don't have enough time to do some detail analysis.

Thanks all of you for hints.

 
john123456

Joined: 2010-04-05
Posts: 1
Posted: Mon, 2010-04-05 06:20
lojza wrote:
well, I did some debug...
in $GALLERY2_ROOT/lib/adodb/drivers/adodb-mysqli.inc.php line 98
mysqli_options($this->_connectionID,$arr[0],$arr[1]);
has to replaced by
mysqli_options($this->_connectionID,$arr[0],$arr[1][0]);
For some reason, expected parameter MySqlStorage is wrapped by GalleryStorageExtras, which cases the fail.

I guess, that this holds in some specific cases only: I installed gallery2 without any problems one week ago and on my laptop as well (with no need to do any changes in the code). Unfortunately, I don't have enough time to do some detail analysis.

Thanks all of you for hints.

so does it works ?

 
umpire

Joined: 2010-04-05
Posts: 1
Posted: Mon, 2010-04-05 19:13
john123456 wrote:
lojza wrote:
well, I did some debug...
in $GALLERY2_ROOT/lib/adodb/drivers/adodb-mysqli.inc.php line 98
mysqli_options($this->_connectionID,$arr[0],$arr[1]);
has to replaced by
mysqli_options($this->_connectionID,$arr[0],$arr[1][0]);
For some reason, expected parameter MySqlStorage is wrapped by GalleryStorageExtras, which cases the fail.

I guess, that this holds in some specific cases only: I installed gallery2 without any problems one week ago and on my laptop as well (with no need to do any changes in the code). Unfortunately, I don't have enough time to do some detail analysis.

Thanks all of you for hints.

so does it works ?

I had the same. The suggested modification of line 98 did 'the trick' for me for ver 2.3.1

 
pdpalmer

Joined: 2007-06-28
Posts: 3
Posted: Sun, 2010-05-02 08:27

I tried the edit suggested and it did not work. Line 98 doesn't even hold the line mentioned, I found it on line 80 something, and made the change. It did not work.

Again,

Here is the error I'm seeing

Error: Gallery2 cannot be initialised
Check to ensure Gallery2 is correctly working and revalidate.

Catchable fatal error: Object of class GalleryStatus could not be converted to string in /home/maria/public_html/wp-content/plugins/wpg2/wpg2validate.inc on line 350

 
piousbox

Joined: 2010-05-02
Posts: 5
Posted: Sun, 2010-05-02 21:52

<rant>I hate registering for a site to post a single comment! I'm likely never going to post on this site again, isn't one captcha enough to prevent most spam?</rant>

Gallery3 didn't work for me so I'm switching back to gallery2. How do I upload files from local ftp server in gallery3? That was my problem with it. Anyway.

The above modification to line 98 worked for me. Mister pdpalmer, perhaps you're using a different version of gallery2 so that line is in a different place. Start over, and note where gallery2's install tells you the error is. Right now, it tells you the error is on line 350 of... wp-content/plugins/...? You're trying to integrate it with wordpress then? Try installing it standalone, or look at what's contained on line 350 of wpg2validate.inc . Try making suggested modification to line 350. You can examine each object in question by typing something like:

print_r($object_name);die();

which is a lot of work but may be worth it. Anyway. Good luck.

 
StaNDarD

Joined: 2010-05-05
Posts: 1
Posted: Wed, 2010-05-05 18:26
umpire wrote:
john123456 wrote:
lojza wrote:
well, I did some debug...
in $GALLERY2_ROOT/lib/adodb/drivers/adodb-mysqli.inc.php line 98
mysqli_options($this->_connectionID,$arr[0],$arr[1]);
has to replaced by
mysqli_options($this->_connectionID,$arr[0],$arr[1][0]);
For some reason, expected parameter MySqlStorage is wrapped by GalleryStorageExtras, which cases the fail.

I guess, that this holds in some specific cases only: I installed gallery2 without any problems one week ago and on my laptop as well (with no need to do any changes in the code). Unfortunately, I don't have enough time to do some detail analysis.

Thanks all of you for hints.

so does it works ?

I had the same. The suggested modification of line 98 did 'the trick' for me for ver 2.3.1

Works for me too.

 
kiev

Joined: 2007-10-16
Posts: 3
Posted: Thu, 2010-06-24 09:08

I have the same problem now, think I reinstall to new version...

 
Crenel
Crenel's picture

Joined: 2010-06-06
Posts: 6
Posted: Tue, 2010-07-27 07:18

pdpalmer: Your issue (which you may have fixed by now?) appears to be a separate one.

As for "the line 98 fix" it worked for me too. It is a flaw in the code, because (if I'm reading it correctly) it is implicitly specifying the first (0th) element in an array, which should be specified explicitly. On some systems this may not cause a visible problem (e.g., if it's masked or if that code isn't executed or whatever), but the flaw remains and should be patched.

I don't see a bug report on this, so I'm going to submit one now.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2010-07-27 15:34

Feel free to file a bug, do note though that development on G2 has ceased and if there is ever another release it will most likely be only if there is a majority security issue found. All active development efforts are currently focused on G3.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Dayo

Joined: 2005-11-04
Posts: 1295
Posted: Tue, 2010-07-27 16:24

Yeah only major security issues are likely to be fixed. Still worth filling though as if picked up and pushed into the SVN / nightly (which is still getting built) version now, then it will be there if there is ever a new release as this would form the basis.

--
dakanji.com

 
Crenel
Crenel's picture

Joined: 2010-06-06
Posts: 6
Posted: Wed, 2010-07-28 21:59

Yeah, I figured it might be unlikely to see it fixed. It's unfortunate, though, because this can be a show-stopper for G2 installation, and not everybody is going to be keen on G3. (I'm undecided myself.) G1 is apparently still available for download and use, right? (I've never tried it.) If G2 is also kept around, it should at least be installable without needing an obscure code fix.

Anyway, I filed the bug report -- hopefully did it right, have not filed one before. :/

 
iamobama
iamobama's picture

Joined: 2010-07-29
Posts: 1
Posted: Thu, 2010-07-29 08:34

me too! How did you make it word at the end?

 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 97
Posted: Thu, 2010-07-29 20:28
Quote:
in $GALLERY2_ROOT/lib/adodb/drivers/adodb-mysqli.inc.php line 98
mysqli_options($this->_connectionID,$arr[0],$arr[1]);
has to replaced by
mysqli_options($this->_connectionID,$arr[0],$arr[1][0]);

I had same error and this bug fix worked for me also perfectly.
tks.

amazingly, last night I made an upgrade from 2.1.1.a to 2.3.1 with no (such) error at all. ( but after a full successful upgrade i had a cycling URL problem with index.php that i could not solve ) hence i decided to make a clean install - with this error.

hans