[Mediawiki-l] Images and thumbs in PHP safe mode

Morten Blaabjerg crewscut at mail.dk
Mon Dec 20 00:11:07 UTC 2004


Apparently I was a bit too hasty. Got the image upload working and got a nice
formatting of them too on the pages. But the automated thumbs won't work. It
gives the following if I try to add a 'thumb' or - say a '180px' property to an
image :

Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in
/customers/crewscut.com/crewscut.com/httpd.www/includes/Image.php on line 246

Warning: stat(): Stat failed for
/customers/crewscut.com/crewscut.com/httpd.www/images/thumb/8/80/180px-JJ_Sarup.jpg
(errno=2 - No such file or directory) in
/customers/crewscut.com/crewscut.com/httpd.www/includes/Image.php on line 313

Warning:
unlink(/customers/crewscut.com/crewscut.com/httpd.www/images/thumb/8/80/180px-JJ_Sarup.jpg):
No such file or directory in
/customers/crewscut.com/crewscut.com/httpd.www/includes/Image.php on line 316

Anyone knows what to do to make thumbs work also?
A search of the mail archives revealed no immediate result, although it is
apparent, that there are widespread problems with the PHP safe mode. (I run our
site on a external server, without a say in the configuration of PHP on the
server).

Kind regards,
Morten :-)


Morten Blaabjerg wrote:

> Thanx, that was very helpful! Turns out it was really simple, after all, and
> it seems I've got Image Upload working now, in Safe Mode! - was using an FTP
> program that didn't allow me to set folder properties, but found a new one,
> which did - and everything seems to be all fine now :-)
>
> Thanx!
> Morten :-)
>
> Brion Vibber wrote:
>
> > On Dec 18, 2004, at 5:00 AM, Morten Blaabjerg wrote:
> > > Another concern of mine, is images. Since my server runs in PHP Safe
> > > Mode, image upload is automatically disabled
> >
> > Image upload is *always* automatically disabled. This is for security
> > reasons; uploading arbitrary data to your web server is potentially
> > dangerous, and it's a) safer to have it off and b) it wouldn't work
> > anyway until you fix up permissions in the images directory.
> >
> > Search the list archives for previous questions about uploads in safe
> > mode. (Use google and add site:mail.wikipedia.org to your query.)
> >
> > In 1.4 you can now suppress the hashed subdirectories (which cause most
> > of the trouble with Safe Mode) but you may still need to add temp,
> > archive, and thumb subdirectories and make them all writable. Set
> > $wgHashedUploadDirectory = false in LocalSettings.php
> >
> > -- brion vibber (brion @ pobox.com)
> >
> >   ------------------------------------------------------------------------
>




More information about the MediaWiki-l mailing list