Hi smokepinger's<br><br>I run smokeping on many boxes and and my Gentoo/Funtoo boxes frequently run into localization setup issues which will bomb out Smokeping's web interface. It works fine invoked from the shell. I use the attached patch to help me diagnose the server setup problem. The behavior is identical to current Smokeping in that it logs a message and throws a HTTP 500 error. The basic Smokeping localization sanity check has uncovered "insane" setups where the PERL %ENV environment variables are being ignored by "setlocale" on several of my boxes for unknown reasons. Obviously, smokeping should quit, which it does...<br>
<br>Here is what I do to get Smokeping up and running in preference order on linux.<br><br>1) check <span style="font-family: courier new,monospace;">/etc/locale.gen</span> and run "<span style="font-family: courier new,monospace;">sudo locale-gen</span>"<br>
2) clear the <span style="font-family: courier new,monospace;">LC_ALL</span> environment variable from the environment (<span style="font-family: courier new,monospace;">/etc/profile.env</span>)<br>3) Set <span style="font-family: courier new,monospace;">LC_NUMERIC</span> in the mod_perl apache config<br>
<br><span style="font-family: courier new,monospace;"><Location /cgi-perl/*.pl></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> SetHandler perl-script</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> PerlResponseHandler ModPerl::PerlRun</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Options -Indexes ExecCGI</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> PerlSendHeader On</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> # for smokeping</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> PerlSetEnv LC_NUMERIC C</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> Order allow,deny</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> Allow from all</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></Location></span><br><br>4) Add "<span style="font-family: courier new,monospace;">export LC_NUMERIC C</span>" to the apache init script<br>
<br><br>Recent builds of apache 2.2.15, perl 5.10.1, mod_perl 2.0.4, and libc 2.10.1 are taking the most drastic action which makes me think there is a bad upstream bug in LOCALE handling. Even setting "PerlSetEnv LC_ALL C" in the apache config doesn't work which indicates the perl setlocale() call isn't working as documented. I'd be interested in feedback on the patch or pointers into what else to do to get the locale setup correctly. I run the Gentoo recommended <span style="font-family: courier new,monospace;">LANG="en_US.UTF-8"</span>. <br>
<br>Lee Thompson<br>