Hi.. Here is the apache conf for the server
--- conf starts <IfModule mod_fcgid.c> SocketPath /var/lib/apache2/fcgid/sock IdleTimeout -1 ProcessLifeTime -1 MaxProcessCount 10 DefaultMaxClassProcessCount 10 DefaultMinClassProcessCount 1 FcgidInitialEnv WT_APP_ROOT /home/bvr/wt/approot </IfModule> <DirectoryMatch "^/home/.+/public_html/.*$"> AddHandler fcgid-script .wt </DirectoryMatch> <IfModule mod_userdir.c> UserDir public_html UserDir disabled root <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNOEXEC ExecCGI <Limit GET POST OPTIONS> Require all granted </Limit> <LimitExcept GET POST OPTIONS> Require all denied </LimitExcept> </Directory> </IfModule> --- conf ends Here is the htaccess on the deployment folder --- .htaccess starts SetEnv WT_APP_ROOT /home/bvr/wt/approot --- .htaccess ends Are there any insights r On Sun, 7 Jun 2015, B.V. Raghav wrote: > Date: Sun, 7 Jun 2015 02:32:23 > From: B.V. Raghav <bvrag...@gmail.com> > To: Witty Mailing List <witty-interest@lists.sourceforge.net> > Subject: Wt 3.3.4 Environment inconsistency > > Hi.. > > appRoot is read from the SetEnv WT_APP_ROOT as defined in .htaccess > > But the same is not propogated to the WApplication when run under mod_fcgid > > This is the test code: > --- code starts > std::string config_file = "Config File: "; > config_file += env.getCgiValue("WT_CONFIG_XML"); > > std::string app_root_path = "App Root: "; > app_root_path += env.getCgiValue("WT_APP_ROOT"); > > root()->addWidget(new Wt::WText("<strong>Cgi Values</strong>")); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText(config_file)); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText(app_root_path)); > > for (int i = 0; i < 4; ++i) > root()->addWidget(new Wt::WBreak()); > > root()->addWidget(new Wt::WText("<strong>Wt Env Values</strong>")); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText("appRoot: " + WApplication::appRoot())); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText("docRoot: " + WApplication::docRoot())); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText("env::appRoot: " + > environment().getCgiValue("WT_APP_ROOT"))); > > for (int i = 0; i < 4; ++i) > root()->addWidget(new Wt::WBreak()); > > root()->addWidget(new Wt::WText("<strong>Server Values</strong>")); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText("appRoot: " + > Wt::WServer::instance()->appRoot())); > > for (int i = 0; i < 4; ++i) > root()->addWidget(new Wt::WBreak()); > > root()->addWidget(new Wt::WText("<strong>Nascent Env</strong>")); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText(::getenv("WT_APP_ROOT"))); > // root()->addWidget(new Wt::WText(std::string("appRoot: ") + > ::getenv("WT_APP_ROOT"))); > root()->addWidget(new Wt::WBreak()); > root()->addWidget(new Wt::WText(::getenv("WT_CONFIG_XML"))); > // root()->addWidget(new Wt::WText(std::string("configFile: ") + > ::getenv("WT_CONFIG_XML"))); > --- code ends > > Here is the output: > --- output starts > Cgi Values > Config File: > App Root: /home/bvr/wt/approot > > Wt Env Values > appRoot: > docRoot: /var/www/html > env::appRoot: /home/bvr/wt/approot > > Server Values > appRoot: > > Nascent Env > --- output ends > > ::getenv outputs nothing > getCgiValue holds the value, > but WApplication->appRoot() is empty > > The config is Wt 3.3.4 + Boost v1.58 + GCC-4.9.2 + Apache 2.4 + mod_fcgid > v2.3.9 > > Where lies the problem? > > r > > -- > (B.V. Raghav) > P: +91-9450988137 > ------------------------------------------------------------------------------ _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest