As I mentioned above the files in data/xx/ folders must be CHMOD 777 on your screenshot they are CHMOD 666 what else do you want to know?
Hm.. If i understand this, the jpg must be 777, and why?, in 1.7.1 it's 666, and how to change the settings??.. I did this change in function.php and all work, soo why will not the orginal function php work?..
This is the settings in 1.7.1 that i use to get it work, the files ,the directory and everything is the same, just except this change i did, and thats work, but still wonder why not orginal files work?..
function is_remote($file_name) {
return strpos($file_name, '://') > 0 ? 1 : 0;
}
function is_remote_file($file_name) {
return is_remote($file_name) && preg_match("#\.[a-zA-Z0-9]{1,4}$#", $file_name) ? 1 : 0;
}
function is_local_file($file_name) {
return !is_remote($file_name) && strpos($file_name, '/') !== false && preg_match("#\.[a-zA-Z0-9]{1,4}$#", $file_name) ? 1 : 0;
}
function check_remote_media($remote_media_file) {
global $config;
return is_remote($remote_media_file) && preg_match("#\.[".$config['allowed_mediatypes_match']."]+$#i", $remote_media_file) ? 1 : 0;
}
function check_local_media($local_media_file) {
global $config;
return !is_remote($local_media_file) && strpos($local_media_file, '/') !== false && preg_match("#\.[".$config['allowed_mediatypes_match']."]+$#i", $local_media_file) ? 1 : 0;
}
function check_remote_thumb($remote_thumb_file) {
return is_remote($remote_thumb_file) && preg_match("#\.[gif|jpg|jpeg|png]+$#is", $remote_thumb_file) ? 1 : 0;
}
function check_local_thumb($remote_thumb_file) {
return !is_remote($local_thumb_file) && strpos($local_thumb_file, '/') !== false && preg_match("#\.[gif|jpg|jpeg|png]+$#i", $local_thumb_file) ? 1 : 0;
}
function get_file_extension($file_name) {
ereg("(.+)\.(.+)", basename($file_name), $regs);
return strtolower($regs[2]);
}
function get_file_name($file_name) {
ereg("(.+)\.(.+)", basename($file_name), $regs);
return $regs[1];
}
function check_media_type($file_name) {
global $config;
return (in_array(get_file_extension($file_name), $config['allowed_mediatypes_array'])) ? 1 : 0;
}
function check_thumb_type($file_name) {
return (preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? 1 : 0;
}
function check_executable($file_name) {
if (substr(PHP_OS, 0, 3) == "WIN" && !eregi("\.exe$", $file_name)) {
$file_name .= ".exe";
}
elseif (substr(PHP_OS, 0, 3) != "WIN") {
$file_name = eregi_replace("\.exe$", "", $file_name);
}
return $file_name;
}
function get_file_path($file_name = "", $image_type = "media", $cat_id = 0, $in_admin = 0, $return_icon = 1, $check_remote = CHECK_REMOTE_FILES) {
$return_code = ($return_icon) ? ICON_PATH."/404.gif" : 0;
if (empty($file_name)) {
return $return_code;
}
if (is_remote($file_name)) {
$check_handle = "check_remote_".$image_type;
return ($check_handle($file_name) && remote_file_exists($file_name, $check_remote)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $file_name) : $return_code;
}
elseif (is_local_file($file_name)) {
$check_handle = "check_local_".$image_type;
$file_name = ($in_admin && preg_match("/^([\.]+|[^\/])/", $file_name)) ? "../".$file_name : $file_name;
if (!file_exists($file_name)) {
$file_path = preg_replace("/\/{2,}/", "/", get_document_root()."/".$file_name);
return ($check_handle($file_name) && file_exists($file_path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $file_name) : $return_code;
}
else {
return $file_name;
}
}
else {
$check_handle = "check_".$image_type."_type";
$path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id : MEDIA_TEMP_PATH) : (($cat_id) ? THUMB_PATH."/".$cat_id : THUMB_TEMP_PATH))."/".$file_name;
return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $path) : $return_code;
}
}
function safe_htmlspecialchars($chars) {
// Translate all non-unicode entities
$chars = preg_replace('/&(?!#[0-9]+;)/si', '&', $chars);
$chars = str_replace(">", ">", $chars);
$chars = str_replace("<", "<", $chars);
$chars = str_replace("\"", """, $chars);
return $chars;
}
function un_htmlspecialchars($chars) {
//$chars = preg_replace("/(&#)([0-9]*)(
/esiU", "chr(intval('\\2'))", $chars);
$chars = str_replace(">", ">", $chars);
$chars = str_replace("<", "<", $chars);
$chars = str_replace(""", "\"", $chars);
$chars = str_replace("&", "&", $chars);
return $chars;
}