Keyword

Server error 500

More
15 years 8 months ago #68487 by Frank Stratmann
Replied by Frank Stratmann on topic Server error 500
I have the sames Problem, I am at 1&1 but I do not have such a file, which is named in the lib-folder?! Does anybody know why? What ccould I do, to fix the problem.

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

More
15 years 8 months ago #68488 by Travis Prebble
Replied by Travis Prebble on topic Server error 500
Frank Stratmann said:I have the sames Problem, I am at 1&1 but I do not have such a file, which is named in the lib-folder?! Does anybody know why? What ccould I do, to fix the problem.


Which version of K2 are you using? The class.upload.php is required to use the Image tab of a K2 item in version 2+.

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

More
15 years 8 months ago #68489 by Frank Stratmann
Replied by Frank Stratmann on topic Server error 500
Travis Prebble said:Frank Stratmann said:I have the sames Problem, I am at 1&1 but I do not have such a file, which is named in the lib-folder?! Does anybody know why? What ccould I do, to fix the problem.


Which version of K2 are you using? The class.upload.php is required to use the Image tab of a K2 item in version 2+.


I use the actual one. Download yesterday. Now, my mistake, i found the class.upload.php allready. but...

I tried now:
- php.ini, switch to php5
- out comment source-passage

nothing happens. The Error is still there. Error 500.
Any other ideas?

Thanks

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

More
15 years 8 months ago #68490 by Matthias Dohm
Replied by Matthias Dohm on topic Server error 500
Hi Frank,

please check if k2 creates any file within the /media/k2/items/cache folder. K2 should create six images with different sizes for each article.

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

More
15 years 8 months ago #68491 by Rickey Tribble
Replied by Rickey Tribble on topic Server error 500
Mathais- Where does that block end? Right above //outputs image or further down?

Thanks

Matthias Dohm said:Hi all,I finally managed to get the image upload working after switching to php5 and creating a php.ini did not solve the problem. So for those of you who use 1and1 hosting and still receive this error:The problem occurs inside the class.upload.php (administrator/components/com_k2/lib/class.upload.php). Starting somewhere around line 4080 there is a block (//converts image from true color, and fix transparency if needed) which looks at every single pixel of the resized image. For the XL and the L size, this giant loop is too big (at least on a 1and1 server). So if you just comment out or delete this section the image upload works perfectly.There might still occur some problems when you try to upload a GIF-image, but I tested it for JPGs and PNGs which worked fine.I hope this will help a bit.

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

More
15 years 8 months ago #68492 by Matthias Dohm
Replied by Matthias Dohm on topic Server error 500
Hi,

the block that I commented out ends right above //outputs image as you wrote. The following section is responsible for saving the resized image.

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

More
15 years 8 months ago #68493 by Frank Stratmann
Replied by Frank Stratmann on topic Server error 500
I tried it tomorrow and now it works. Amazing. I can not tell you, what´s happened. Try later, there are some mystics. Good luck. Perhaps the next update will correct this.

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

More
15 years 8 months ago #68494 by Travis Prebble
Replied by Travis Prebble on topic Server error 500
Frank Stratmann said:I tried it tomorrow and now it works. Amazing. I can not tell you, what´s happened. Try later, there are some mystics. Good luck. Perhaps the next update will correct this.


K2 uses class.upload.php without modification, so any fixes would have to be done by the author of the library.

www.verot.net/php_class_upload.htm

There are several questions in the forums regarding errors handling large images, and the only suggested solution is increasing the memory allocation for PHP.

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

More
15 years 8 months ago #68495 by Beto Cadilhe
Replied by Beto Cadilhe on topic Server error 500
Hi,

I get internal server error (500) only when i try to add new item. I can edit ctegories, fields ans so on, but i can´t add new itens. Is it due to my server configuration?
thanks

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

More
15 years 8 months ago #68496 by Matthias Dohm
Replied by Matthias Dohm on topic Server error 500
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
15 years 7 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
15 years 7 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
15 years 7 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
15 years 3 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
15 years 2 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
10 years 8 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