Page 1 of 1
Problem uploading images
Posted: Sun 20. Nov 2005, 19:59
by ganesha
the problem is this:
when i upload a picture from the File section of the phpwcms (1.2.5) beckend,
i receive this warning:
Warning: imagejpeg(): Unable to access .../httpdocs/125/content/images/dc9db16f9119f9c7cf60d3b1483c1005.jpg in .../httpdocs/125/include/inc_ext/ss_image/ss_image.class.php on line 202
and picture isn't available
what's happend?
the script has uploaded the file in the /phpwcms_filestorage folder
but it has given permission 600 (and the owner of the file is the ftp user, not apache)
so when the script tries to read that file (with the apache user, i suppose), it hasn't sufficient rights.
another instance of phpwcms on another hosting works fine...
any idea
thanks
Posted: Sun 20. Nov 2005, 20:17
by ganesha
no, the rights aren't the problem...
uploading manually the file in the /phpwcms_ftp folder, the permissions are correct (666) but the warnings remain and the problen is the same...
Posted: Sun 20. Nov 2005, 20:41
by ganesha
another thing
i've discovered that there are images that i'm able to upload..
Posted: Sun 20. Nov 2005, 21:15
by juergen
Hello
Not shure ... but perhaps "GIF" Files ?
In 1.2.6 GIFs work very well ... perhaps thats the reason
Re: Problem uploading images
Posted: Mon 21. Nov 2005, 14:11
by DeXXus
ganesha wrote:another instance of phpwcms on another hosting works fine...
any idea
thanks
Note: This function is only available if PHP is compiled with the bundled version of the GD library.
Maybe... make sure ~this~ hosting has GD available??
Posted: Mon 21. Nov 2005, 19:19
by ganesha
i can upload only the images that are below the following values of conf.inc.php
Code: Select all
// content values
$phpwcms["file_maxsize"] = 2097152; //Bytes (50 x 1024 x 1024)
$phpwcms["content_width"] = 800; //max width of the article content column
$phpwcms["img_list_width"] = 100; //max with of the list thumbnail image
$phpwcms["img_list_height"] = 75; //max height of the list thumbnail image
$phpwcms["img_prev_width"] = 600; //max width of the large preview image
$phpwcms["img_prev_height"] = 500; //max height of the large preview image
$phpwcms["max_time"] = 3600; //logout after max_time/60 seconds
because, i suppose, the script don't have to resize those images
hince the problem should be: the script cannot modify images!
but why?
see my
phpinfo()
Posted: Mon 21. Nov 2005, 22:31
by DeXXus
If you've tried raising those values and they do not work...
Maybe PHP itself (or your Host limits) are the problem?
See topic:
[DEV 1.2.5] can't upload a file that's greater than 1024KB
http://www.phpwcms.de/forum/viewtopic.p ... ht=maxsize
Posted: Mon 12. Dec 2005, 00:55
by ganesha
solved!
the problem was due to php 4.4.1 and the function imagejpeg
i fixed it this way:
in file include/inc_ext/ss_image/ss_image.class.php line 202
change this:
Code: Select all
} else {
imagejpeg($image, $where, $this->cfg_JPEG_QUALITY);
}
in this:
Code: Select all
} else {
$fh=fopen($where,'w'); //fix for php 4.4.1
fclose($fh); //fix for php 4.4.1
imagejpeg($image, $where, $this->cfg_JPEG_QUALITY);
}
ciao
Posted: Mon 12. Dec 2005, 08:56
by Oliver Georgi
nono,
this is definitly a problem of your hosting account
and not of phpwcms.
Your provider has to change permission settings for your account. If an image is uploaded into a folder with right permissions you can have access on it.
Oliver