PDA

View Full Version : reverted_to_english_because_language_english_is_no t_availabl


cd500 user
10th of August 2004 (Tue), 13:45
Help! I have a few test installs of EE running on my site. My main one - for the family pics - has been up and running for months and working great. I did a separate EE install (on the same server, this one will be my own site) a week ago just to keep my EE config skills sharp :D Both of these installations have been working really well so far.

Check out the error message in the title: I started getting this today! The full URL shows up with the error inside it, I made it bold for the post...

http://www.driftwoodroad.com/ee/[admin folder]/index.php?reverted_to_english_because_language_eng lish_is_not_available&exhibition=6&lang=eng
How odd! English is the only language I use and I have never changed it. Browsing the site as a user, everything works ok. It is only when I login as administrator and go to submit something (try out a resize method, etc.) that I get the error above and it does not submit right, so I can't change anything. Any ideas? I am going crazy searching for some way to fix it.

Thanks!
Patrick

Pekka
10th of August 2004 (Tue), 14:24
I've seen one instance how this can happen (if language settings are ok).

In your server there is a predefined environment variable "lang". Normally this should have nothing to do with PHP, but if your php.ini has

register_globals = on

the "lang" is automatically converted to variable $lang in PHP. This is a big problem. E.g. system language may be

no_NO.ISO_8859-1

when EE code is

eng

This messes up EE's own $lang variable nicely. Register globals should be off in any case for security reasons. Your server admin may have set this on perhaps for getting some older script to work.

Luckily you may be able to force this "register_globals" setting off for your EE in .htaccess file and get rid of this problem.

Add to your .htaccess file:

php_flag register_globals off

OR

php_value register_global off

If either of above settings do not work then contact your server admin for help.

To remedy this problem I'll have to rename EE's variable names to something not so common in future versions.

Let me know if this helped. If not I'll think of something else... :)

cd500 user
10th of August 2004 (Tue), 14:44
Pekka, you are a genius! Thank you so much for your fast response. You have written a fantastic program. Register Globals was on for some reason - I turned it off and now all is well again! The only thing I can think of that may have changed that setting was PHPNuke - I installed it yesterday to try it, so it must have turned globals on. I won't compromise security for a program, PHPNuke is ditched and won't return.

Thank you, thank you, thank you :!: :!:

Patrick

wkitty42
12th of August 2004 (Thu), 08:59
To remedy this problem I'll have to rename EE's variable names to something not so common in future versions.
as a programmer, i've always found it good practise to name one's variables something unique... i generally prefix them with something pertaining to the program i'm coding... for example, you could prefix all your/ee's variables with EE_ and that would take care of the problem...

Sugrat
10th of September 2004 (Fri), 15:57
I'm getting the same problem:

/input/index.php?reverted_to_english_because_language_eng lish_is_not_available&exhibition=1&lang=eng

but in my php code the register_globals are set to off.

But I did also try to add those lines to my htaccess files and still nothing.

Anything else I can try?

Sugrat
15th of September 2004 (Wed), 20:57
I've also found out this error seems to be pc based. On one of my systems it seems to be fine and on my laptop which is also running XP Pro and the latest IE, it doesn't seem to work.

Any ideas?

Does the web browser look at the settings on the pc for the lang settings? I've looked at them and it seems fine.

wkitty42
19th of September 2004 (Sun), 19:12
I've also found out this error seems to be pc based. On one of my systems it seems to be fine and on my laptop which is also running XP Pro and the latest IE, it doesn't seem to work.

Any ideas?

Does the web browser look at the settings on the pc for the lang settings? I've looked at them and it seems fine.
AFAICT, it doesn't have anything to do with the browser... its on the server side and appears to have something to do with something setting a LANG environment variable in the PHP task(s)...

Sugrat
21st of September 2004 (Tue), 16:37
Strange, so why does one pc work and not the other? I have two new installs that don't work and one old pc that does? all are running xp pro with all the latest updates except sp2.

Pekka
21st of September 2004 (Tue), 16:42
I'm changing variable $lang in EE to something else (perhaps $eelang or just $eel :) ) so that these system variable leaks do not affect EE. Keeping you posted with progress.

Pekka
21st of September 2004 (Tue), 16:45
Strange, so why does one pc work and not the other? I have two new installs that don't work and one old pc that does? all are running xp pro with all the latest updates except sp2.

Check "EE editor/server info /Display full PHP info" - can you see a variable "lang" there on left side columns? There should be one in "Environment" but is there somewhere else?

Sugrat
22nd of September 2004 (Wed), 15:02
I see lang=english in a lot of places but most of them refer to http_cookies.

So with that in mind, i removed all cookies that refered to the host and tried it again and it seems to be working now.

Thanks for your help!

PS. Might want to make a note that if anyone is having the same problem that they try and remove the cookie first.