Keyword

Server error 500

More
14 years 11 months ago #68497 by Beto Cadilhe
Replied by Beto Cadilhe on topic Server error 500
No way. I made a new install and tried to add new item imediatelly without images and i get Internal server error. I created new category, new fields groups etc... everthing ok, but when adding new item, error 500. Some people say it can be server problem. I´m hosted at webhostingbuzz.com and they say it´s not server problem.

Matthias Dohm said:Please try to add a new item without any image, gallery, video, etc. If this works, try to add a small image (max 640 x 480).

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #68498 by Matthias Dohm
Replied by Matthias Dohm on topic Server error 500
Hm, ok, that's a tough problem. It seems to be a different problem, than diskussed here before.

If you have some knowledge about php you could try the following:

Inside the administrator/components/com_k2/models/item.php file the function save() is called when you try to create an item. You could insert something like "die('everything alright');" at different positions to find out at which point the error occurs.

Please Log in or Create an account to join the conversation.

  • Vathanakone Prakosay
  • Vathanakone Prakosay's Avatar
  • Offline
  • New Member
More
14 years 10 months ago #68499 by Vathanakone Prakosay
Replied by Vathanakone Prakosay on topic Server error 500
Dear All,

the problem of "500 internal server .." might be comes from CGI module

Please double check with your provider wheter this is being support or not!

If so simply add in your .htaccess

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #68500 by romansTwelve
Replied by romansTwelve on topic Server error 500
Looks like this has been stalled for a while. anybody get any further that still wasnt able to get in? I have tried every fix anywhere google would take me, and still having the error, only for files over 1024x768, smaller files work great

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #68501 by Toby Poulsom
Replied by Toby Poulsom on topic Server error 500
Hi

I went through all of the steps for the fixes commented on this thread and still a 500 error ....

then I noticed that my image had a bad file name - with a space in it. Changed that and it worked fine.

Since this was the last thing I changed I can't comment on whether the other fixes were necessary for me. I am on 1 & 1 hosting and it seems to work now though.

May be just me but thought I'd mention it. Usually Joomla picks this up (maybe just through JCE editor).

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #68502 by Patrick
Replied by Patrick on topic Re: Server error 500
after reading this post and thanks as it fixed the problem for me
just receiving internal error when putting up pics (not 500 error code)
but figured same thing
i am on donhost hosting and was having major problems only able to put up really small images
look bad when viewed in a large window removed the code for converts image from true color, and fix transparency if needed

and all is working fine the upload is very fast using joomla 2x k2 2.6.8

hope this helps some body out there
code removed was from line 4948

as follows
// converts image from true color, and fix transparency if needed
$this->log .= '- converting...<br />';
switch($this->image_convert) {
case 'gif':
// if the image is true color, we convert it to a palette
if (imageistruecolor($image_dst)) {
$this->log .= '&nbsp;&nbsp;&nbsp;&nbsp;true color to palette<br />';
// creates a black and white mask
$mask = array(array());
for ($x = 0; $x < $this->image_dst_x; $x++) {
for ($y = 0; $y < $this->image_dst_y; $y++) {
$pixel = imagecolorsforindex($image_dst, imagecolorat($image_dst, $x, $y));
$mask[$x][$y] = $pixel;
}
}
list($red, $green, $blue) = $this->getcolors($this->image_default_color);
// first, we merge the image with the background color, so we know which colors we will have
for ($x = 0; $x < $this->image_dst_x; $x++) {
for ($y = 0; $y < $this->image_dst_y; $y++) {
if ($mask[$x][$y] > 0){
// we have some transparency. we combine the color with the default color
$pixel = imagecolorsforindex($image_dst, imagecolorat($image_dst, $x, $y));
$alpha = ($mask[$x][$y] / 127);
$pixel = round(($pixel * (1 -$alpha) + $red * ($alpha)));
$pixel = round(($pixel * (1 -$alpha) + $green * ($alpha)));
$pixel = round(($pixel * (1 -$alpha) + $blue * ($alpha)));
$color = imagecolorallocate($image_dst, $pixel, $pixel, $pixel);
imagesetpixel($image_dst, $x, $y, $color);
}
}
}
// transforms the true color image into palette, with its merged default color
if (empty($this->image_background_color)) {
imagetruecolortopalette($image_dst, true, 255);
$transparency = imagecolorallocate($image_dst, 254, 1, 253);
imagecolortransparent($image_dst, $transparency);
// make the transparent areas transparent
for ($x = 0; $x < $this->image_dst_x; $x++) {
for ($y = 0; $y < $this->image_dst_y; $y++) {
// we test wether we have enough opacity to justify keeping the color
if ($mask[$x][$y] > 120) imagesetpixel($image_dst, $x, $y, $transparency);
}
}
}
unset($mask);
}
break;
case 'jpg':
case 'bmp':
// if the image doesn't support any transparency, then we merge it with the default color
$this->log .= '&nbsp;&nbsp;&nbsp;&nbsp;fills in transparency with default color<br />';
list($red, $green, $blue) = $this->getcolors($this->image_default_color);
$transparency = imagecolorallocate($image_dst, $red, $green, $blue);
// make the transaparent areas transparent
for ($x = 0; $x < $this->image_dst_x; $x++) {
for ($y = 0; $y < $this->image_dst_y; $y++) {
// we test wether we have some transparency, in which case we will merge the colors
if (imageistruecolor($image_dst)) {
$rgba = imagecolorat($image_dst, $x, $y);
$pixel = array('red' => ($rgba >> 16) & 0xFF,
'green' => ($rgba >> 8) & 0xFF,
'blue' => $rgba & 0xFF,
'alpha' => ($rgba & 0x7F000000) >> 24);
} else {
$pixel = imagecolorsforindex($image_dst, imagecolorat($image_dst, $x, $y));
}
if ($pixel == 127) {
// we have full transparency. we make the pixel transparent
imagesetpixel($image_dst, $x, $y, $transparency);
} else if ($pixel > 0) {
// we have some transparency. we combine the color with the default color
$alpha = ($pixel / 127);
$pixel = round(($pixel * (1 -$alpha) + $red * ($alpha)));
$pixel = round(($pixel * (1 -$alpha) + $green * ($alpha)));
$pixel = round(($pixel * (1 -$alpha) + $blue * ($alpha)));
$color = imagecolorclosest($image_dst, $pixel, $pixel, $pixel);
imagesetpixel($image_dst, $x, $y, $color);
}
}
}

break;
default:
break;
}

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum