Last modified: 2011-03-13 18:06:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19041, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17041 - Thumbnail script doesn't work in PHP Safe Mode
Thumbnail script doesn't work in PHP Safe Mode
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.13.x
All Linux
: Lowest major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-16 15:13 UTC by noels01
Modified: 2011-03-13 18:06 UTC (History)
1 user (show)

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


Attachments

Description noels01 2009-01-16 15:13:10 UTC
Hi,

I read that setting
 $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
will generate thumbnails on each request rather than putting them in the (non-writable) thumb directory (because of safe mode). But this doesn't work. If I access a thumb there's only an error message concerning Safe Mode

SAFE MODE Restriction in effect. The script whose uid is 100 is not allowed to access /path/to/wiki/images/thumb/MyPic.jpg owned by uid 10 in /path/to/wiki/includes/media/Bitmap.php on line 214

File not found
Although this PHP script (/wiki/thumb.php) exists, the file requested for output (/path/to/wiki/images/thumb/MyPic.jpg/120px-MyPic.jpg) does not.

Well, why should the script access the thumb directory at all? As I understand, setting $wgThumbnailScriptPath should prevent thumb generation in the filesystem.


# current upload config
$wgEnableUploads = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgUploadDirectory = "{$IP}/images";
$wgHashedUploadDirectory = false;
$wgFileStore['deleted']['hash'] = 0;
$wgMaxUploadSize = 20*1024*1024;
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
$wgShowExceptionDetails = true;
Comment 1 Tim Starling 2009-02-20 14:26:14 UTC
No, that's not what thumb.php does. Please tell me where you read this so I can fix it.

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


Navigation
Links