Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Apologies if this is not in the right section of the forum, I figured it was a newb question and so would be ok here.
I've just configured a new server with Red Hat Enterprise 5 it's not our first linux machine and is running great except for one small detail, there is something missing in the apache config but I'm not sure where the problem is because both are running largely the same config as is installed by Red Hat.
I've narrowed it down to the file names because as soon as I take out the £££ it works. If that were just it then things wouldn't be a problem but these are user uploaded files and there are a lot of them so ideally I need to make the severs behave in the same way.
If someone could point me to the right place in my httpd.conf then I'd be most grateful.
The file name in the link that fails is rendered in the URL as: 'Acupuncture £££ 1.jpg'
the one that works gets rendered as: 'Acupuncture £££ 1.jpg'
To me this suggests that there is a difference in the way the servers' character sets are configured. At least that is the first thing I would look at.
Yeah that was my first thought too, I noticed that the old server had a whole load of additional AddCharset parameters in the httpd.conf so I copied those over and restarted apache but it didn't make any difference. I also tried putting them in the .vhost file for this site and, as a last resort in the .htaccess file. Nothing seemed to make any difference and I'm still getting 404 errors on the images
After some more investigation I've definitely worked out what the problem is. The locale setting the server upon which the URL works has it's locale set as
So the £ sign is not liked by the new one due to the locale.
Cool, now I know what the problem is does anyone know an easy way to change the locale on a Red Hat ES5 server? I need to change it from US.UTF-8 to GB.UTF-8?
I've tried that but the man pages are not massively helpful. All I see is what I've pasted below, it doesn't actually tell me very much but maybe I'm just being uber-dumb
DESCRIPTION
The locale program writes information about the current
locale environment, or all locales, to standard output.
When invoked without arguments, locale summarizes the
current locale environment for each locale category
defined by the LC_* environment variables.
-a, --all-locales
Write names of available locales.
-m, --charmaps
Write names of available charmaps.
Output Format:
-c, --category-name
Write names of selected categories.
-k, --keyword-name
Write names and values of selected keywords.
ENVIRONMENT VARIABLES
LC_CTYPE
Character classification and case conversion.
LC_COLLATE
Collation order.
LC_TIME
Date and time formats.
LC_NUMERIC
Non-monetary numeric formats.
LC_MONETARY
Monetary formats.
LC_MESSAGES
Formats of informative and diagnostic messages and
interactive responses.
but it simply printed a list of all the available locales and did not make any changes. I've been scouring the docs looking for the correct command but either I'm looking in the wrong place or I'm not seeing something that is staring me in the face
[root@scotty vidThumbs]# locale -c LANG en_GB.UTF-8
To change the first of the components listed when one types locale I did not receive any output from my command but when I type locale the LANG=en_US.UTF-8 is still there, I would have expected it to change to en_GB.UTF-8
It seems to be some other issue. I tried both the links in your first post and both of them somehow contain the pound sign.
You might again want to look into the configuration of the server and that the is actually there on the server and the location of the file is same as that is configured in apache.
The files are definitely on the server and the paths are also correct. Images without £ in them work as you can see on this page, each item listing in the centre has an image attached to it but only some of them show up.
All the images show on that page event though the file names are the same.
When I do ls -l in the relevant folder on the server there is also something strange happening, on the server that serves the file it's listed as
Acupuncture £££ 1.jpg
on the server which doesn't serve the file it's listed as
Acupuncture â¬Ãºâ¬Ãºâ¬Ãº 1.jpg
Neither of them is a £ symbol but they are different and definitely suggest a problem with the locale. Might a restart of the server be necessary? It's unusual for linux that it would need to be restarted but I could always try it.
I dont think that changing locales need restarting of server.
I remember doing this on solaris machines and changes took place without restart. You might just want to take that step as well just not to regret later but I suspect it will solve your problem.
If you think that the pound sign is your problem, can you change the name for one file so that you can be just sure for that fact. Otherwise you will keep on finding solution for something that isnt your problem in first place.
Anyhow, those both links in the above post#13 are working for me.
I tried changing the filename and it works, it works if I take the £ out it also works with spaces and other characters that might be expected to cause a problem. I will definitely try a restart and see how that goes. Thanks so much for your help so far, I will let you know how I get on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.