Image Resize

wibadd 26 May, 2012
The Image Resize action is working correctly for the big image, but appears to be erroring for the small image. The original file is uploaded and the big file is also created, but it continues to error on the small image. I checked the directory permission on all and they are set to 777.

Warning: imagepng(): open_basedir restriction in effect. File(/usr/local/pem/vhosts/usr/local/pem/vhosts/107845/webspace/httpsdocs/media/media/images/stories/sponsorlogos/slideshow/Bottom_small.png) is not within the allowed path(s): (/usr/libexec/php5-cgi/share/pear/:/usr/libexec/php4-cgi/share/pear/:/usr/local/pem/vhosts/107845/) in /usr/local/pem/vhosts/107845/webspace/httpsdocs/administrator/components/com_chronoforms/form_actions/image_resize/image_resize.php on line 270 Warning: imagepng(): Invalid filename in /usr/local/pem/vhosts/107845/webspace/httpsdocs/administrator/components/com_chronoforms/form_actions/image_resize/image_resize.php on line 270



I'm not familiar with the first error regarding the allowed paths since the big and small folders I'm using have the same parent directory. Also, line 270 in image_resize.php refers to:

case 'image/png':
imagepng($thumb3, $fileout); // on cree le fichier
break;

Any ideas?
GreyHead 26 May, 2012
hi wibadd,

open_basedir is a server security module - it looks as though that hasn't been set to allow writing to one of the folder. See this StackOverlow answer for a possible solution.

Bob
wibadd 26 May, 2012
I read the article you referenced, but I still don't completely understand what I need to do. I never had this problem on my other site, and the site I'm working on is with the same host.

I'm in a shared hosting environment, so I think I am unable to access the file they reference in the article - configuration file (e.g. httpd.conf). What confuses me is why it is able to access one of the folders and not the other, especially since they have the same parent and both were created by me at the same time.
wibadd 28 May, 2012
I just decided to try creating a different set of directories one level higher and it is working fine now. No idea why, but at least it's working.
GreyHead 29 May, 2012
Hi wibadd,

Looking at the error again it looks as though 'media' was repeated in the path
. . . /httpsdocs/media/media/images/stories/ . . .

Bob
wibadd 29 May, 2012
That path is correct, so it shouldn't be the issue.
This topic is locked and no more replies can be posted.