Topic: 500 internal error?

each time i try to upload an image i receive this message

"Error 500 - Internal server error
An internal server error has occured!
Please try again later."

any ideas? i've tried 10 at a time, 1 at a time, i've set the images to 500px wide, i've tried larger ones and everything in between - no luck....... please help!

Re: 500 internal error?

It looks like your server is either not set-up for file uploads or it's blocking them. The internal server error message means just what it says so it doesn't give much in the way of details.

Here are a few things you can try:

  • Have you set-up any password protection in parts of your site? I don't mean the login password for svManager, I mean additional access restrictions that you have set-up yourself. The java uploader is incompatible with .htaccess password protection.

  • Are you using .htaccess files to apply other restrictions – for instance hotlink protection for you images?

  • Contact your server admin/helpdesk and tell them you have installed a php application that is trying to upload image files to the server and quote the error message.

If you don't mind getting your hands dirty with a little file editing then you may get some more information by turning-on java logging in the uploader. Edit the file svmanager/includes/constants.php and find the following line:

define('JAVA_CONSOLE_LOG', false);

Change this to:

define('JAVA_CONSOLE_LOG', true);

and try to upload some images.

You'll then need to start the Java Console to read any error messages in the log. In IE8, the Java Console can be started by right-clicking on the Java icon in the system tray/notification area while you are on a page with some Java content (the svManager upload screen). In earlier versions of IE the console can be started in Menu bar > Tools -> Sun Java Console. In Mac it's applications > Utilities > Java > Java Preferences > Advanced tab.

All the above assumes that you only get this message on file upload. If you are getting it on any other screens then we'll need to rethink.

jack

Jack Hardie
SimpleViewer Support Team.

Re: 500 internal error?

ok, so i tried contacting my server and they referred me to the online help tools. These tools state i should change the permissions to 705. I did that to the svmanager folder but still no dice.

I also enabled the java console. i am ready to dive into it if you will help me.

I have tried both Firefox and IE....

Re: 500 internal error?

Step 1 is to change the setting in svManager as in my previous post so that the uploader applet writes to the console log (the default setting means it doesn't write anything to the log).

Step 2 is to start-up the java console and look at the message log. If you are having any trouble with starting the console then this page on the java web site may help.

Step 3 is to go to svManager and try to upload images. You should see some new messages appear in the java console log. Post a copy of the messages here and we'll try to make sense of them.

Your server people may be correct – it could be a permissions issue but in that case the java log might give us a clue as to exactly which file has the wrong permissions.

jack

Jack Hardie
SimpleViewer Support Team.

Re: 500 internal error?

hey jack... this is what i see in the java console:

Java Plug-in 1.6.0_16
Using JRE version 1.6.0_16-b01 Java HotSpot(TM) Client VM
User home directory = C:\Users\Luis Acosta

----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

MyUploader Source Code Edition version 1.12.2
© Copyright JavaAtWork B.V. 2005-2009. All rights reserved.


Reading certificates from 11 http://ishowyoulook.com/svmanager/uploader/labels.jar | C:\Users\Luis Acosta\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\20\5d555694-48ec3443.idx
Oct 14, 2009 10:45:04 PM - HTTPUploadTask - upload() - HTTP/1.1 200 OK

Re: 500 internal error?

Well this one aint easy but we are making just a little progress smile

The final line of the java log show that the files were actually uploaded ok. I checked in my java log for a successful upload and the message is the same as yours.

So something is going wrong after that. It probably is a permissions error but which file? I can see two ways forward. One is just to experiment with permissions and the other is to look at the server logs to see if we can pinpoint the problem.

Here's some background information. The files are uploaded to your system's temp file. It looks like this part is going ok. The java applet then calls a php script – svmanager/myupload.php – and this script copies the uploaded files into the gallery.

What permissions do you have on on the myupload.php file and what permissions are on the gallery folder and the images folder inside it? You can experiment with changing these – make a note so you can change them back.

Incidentally, I see that you have a Windows server. Some Windows servers do not allow you to change the permissions with ftp so check that the permissions are actually changing. Go back and look at them again after you've tried the change.

Many (but not all) hosts give you access to the detailed server access logs. These keep a log of every single request from the browser to the server so they are pretty long and unfriendly but they are a very valuable source of information. Look at your server with ftp and see if there's a folder called logs or something similar. There will probably be lots of files in there, often having file names with sequential numbers or dates so you can tell which one is the latest. They are just text files. The entries are time-stamped so if you know the time that you tried to do an upload then you should be able to go straight to that entry.

This is what I see for a successful upload  on my local test machine:

127.0.0.1 - - [15/Oct/2009:09:09:15 +0100] "GET /path/svmanager-trunk/uploader/myuploader-source-signed-1.12.2.jar HTTP/1.1" 304 -
127.0.0.1 - - [15/Oct/2009:09:09:19 +0100] "GET /path/svmanager-trunk/uploader/labels.jar HTTP/1.1" 304 -
127.0.0.1 - - [15/Oct/2009:09:09:46 +0100] "POST /path/svmanager-trunk/myupload.php?path=%2Fpath%2Fsvmanager-trunk%2Fg1%2Fimages%2F HTTP/1.0" 200 -
::1 - - [15/Oct/2009:09:09:47 +0100] "GET /path/svmanager-trunk/svmupload.php?uploaded=true HTTP/1.1" 200 5927

It's not quite as incomprehensible as it might look. You can see the two GET requests for two java files (.jar) and then the POST to the myupload.php script. The third GET request loads the upload screen back into the browser. Most importantly – no error message.

Bit of a long post but hope it helps a little.

jack

Jack Hardie
SimpleViewer Support Team.

Re: 500 internal error?

jack, seems like i got it to work. these are the steps i followed:

1. deleted the svmanager folder from my server and uploaded it anew.
2. downsized ALL my images to a max of 500px wide...( i tried uploading images that were larger than this and continuously received the ERROR 500 msg. Even if I removed the image and tried again with a 500px wide image it wouldnt work.)
3. i created new galleries and uploaded ONLY images at 500px wide.

seems to be working for now. but i image that this set-back is a bug that can be fixed?

thanks for your help!

Re: 500 internal error?

I still think it's something strange on your server, rather than a bug in svManager. I would say that wouldn't I wink

Even if I removed the image and tried again with a 500px wide image it wouldnt work.

Do you mean removed the larger image from the list of files to be uploaded in the applet. Or do you mean removed it from the server? I thought the larger images were not getting to the server.

The really weird thing is that, if I understand correctly, an attempt to upload a large image prevents the subsequent uploading of smaller images, even though the large image never made it as far as the gallery.

The only thing I can think of at the moment is that your server has low limits on the maximum file size for an upload. If you'd like to check that out then here's how.

Download the svManager server compatibility test and install it on your server. Browse to svmtest/phpinfo.php. You should see a long list of php settings. Use the browser find facility to find post_max_size and upload_max_filesize. I'd expect post_max size to be around 8M and upload_max_filesize to be around 2M.

This one is new to me, anyone else had this problem with larger images?

jack

Jack Hardie
SimpleViewer Support Team.