Menu

#1 Environment variables don't always work

open
nobody
None
5
2012-08-07
2012-08-07
Anonymous
No

You can't rely on custom environment vriables in an SuExec environment.. See Apache documentation http://httpd.apache.org/docs/2.2/env.html where it\ states under Caveats:

"When suexec is used to launch CGI scripts, the environment will be cleaned down to a set of safe variables before CGI scripts are launched. The list of safe variables is defined at compile-time in suexec.c"

Relying on environment variables is not the most appropriate programming practice for a module. It's barely tolerable in an application but a module should follow proper programming practice and only use those inputs specified. Object methods can use instance variables though they should do so through methods.
I'm going to also file this against the particular module that's the culprit. Later, I will submit a patch to turn cruddy.pl into using a config file and the module into taking the DSN as a mandatory part of the constructor.

Discussion


Log in to post a comment.