coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: Simon.Kiedyk on September 28, 2004, 07:04:55 AM

Title: Internal Server Error
Post by: Simon.Kiedyk on September 28, 2004, 07:04:55 AM
So I checked the forums and I don't see anyone getting the same problem. Anyhow what happens is I upload a file, and then after it has been "successfully uploaded" I click on continute and go on to describe the image (titel, etc.) and then click continue and I get an Internal Server Error.

The wierd thing is that I was able to upload 1 image before, and then I went into config and changed forum title and enabled user registration. And now I can't upload files! No idea what the problem is.

Please check out the script at http://www.citeinteractive.ca/h/acad/g/

I would really appriceate it if you could figure this out somehow. It's open for registrations so just register and try and upload if you want to see what the problem is.

Thanks for you help!
Title: Re: Internal Server Error
Post by: Tranz on September 28, 2004, 07:30:04 AM
Simon, when asking for help on something that requires registration, please create the account username/password, with upload privileges, and post it here. This helps out the supporters so they don't have to register dozens of accounts just to help people out.

Thanks.
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on September 28, 2004, 09:13:44 AM
Hi,

Here is the login info:

user: test
pass: 12345

Thanks so much for your help!
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on September 28, 2004, 11:59:51 PM
I also noticed that there is no problems in uploading for small images (like the samples that come with Windows) but bigger ones I get the error. I talked to my server admin to see if there were upload restrictions and he said that originally the restriction was 2MB and now he changed it to 4MB just incase, but the problem still continues.

Any suggestions based on that info? Thanks.
Title: Re: Internal Server Error
Post by: Joachim Müller on September 29, 2004, 12:43:03 AM
read the stickies (the one with the pin icon) on this board.

Joachim
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on September 29, 2004, 03:17:37 AM
Which one? I have no idea which one applies to my situation and don't want to read like 30 articles to find out  :)
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on September 29, 2004, 04:12:45 AM
Ok, so I read all of the articles which I thought COULD relate to my situation (like the general upload troubleshoot).

I checked the CHMOD on the album directory and all directories within it and they were NOT 777, so I changed them to that. Now after doing that, the problem remains unchanged. Any other suggestions?
Title: Re: Internal Server Error
Post by: kegobeer on September 29, 2004, 04:16:03 AM
Take a look at your server logs - there should be more details in there that can help find the cause of the error.
Title: Re: Internal Server Error
Post by: kegobeer on September 29, 2004, 04:40:03 AM
I logged into your site at the test user, created an album, and uploaded 4 images with different dimensions and file sizes, ranging from 120x120 to 1024x768, 8538 bytes to 459kb, and had no problems at all.  Exactly how large are your images when you get the error?  And it would really help if you post the specific entry in your server logs along with the image info (dimensions, pixels, file size).
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on September 29, 2004, 08:27:40 AM
So the file size is about 650KB, and dimensions are 1600x1200.
I took a look at the error logs and I don't see that error actually showing up in there that would have anything to do with the directory where the script is hosted. Kind of wierd actually.
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on September 30, 2004, 06:34:06 PM
So there doesn't seem to be a solution?
Title: Re: Internal Server Error
Post by: Casper on September 30, 2004, 06:50:55 PM
The only solution, without getting your host to increase some of your memory settings and upload size, would probably be to make the images smaller, in pixel size.
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on October 01, 2004, 04:43:28 AM
Well I e-mailed my server admin and this is what he said:

<<<<<<<<<>>>>>>>>>>>>>>>>>>>
Hi Szymon,

I just spent an hour on this problem with no luck. I found some bad file
permissions which looked like the problem, but I corrected that and it
still doesn't work. I don't think this is a problem with the file size
limits, because if it was then an error would clearly identify that, but
instead I'm getting an internal server error. The error logs describe the
problem as:

[Thu Sep 30 13:27:12 2004] [error] [client XXX.XXX.XXX.XXX] malformed
header from script. Bad header=<br
/>:/home/virtual/site23/fst/var/www/interpreters/php-script

Although that isn't helpful. Please show this to the tecks for the script
to see if it helps.


Best regards,

Joseph Buaron
Chief Executive Officer
Future Point Inc.
http://www.futurepoint.com/
<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>

So it's not the file-sizes I am sure. He has already increased the limit to 4MB. Any other ideas?
Title: Re: Internal Server Error
Post by: kegobeer on October 01, 2004, 05:26:48 AM
Ask your host if the following is uncommented in the Apache httpd.conf file:

AddHandler send-as-is

If it is, have them comment it out.

Also, this type of error is typically seen when PHP is run as a CGI process instead of a webserver module.  Ask your host if PHP is a CGI process or a webserver module.  If it's CGI, try changing all file permissions of executable files (except for the directories that must be 777) to 755.  You can also try changing this:

<?php

to this:

#!/usr/bin/php
<?php

in index.php.  (#!/usr/bin/php may not be the correct location of php - ask your host)
Title: Re: Internal Server Error
Post by: Simon.Kiedyk on October 03, 2004, 12:35:35 AM
Hi,

So I sent the server admin your suggestions and this is what I got:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Hi Szymon,

Unfortunately none of that helps, I tried the first suggestion, although
PHP is set-up as a module, and the problem is not with file permissions or
the PHP path, otherwise the script wouldn't work at all. Do you know where
the script uploads the files to? I want to watch that folder while
uploading an image to see if the file is actually created or not, because
the first stage of the upload says that it was uploaded successfully, but
then when you go to the page to select the gallery then I get an error. If
the image is actually being uploaded then maybe the problem has nothing to
do with uploading, but something else. Maybe it is something simple like
the script not having enough RAM to read large image files.

Best regards,

Joseph Buaron
Chief Executive Officer
Future Point Inc.
http://www.futurepoint.com/
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I told him that the upload directory is "albums" and directories within it.
Title: Re: Internal Server Error
Post by: kegobeer on October 03, 2004, 01:56:19 AM
Since uploads work fine, except for the large ones, it may be a memory issue.  It isn't necessarily a huge file size that is the problem, but a matter of the number of pixels in the image and the color depth.  There's a forumla for determining how much memory is required to process an image (which I've posted before, but I can't seem to remember the formula or where I posted it).  The upload seems to work fine, but when creating the thumbnails and intermediate images the server chokes.

You can try increasing memory_limit in php.ini to see if that helps.  Or you can try switching to ImageMagick to see if that solves the problem (if your host has installed it, of course).
Title: Re: Internal Server Error
Post by: hamletg on October 06, 2004, 01:40:30 AM
Hi,

I got exactly same problem, and it's just a memory problem. I changed memory_limit in php.in to 16M instead of 8M and it worked fine again!

By the way, thanks to you guys for your work ... after a LOT of ready here, I solved the problem  ;D

Title: Re: Internal Server Error
Post by: xadamz23 on February 25, 2005, 09:21:46 AM
Quote from: hamletg on October 06, 2004, 01:40:30 AM
Hi,

I got exactly same problem, and it's just a memory problem. I changed memory_limit in php.in to 16M instead of 8M and it worked fine again!

By the way, thanks to you guys for your work ... after a LOT of ready here, I solved the problem  ;D




I am having the same problem.  I want to edit the php.ini file, but I cant find it.  Where would it be located?
Title: Re: Internal Server Error
Post by: Tranz on February 25, 2005, 09:23:54 AM
You would need to ask your web host. They may or may not let you edit php.ini. Either way, you would need their assistance.