Author Topic: 500 internal server error...  (Read 11020 times)

rosko

  • Homo erectus manualfocus
  • NG Supporter
  • **
  • Posts: 1317
  • France/Uk
Re: 500 internal server error...
« Reply #15 on: June 01, 2016, 21:25:05 »


Here is the link :

https://www.dropbox.com/sh/o1ivgq0sjwojrnt/AAC1hpvgLIBndGBrMnqv921Ca?dl=0

I hope that will help.


Many thanks, Andrea !

Francis.
Francis Devrainne

Andrea B.

  • Technical Adviser
  • *
  • Posts: 1671
Re: 500 internal server error...
« Reply #16 on: June 01, 2016, 22:22:51 »
My trial upload of Francis' photograph just failed and created a 500 Internal Server error.
I suspect it is because of the way the filename was constructed:  mosquito's larva .JPG
The spaces may not be good. I'm not sure about the apostrophe, but it also may not work.

I am going to rename the file like this:  mosquito_larva.JPG.
And then I will try the upload again.

Andrea B.

  • Technical Adviser
  • *
  • Posts: 1671
Re: 500 internal server error...
« Reply #17 on: June 01, 2016, 22:23:39 »
Trial upload of renamed photo.
This obviously worked.

Turns out it was the apostrophe which confused the software.

So, Francis, please rename your photo files so as to have no apostrophes.  ;D

Bjørn Rørslett

  • Fierce Bear of the North
  • Administrator
  • ***
  • Posts: 8252
  • Oslo, Norway
Re: 500 internal server error...
« Reply #18 on: June 01, 2016, 22:26:18 »
Spaces embedded in a file name should not be a problem. I upload files with spaces in their name every day to NG.

Apostrophes are another matter and probably can break the upload?

Very nice image, by the way.


Added: trying to upload a file with apostrophe in the file name causes Server Error 500.

Andrea B.

  • Technical Adviser
  • *
  • Posts: 1671
Re: 500 internal server error...
« Reply #19 on: June 01, 2016, 22:29:55 »
Yes it was the apostrophe which somehow broke something. Why, I could not begin to guess. But I think it was probably mis-interpreted as some kind of beginning quote mark.

I think there is still some software out there which also does not like spaces in filenames. So it is best to be careful with that too.

(I tested uploads with apostrophe only and with space only.)

Andrea B.

  • Technical Adviser
  • *
  • Posts: 1671
Re: 500 internal server error...
« Reply #20 on: June 01, 2016, 22:32:02 »
Renamed with space only:  mosquito larva.JPG
This works just fine here on NG.
May not always work everywhere.

Bjørn Rørslett

  • Fierce Bear of the North
  • Administrator
  • ***
  • Posts: 8252
  • Oslo, Norway
Re: 500 internal server error...
« Reply #21 on: June 01, 2016, 22:35:20 »
As I said, a few thousand images with embedded spaces in their file names have been uploaded to NG before ...

Andrea B.

  • Technical Adviser
  • *
  • Posts: 1671
Re: 500 internal server error...
« Reply #22 on: June 01, 2016, 22:36:23 »
Yes, Bjørn, we got it. But spaces may not always work everywhere. I'm just sayin'.

"Best practices" for file naming still suggests no special characters and no spaces.
Not all software has caught up to spaced filenames yet.

Bjørn Rørslett

  • Fierce Bear of the North
  • Administrator
  • ***
  • Posts: 8252
  • Oslo, Norway
Re: 500 internal server error...
« Reply #23 on: June 01, 2016, 22:42:11 »
Using such file names on every web site to which I subscribe. Never been a problem.

However, what sometimes is mislabelled "accented characters" can get you into deep troubles. Sadly even in 2016 we are burdened by the ASCII inheritance. The world should cater for UniCode these days ....

Andrea B.

  • Technical Adviser
  • *
  • Posts: 1671
Re: 500 internal server error...
« Reply #24 on: June 01, 2016, 22:47:41 »
Well, I am happy for you that you have been lucky so far with spaced filenames. There is so much "legacy" code out there, that it is difficult to know sometimes just how it will respond to spaces, special characters, "accented characters" and so forth.

rosko

  • Homo erectus manualfocus
  • NG Supporter
  • **
  • Posts: 1317
  • France/Uk
Re: 500 internal server error...
« Reply #25 on: June 02, 2016, 00:27:22 »
Thank you so much, Andrea ! Fortunately you found out the issue.

I knew that something was wrong either with my computer or image, but as you have certainly noticed I am far to be an expert ! ::)

Cheers, Francis.
Francis Devrainne

rosko

  • Homo erectus manualfocus
  • NG Supporter
  • **
  • Posts: 1317
  • France/Uk
Re: 500 internal server error...
« Reply #26 on: June 02, 2016, 00:48:07 »
So, Francis, please rename your photo files so as to have no apostrophes.  ;D

Photo renamed (without apostrophe)

Post and picture successfully sent ! :)

I am relieved ! ;)

http://nikongear.net/revival/index.php/topic,3171.195.html

 :)
Francis Devrainne

zuglufttier

  • Guest
Re: 500 internal server error...
« Reply #27 on: June 02, 2016, 20:09:45 »
However, what sometimes is mislabelled "accented characters" can get you into deep troubles. Sadly even in 2016 we are burdened by the ASCII inheritance. The world should cater for UniCode these days ....
It's just the forum software: It doesn't check for valid file names. The best case would be to check for a valid name on the client side before uploading and after uploading again on the server if the image is really an image and not something else ;)