Page MenuHomePhabricator

dumpBackup.php error with --uploads --include-files options: Unable to find the wrapper "mwstore"
Closed, ResolvedPublic

Description

Author: nomailatall

Description:
The error is about the files attached to pages. When I execute :

php dumpBackup.php --full --uploads --include-files --output=file:dump.xml

I get the following error :

PHP Warning: file_get_contents(): Unable to find the wrapper "mwstore" - did you forget to enable it when you configured PHP? in /var/www/mediawiki-1.20.3/includes/Export.php on line 802
PHP Warning: file_get_contents(mwstore://local-backend/local-public/9/9e/file.png): failed to open stream: No such file or directory in /var/www/mediawiki-1.20.3/includes/Export.php on line 802

<file.png> is the file I uploaded on the server. This error is for all images of my wiki

The owner and group of my image folder is apache, and I've already tried to put 777 permissions, but still not working.

Tested on centos 6.4 and debian 6 - none working.

Am-I doing something wrong ?


Version: 1.19.19
Severity: normal

Details

Reference
bz47281

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:41 AM
bzimport set Reference to bz47281.
bzimport added a subscriber: Unknown Object (MLST).

I assume this refers to the following line in writeUpload():
chunk_split( base64_encode( file_get_contents( $file->getPath() ) ) ) .

Similar tickets mentioning this error are bug 33878, bug 38505, bug 46391.

john.horne wrote:

This problem, with the exact same error messages, occurs at 1.20.5 as well.

witzman wrote:

Same Behaviour in 1.21.1

tm wrote:

agreed, the mentioned patch fixed it for me.

GICodeWarrior wrote:

1.20 and 1.21 aren't supported anymore, and this appears to be fixed in newer versions. However, the issue is present in 1.19. Maybe worth backporting?

(In reply to David Leaman from comment #4)

Looks like this was fixed in https://gerrit.wikimedia.org/r/#/c/67236/.

(In reply to Tiziano Müller from comment #5)

agreed, the mentioned patch fixed it for me.

Thanks for the comments. Closing as RESOLVED FIXED.

(In reply to Rusty Burchfield from comment #6)

However, the issue is present in 1.19. Maybe worth backporting?

I'v set the Backport_to_Stable request flag in this ticket.

Change 163140 had a related patch set uploaded by Nemo bis:
Use getFileContents() instead of incorrect file system call to fetch file contents.

https://gerrit.wikimedia.org/r/163140

The patch needs fixing before it can be merged.

Change 163140 merged by jenkins-bot:
Use getFileContents() instead of incorrect file system call to fetch file contents.

https://gerrit.wikimedia.org/r/163140