Segmentation Fault when installing on fc12
wazh
Joined: 2009-12-24
Posts: 18 |
Posted: Thu, 2010-04-08 13:22 | |||
Hi, I am having some problems installing gallery2.3.1 from yum on fc12. I have the following packages installed. Gallery2 2.3.1-1.fc12 Please find attached install log. Please help. Thanks
|
||||
Posts: 16504
Apparently it's a known bug in PHP.
Try some stuff here:
http://gallery.menalto.com/node/95244
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
Hi,
Thanks for the response. I had tried the zend.enable_gc=Off however this didnt work. I will try hacking the main.php code and see how I go.
Edit: Still no go with adding the exit at the end of main.php.
Edit: I downgraded php to 5.3.0 and received a new error as part of the install.
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
Warren
Posts: 16504
Is that with Gallery 2.3.1? And try getting Gallery from this site instead of Fedora's repositories.
Try downgrading to PHP 5.2.x
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
Hi,
Thanks for the response. Yes this is gallery 2.3.1. However it is from the fedora repo. Will give it a try from this site.
OK tried it from this site. Appears to be same error.
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
Will look at downgrading the php.. Will need to find a repo that has it as the fedora ones dont appear to.
Thanks again.
Posts: 1642
wazh
Please add "var_dump($this->optionFlags)" to Line 96 of "gallery2/lib/adodb/drivers/adodb-mysqli.inc.php" and paste the output here after running the same steps.
Also do you have any php accelerators installed?
--
dakanji.com
Posts: 18
All done.. However new error.
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 99
These are the changes made.
/*
I suggest a simple fix which would enable adodb and mysqli driver to
read connection options from the standard mysql configuration file
/etc/my.cnf - "Bastien Duclaux" <bduclaux#yahoo.com>
var_dump($this->optionFlags)
*/
foreach($this->optionFlags as $arr) {
mysqli_options($this->_connectionID,$arr[0],$arr[1]);
}
Posts: 1642
wazh
Sorry. It should have gone into Line 97.
Change it to:
Copy and paste the output here afterwards.
PS. Do you have any php accelerators installed?
--
dakanji.com
Posts: 18
oooop sorry I started a reply on that. No Accelerators installed.
Still a no go..
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
Posts: 1642
wazh
Can you also run "php -v" from your commandline and paste the output?
--
dakanji.com
Posts: 18
will get back and check. But pretty sure I downgraded it to 5.3.0 which is what was in the fedora repos
Posts: 1642
wazh
Something not right with your previous post. The error should be on Line 99 if you introduced an extra line into the file.
Also, there has to be some sort of output before the error notice if var dump has run.
Please recheck and make sure you are not getting a cached response or similar.
Remember to paste the output from php -v separately as well
--
dakanji.com
Posts: 18
Ok I was wrong..
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php.ini on line 264 in Unknown on line 0
PHP 5.3.2 (cli) (built: Mar 6 2010 08:33:19)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
It appears I did downgrade it however because when I did that it removed roundcube/mediawiki/wordpress etc that when those got re-added later its upgraded it back to the above version
Posts: 1642
No problem.
Now rerun and make sure the var dump line is included in Line 97 as shown earlier so we can find out what exactly is in your optionflags array.
--
dakanji.com
Posts: 92
I have encountered the same error message but on a different distro. Running a test box for eBox version 2 on Ubuntu Lucid Beta 1 with PHP 5.3.2 and Apache 2.2.14 I get the following error message in the install core section "Catchable fatal error: Object of class GalleryStorageExtras could not be converted to string in /var/www/gallery/lib/adodb/drivers/adodb-mysqli.inc.php on line 98" . No optimizers installed just plain simple PHP 5.3.2.
Used latest nightly from gallery2.hu
The modifications suggested in another post made no difference.
Latest install log attached.
Posts: 1642
If you want to make a useful contribution (since wazh has decided to simply walk away) add the var dump line requested above and post the output.
--
dakanji.com
Posts: 92
Maybe not what you expected but following the changes to adodb-mysqli.inc.php and restarting the install process I din't get beyond the datbase creation. Tried with clearing the g2data directory but no processing beyond step 5, database creation.
Posts: 1642
mervyngroves
Please makes sure there is a ";" after the addition as in "var_dump($this->optionFlags);"
--
dakanji.com
Posts: 92
Yes missing ;
Results of var_dump
array(1) { [0]=> array(2) { [0]=> int(5) [1]=> &object(GalleryStorageExtras)#24 (1) { ["_gs"]=> object(MySqlStorage)#21 (16) { ["_db"]=> object(ADODB_mysqli)#22 (88) { ["databaseType"]=> string(6) "mysqli" ["dataProvider"]=> string(6) "native" ["hasInsertID"]=> bool(true) ["hasAffectedRows"]=> bool(true) ["metaTablesSQL"]=> string(11) "SHOW TABLES" ["metaColumnsSQL"]=> string(22) "SHOW COLUMNS FROM `%s`" ["fmtTimeStamp"]=> string(13) "'Y-m-d H:i:s'" ["hasLimit"]=> bool(true) ["hasMoveFirst"]=> bool(true) ["hasGenID"]=> bool(true) ["isoDates"]=> bool(true) ["sysDate"]=> string(9) "CURDATE()" ["sysTimeStamp"]=> string(5) "NOW()" ["hasTransactions"]=> bool(true) ["forceNewConnect"]=> bool(true) ["poorAffectedRows"]=> bool(true) ["clientFlags"]=> int(0) ["substr"]=> string(9) "substring" [
Posts: 18
Sorry guys. Fell asleep and then dragged myself to bed.
Fixed the ; problem and got the following results.
--------------------------------------------------------------------------------
(mysqli): SHOW TABLES
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): CREATE TABLE gtst0Schema( g_name varchar(128) NOT NULL, g_major int(11) NOT NULL, g_minor int(11) NOT NULL, PRIMARY KEY(g_name) ) /*!40100 DEFAULT CHARACTER SET utf8 */
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): INSERT INTO gtst0Schema ( g_name, g_major, g_minor ) VALUES('Schema', 1, 0)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): ALTER TABLE gtst0Schema ADD COLUMN g_testCol varchar(128), ADD INDEX gtst0Schema_18169(g_testCol)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): UPDATE gtst0Schema SET g_major=1, g_minor=1 WHERE g_name='Schema' AND g_major=1 AND g_minor=0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): ALTER TABLE gtst0Schema DROP INDEX gtst0Schema_18169
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): UPDATE gtst0Schema SET g_major=1, g_minor=2 WHERE g_name='Schema' AND g_major=1 AND g_minor=1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): DROP TABLE gtst0Schema
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): create table gtst0g2privtestseq (id int not null)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): insert into gtst0g2privtestseq values (0)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): drop table gtst0g2privtestseq
--------------------------------------------------------------------------------
array(1) { [0]=> array(2) { [0]=> int(5) [1]=> string(-804796824) " Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3490181121 bytes) in /usr/share/gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 97
Posts: 1642
OK cheers.
Totally inconsistent results ... mervyngroves' post looks incomplete.
Impossible to really tell what is happening.
wazh
It looks like you need to allocate more memory to php. Have a look at allocating more in your php.ini
Info passed to the devs. Hopefully one of them can stay away from charms of G3 long enough to offer a fix.
--
dakanji.com
Posts: 18
HI Dayo,
Many Thanks.. Will give that a go.. I have a couple of hours before I crash..
Posts: 18
Ok increased the size. However it appears it wanted even more.
--------------------------------------------------------------------------------
(mysqli): SHOW TABLES
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): CREATE TABLE gtst0Schema( g_name varchar(128) NOT NULL, g_major int(11) NOT NULL, g_minor int(11) NOT NULL, PRIMARY KEY(g_name) ) /*!40100 DEFAULT CHARACTER SET utf8 */
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): INSERT INTO gtst0Schema ( g_name, g_major, g_minor ) VALUES('Schema', 1, 0)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): ALTER TABLE gtst0Schema ADD COLUMN g_testCol varchar(128), ADD INDEX gtst0Schema_18169(g_testCol)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): UPDATE gtst0Schema SET g_major=1, g_minor=1 WHERE g_name='Schema' AND g_major=1 AND g_minor=0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): ALTER TABLE gtst0Schema DROP INDEX gtst0Schema_18169
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): UPDATE gtst0Schema SET g_major=1, g_minor=2 WHERE g_name='Schema' AND g_major=1 AND g_minor=1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): DROP TABLE gtst0Schema
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): create table gtst0g2privtestseq (id int not null)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): insert into gtst0g2privtestseq values (0)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysqli): drop table gtst0g2privtestseq
--------------------------------------------------------------------------------
array(1) { [0]=> array(2) { [0]=> int(5) [1]=> string(-247773448) " Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 4047196161 bytes) in /usr/share/gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 97
Posts: 92
Went for a complete re-install again, created data directory in /var/www this time and the installation was completed. However the following merror message is all that appears when accessing the gallery /gallery/main.php.
array(1) { [0]=> array(2) { [0]=> int(5) [1]=> int(0) } } array(1) { [0]=> array(2) { [0]=> int(5) [1]=> bool(true) } }
Posts: 1642
mervyngroves
You should be fine after removing the var dump line.
Notice you are on Ubuntu while the others are on F12. Probably related.
--
dakanji.com
Posts: 18
Messed around a little. No Joy. It looks like I am out of the water till one of the dev's comes up with a fix.
Thanks guys for all your input its been appreciated.
Warren
Posts: 92
Likewise here, no joy. Started with fresh installation and same error resulted. I've attached the var_dump content just in case someone might recognise the problem. However I have ot come to the conclusion that the current version of gallery2 is not compatible with php 5.3.2. I have had no issues with any installation up to this release of php. I will revert to ealier versions and hope that a solution will be forthcoming.
Posts: 18
I would love to go back but it would be too much work. There are too many packages tied in and I would have to manually install them all.
Anyway sit back with the gallery down - let the friends and family scream and they can just wait.
Posts: 40
The var_dump you posted are quite different from the expected value.
Could you search for optionFlags in your complete gallery2 directory, like this:
Here's what I get on my install:
As you can see, the only occurences of optionFlags in all the source code I have here are the array definition, on line 52, and it's use on line 97.
Since it's not modified anywhere else in the code, I really don't see why, in your foreach loop, it could have a different value from how it was defined on line 52 (where there is no reference to a GalleryStorageExtras object, in any form...)
If you just want to work around the problem, edit your config.php. Change this:
into this:
This will stop using the file that is causing you issues...
- Guillaume Boudreau
Posts: 3
Hi,
I'm experiencing this issue on CentOS 5.4 with PHP 5.3.2. The workaround (using mysql instead of mysqli) did help.
How can I help you with debugging? I do have some experience with PHP, but I did get incredibly lost in the gallery code during my first attempt to track this down.
Matt
Posts: 40
Just do the grep command I give above, and show me what you get.
- Guillaume Boudreau
Posts: 3
I actually did that and got the same result. I should have written that. But as I didn't touch the code, any other result would have been weird...
I'd dive into the code if you gave me a hint where I should look and/or insert debug outputs...
Posts: 40
You might find something by trying to see where the $this->optionFlags array changes.
Add var_dump($this->optionFlags); lines at line 53, and at the end of the function. Then add it again at the start of the function where the error happens. Compare the results of each var_dump to find where the array change from it's initial value to an array that contains a GalleryStorageExtras object.
- Guillaume Boudreau
Posts: 3
No luck so far. The output of $this->optionFlags looks fine to me. Under normal conditions it's always (at initialization, before and after access) something like this:
When apache crashes, I get a blank page and sadly no debug output at all. I can't even reproduce the output that has been posted earlier on this thread.
I tracked the crash down to the redirect directly after the login, but I can't get any nearer. The huge framework makes it way too hard for me to understand where the database access is actually being triggered and/or which function is causing the problems.
Posts: 92
The output of the grep process is indentical to your result.
Changed config.php to storage type mysql instead of mysqli and got the following error:
Error (ERROR_STORAGE_FAILURE) : Create Sequence failed for sequence: SequenceEventLog
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 2180 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1273 (GalleryStorageExtras::createSequence)
in modules/core/classes/GalleryStorage.class at line 769 (GalleryStorageExtras::configureStore)
in modules/core/classes/GalleryModule.class at line 156 (GalleryStorage::configureStore)
in install/steps/InstallCoreModuleStep.class at line 143 (GalleryModule::installOrUpgrade)
in install/index.php at line 164 (InstallCoreModuleStep::processRequest)
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage.class at line 495 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage.class at line 1291 (GalleryStorage::search)
in modules/core/classes/GalleryStorage.class at line 1238 (GalleryStorage::_getEntityOrMapInfo)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1067 (GalleryStorage::describeMap)
in modules/core/classes/GalleryStorage.class at line 534 (GalleryStorageExtras::removeMapEntry)
in modules/core/classes/GalleryCoreApi.class at line 2935 (GalleryStorage::removeMapEntry)
in modules/core/classes/helpers/GalleryFactoryHelper_medium.class at line 97 (GalleryCoreApi::removeMapEntry)
in modules/core/classes/GalleryCoreApi.class at line 241 (GalleryFactoryHelper_medium::unregisterImplementationsByModuleId)
in modules/core/CoreModuleExtras.inc at line 3388 (GalleryCoreApi::unregisterFactoryImplementationsByModuleId)
in modules/core/module.inc at line 556 (CoreModuleExtras::performFactoryRegistrations)
in modules/core/classes/GalleryModule.class at line 410 (CoreModule::performFactoryRegistrations)
in install/steps/InstallCoreModuleStep.class at line 158 (GalleryModule::activate)
in install/index.php at line 164 (InstallCoreModuleStep::processRequest)
Log attached.
Posts: 1642
Actually, it is loaded with "MYSQLI_READ_DEFAULT_GROUP" which is a predefined constant that reads from the my.cnf file if a "MYSQLI_READ_DEFAULT_FILE" has not been defined. (http://dev.mysql.com/doc/refman/5.0/en/apis-php-mysqli.constants.html)
So the issue is down to MySQL. I believe that those facing issues are on F12 which I gather uses MySQL 5.1.x. This, I am sure is the root cause of the issue. In essence, G2 is not compatible with MySQL 5.1.x (or perhaps a specific 5.1.x version)
Perhaps if the folks having issues post their MySQL versions and even better still, their my.cnf file contents so we can confirm.
--
dakanji.com
Posts: 18
HI Guys,
Output above is the same
lib/adodb/drivers/adodb-mysqli.inc.php:52: var $optionFlags = array(array(MYSQLI_READ_DEFAULT_GROUP,0));
lib/adodb/drivers/adodb-mysqli.inc.php:97: foreach($this->optionFlags as $arr) {
Package installed for mysql is mysql.x86_64 5.1.44-1.fc12
See attached my.cnf
Warren
Posts: 1642
Don't worry about how many times the optionflags appear as it uses a predefined mysql constant.
Run "rpm -qa|fgrep -i php" to list which php modules are installed and paste the output.
After that, try downgrading MySQL to 5.1.3x.
--
dakanji.com
Posts: 18
HI,
output as discussed
[root@whitestar3 log]# rpm -qa|fgrep -i php
php-pear-Net-Socket-1.0.9-3.fc12.noarch
php-pear-MDB2-Driver-mysql-1.4.1-5.fc12.noarch
php-mbstring-5.3.2-1.fc12.x86_64
php-pear-1.9.0-3.fc12.noarch
php-pear-Mail-Mime-1.5.3-1.fc12.noarch
php-pear-MDB2-2.4.1-4.fc12.noarch
php-pear-Net-SMTP-1.4.2-1.fc12.noarch
php-pear-DB-1.7.13-3.fc12.noarch
php-common-5.3.2-1.fc12.x86_64
php-5.3.2-1.fc12.x86_64
php-mcrypt-5.3.2-1.fc12.x86_64
php-mysql-5.3.2-1.fc12.x86_64
php-gd-5.3.2-1.fc12.x86_64
php-Smarty-2.6.26-1.fc12.noarch
php-xml-5.3.2-1.fc12.x86_64
php-pdo-5.3.2-1.fc12.x86_64
php-pgsql-5.3.2-1.fc12.x86_64
php-pear-Auth-SASL-1.0.4-1.fc12.noarch
php-pear-Mail-mimeDecode-1.5.1-1.fc12.noarch
php-cli-5.3.2-1.fc12.x86_64
will try the downgrade of mysql
Posts: 18
Not having my luck on the downgrade. Appears to be the same problem as php with too many dependancies on other software loaded.
I think back to the wait for a fix again.
sigh..
Posts: 1642
Sorry to hear that.
I am afraid that nothing is being done regarding fixing this for now as all the focus is on G3 and you will either have to run a less bleeding edge distro than F12 or find an alternative to G2 ... G3 perhaps.
--
dakanji.com
Posts: 18
HI Dayo,
Thanks for the comments. At this stage I think I will try anything and g3 might be the go. I installed it now. However I suppose the trick is getting the g2 data into it as I dont have a functioning g2. I have a xml backup of the database and the album data backed off but thats about it. Anyone got tips on how to get my g3 going quick with this info?
Posts: 16504
To import G2 data into G3, yes, G2 must be functioning properly. Unlike G1, which didn't have a DB, there are not just some files you can read from. The G2 importer in G3 uses the G2 API and thus requires a properly functioning G2 install.
BTW, I've not ever had good luck with those xml "backups" from G2. If you want a reliable backup, do a dump from MySQL. I seriously doubt you'll be able to recover anything using the xml backup.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
HI,
I usually do the dumps etc when I do upgrades and other big things. I am starting to get a sick feeling in that I cant get the old g2 working as I have the problem above in order to import it into the new g3. I dont tend to have the time to fiddle to much and just stuck with making sure the system was up to date. sigh.. I am starting to think all the hundred's of images from g2 might be gone and I am going to have to do all that work again.
Posts: 16504
A couple of options for getting them into G3.
Setup a server that's not so "cutting-edge" (this is a server you want to be stable anyway, there's no reason to be running the latest and greatest release of software. Stable, up-to-date software is better than the latest release of something, but that's my opinion and I guess that's why I prefer Debian over Ubuntu or Fedora on servers any day because of that mentality)
Get G2 running on it, along with G3, import into G3, migrate G3 to the new server
Or you can use the Server Add option in G3 and import your images. You'll get the images into G3, but not have any titles, descriptions, comments, users, view counts, etc.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 18
OK.. mysql issued an update to 5.1.45-2.fc12 and I thought I wonder whether this fixes anything. installed gallery2 and lo and behold it started to work. Great. However in my dicking about to fix things I need to do a restore. I have a full backup from Jan and unfortunately I only have one of the gallery2 xml backups from just before I started to have any trouble.
Is there any trick into restoring the xml at all?
Please let me know.
Thanks
Posts: 16504
Not that I've seen. In my testing I've never been able to get that to work.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here