Last modified: 2014-11-09 22:16:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 30987 - Issues saving binary data to the database
Issues saving binary data to the database
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
PC Windows 7
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2011-09-19 09:53 UTC by p.sapiejewski
Modified: 2014-11-09 22:16 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description p.sapiejewski 2011-09-19 09:53:19 UTC
Notice: unserialize() [function.unserialize]: Error at offset 0 of 261 bytes in C:\wamp\www\wiki\includes\objectcache\SqlBagOStuff.php on line 381
Call Stack
#	Time	Memory	Function	Location
1	0.0016	681360	{main}( )	..\index.php:0
2	0.1672	11831376	MediaWiki->run( )	..\index.php:58
3	0.1672	11831376	MediaWiki->main( )	..\Wiki.php:529
4	0.1672	11831456	MediaWiki->performRequest( )	..\Wiki.php:622
5	0.2140	15823744	MediaWiki->performAction( )	..\Wiki.php:237
6	0.2147	15969200	Article->view( )	..\Wiki.php:466
7	0.3276	22815216	ParserCache->getKey( )	..\Article.php:534
8	0.3276	22815360	SqlBagOStuff->get( )	..\ParserCache.php:115
9	0.3283	22816528	SqlBagOStuff->unserialize( )	..\SqlBagOStuff.php:152
10	0.3283	22817040	unserialize ( )	..\SqlBagOStuff.php:381

PostgreSQL 9.0
Apache 2.2.17
PHP 5.3.4
Comment 1 Sam Reed (reedy) 2011-09-19 09:54:18 UTC
Can you tell us what you were doing when you got this error?
Comment 2 p.sapiejewski 2011-09-19 09:55:51 UTC
I have just install wiki through  website, copy LocalSettings.php to folder and run Wiki main page. At start I have this error.
Comment 3 p.sapiejewski 2011-09-19 10:03:44 UTC
(In reply to comment #2)
> I have just install wiki through  website, copy LocalSettings.php to folder and
> run Wiki main page. At start I have this error.

Earlier I have 1.17 version and there was a hundreds copies of that error. In 1.19 I have only six copies.
Comment 4 Bawolff (Brian Wolff) 2011-09-19 22:56:19 UTC
Could it be possible you have gzinflate function disabled (but the gzdeflate function enabled) Looking at the code, that would probably do it (although that'd be a weird thing to have). Otherwise it would really help to know what value is being passed to unserialize that's causing the issue.
Comment 5 p.sapiejewski 2011-09-20 04:59:14 UTC
This is realy weird but I do nothing and it works today oO'
Yesterday clearing cache gives me nothing but today... eh...
Anyway thank you very much.
If this bug will return I will reopen this case.

Best Regards
Comment 6 p.sapiejewski 2011-09-20 06:48:05 UTC
Hah, my buddy make me a joke and install wiki on MySQL :/

Sorry for that. Problem isn't solved yet.

zlib is enable as far as I can see.

Values of $serial with errors (I think):






Comment 7 Karun 2012-09-08 00:12:46 UTC
Not a Postgresql problem, so removed the tracking bug.
Comment 8 OverlordQ 2012-09-08 00:18:28 UTC
Not invalid, reproducable, likely is a problem with sending binary data to Postgres.
Comment 9 OverlordQ 2012-09-08 00:19:50 UTC
1) Take working wiki
2) Run maintenance/storage/compressOld.php
3) Run maintenance/storage/testCompression.php Main_Page
4) Get errors:

PHP Notice:  unserialize(): Error at offset 95 of 158 bytes in /var/www/ on line 265

Notice: unserialize(): Error at offset 95 of 158 bytes in /var/www/ on line 265
PHP Fatal error:  Call to a member function uncompress() on a non-object in /var/www/ on line 275

Fatal error: Call to a member function uncompress() on a non-object in /var/www/ on line 275
Comment 10 Karun 2012-09-08 00:21:39 UTC
(In reply to comment #8)
> Not invalid, reproducable, likely is a problem with sending binary data to
> Postgres.

The person who filed the bug replied in comment 6 saying they use MySQL and not Postgresql, so it is not a Postgresql problem.
Comment 11 Mark Clements (HappyDog) 2014-11-09 13:23:08 UTC
I have this problem, as described in comment 0, on posgresql running MW 1.17 - no issues running same code-base on MySQL.

Obviously, that is an old versions of MW, and issue may be subsequently fixed in more recent versions (I am not currently able to test this), but it is definitely seems to be a postgres-related issue.

To reproduce:
* Install wiki on PostgreSQL
* Go to main page
* Multiple errors, as described in comment 0

Note that memcached is not installed, and $wgMainCacheType = CACHE_NONE.

I would add back the 'postgresql' keyword, but it seems that it doesn't exist any more.
Comment 12 Tim Landscheidt 2014-11-09 16:07:59 UTC
(The postgresql keyword has been replaced with the tracking bug #384.)
Comment 13 Mark Clements (HappyDog) 2014-11-09 22:16:42 UTC
Thanks - have added.

Note You need to log in before you can comment on or make changes to this bug.