Topic on Project:Support desk

[Solved] Warning: imagepng() [function.imagepng]: open_basedir restriction in effect.

4
Hobur (talkcontribs)

This is my features:

  • Mediawiki: Version 1.23.5
  • PHP: Version 5.3.5 (cgi-fcgi)
  • MySQL: Version 5.1.73-log
  • OS Hosting: Windows
  • My wiki:www.itadmowiki.it

Hello, I recently moved my site to another host and so far so good . Finished to send files via FTP I opened the MainPage and I found these errors:


Warning: imagepng() [function.imagepng]:open_basedir restriction in effect. File (D:\Temp\/transform_90a34c7283bc-1.png) is not within the allowed path(s): (e:\d:\) in E:\kunden\homepages\33\d549879353\www\wiki\includes\media\Bitmap.php on line 600


Warning: imagepng() [function.imagepng]:Invalid filename in E:\kunden\homepages\33\d549879353\www\wiki\includes\media\Bitmap.php on line 600


Warning: file_exists() [function.file-exists]:open_basedir restriction in effect. File (D:\Temp\/transform_90a34c7283bc-1.png ) is not within the allowed path(s): (e:\d:\) in E:\kunden\homepages\33\d549879353\www\wiki\includes\media\MediaHandler.php on line 689


Warning: filesize() [function.filesize]:open_basedir restriction in effect. File (D:\Temp\/transform_90a34c7283bc-1.png) is not within the allowed path(s): (e:\d:\) in E:\kunden\homepages\33\d549879353\www\wiki\includes\filebackend\FileBackendStore.php on line 163

I could not find a solution , I hope you can help me sincerely . Thank you for the help you give me .

Ciencia Al Poder (talkcontribs)

Apparently, your host has set up a temp directory for PHP on D:\Temp\, but they have set up open_basedir restriction in php.ini to e:\d:\, which looks odd, because it should be e:\;d:\ (note the separator between both paths), so it seems to not allow accessing any other path outside of the wiki installation directory.

You can contact your host about that, or manually set $wgTmpDirectory to a path within your MediaWiki installation (E:\kunden\homepages\33\d549879353\www\wiki\tmp for example)

AKlapper (WMF) (talkcontribs)
Hobur (talkcontribs)

Thanks for the replies, I had already tried everything, using the internet search. I contacted my host and I'm still waiting for their response. I try now to set $wgTmpDirectory manually. Thank you very much for your help .

- EDIT -

Finally I solved the problem by adding $wgTmpDirectory and specifying the correct path. Thank you very much for your valuable help.

Reply to "[Solved] Warning: imagepng() [function.imagepng]: open_basedir restriction in effect."