after install error message putenv() [<a href='function.putenv'>function.putenv</a>]:

Asked by Andras on 2011-10-09

Dear All,

I am completely new to this Framework so I tried to install it :

 - download the latest stable version
 - changed the single config file
 - and installed it
 - 100% done
 - deleted install.php

and when I opened the index.php I got this
An error has occured...
An error has occurred while trying to provide you with the requested resource.
The site administrator have been informed and will fix the problem as soon as possible.
Sorry for the inconvenience, please come back later...

and an email with the following message:

ErrorException: putenv() [<a href='function.putenv'>function.putenv</a>]: Safe Mode warning: Cannot set environment variable 'LANG' - it's not in the allowed list | 2011-10-09 08:25:25

Am I doing something wrong or something missing here?

Any help would be appreciated.



Question information

English Edit question
PHPDevShell Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Greg (gregfr) said : #1

This message means that the webserver is blocking the framework from setting the specified variable. Are you using a shared hosting?

Greg (gregfr) said : #2

I can provide a quick & dirty patch, but the webserver might block many other possibilities...

Andras (sebyke-a) said : #3

Thanks for the quick reply. Yes I am on a shared host. I didn't know that can be a problem, however I am happy to play the testimonial player as far we can make it work:)



Greg (gregfr) said : #4

OK open the file /includes/, locate the line

    putenv('LANG=' . $this->configuration['locale']);

(around line 443)

and change it to

    try {
        putenv('LANG=' . $this->configuration['locale']);
    } catch (Exception $e) { }

this will just prevent the error from breaking the program. But it's likely your host provider will break many other things by being too strict :(

Tell me how it goes, we will evaluate the possibility to fix this in the distribution.


Andras (sebyke-a) said : #5

Thanks again!

It seems to me now is working so far.

Now I just need to find the tutorial/doc bit to be able to write my code.

Thanks again!

Greg (gregfr) said : #6

You're welcome, please give feedback on the patch, and don't hesitate to ask questions.