Syntax error
While trying to run your script (accessing it by web browser) i get this error on httpd:
AH01215: /var/www/html/lvs_stats/index.cgi:114: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\\n' Sep 10 16:26:36.019002 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "d": str2.sub!("day", "<b>day</b>") Sep 10 16:26:36.019046 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019115 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:115: syntax error, unexpected keyword_when, expecting keyword_end Sep 10 16:26:36.019150 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "w": str2.sub!("week", "<b>week</b>") Sep 10 16:26:36.019160 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019207 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:115: syntax error, unexpected ':', expecting keyword_end Sep 10 16:26:36.019233 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "w": str2.sub!("week", "<b>week</b>") Sep 10 16:26:36.019252 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019403 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:116: syntax error, unexpected keyword_when, expecting keyword_end Sep 10 16:26:36.019446 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "m": str2.sub!("month","<b>month</b>") Sep 10 16:26:36.019455 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019538 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:116: syntax error, unexpected ':', expecting keyword_end Sep 10 16:26:36.019603 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "m": str2.sub!("month","<b>month</b>") Sep 10 16:26:36.019625 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019676 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:117: syntax error, unexpected keyword_when, expecting keyword_end Sep 10 16:26:36.019710 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "y": str2.sub!("year", "<b>year</b>") Sep 10 16:26:36.019727 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019885 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:117: syntax error, unexpected ':', expecting keyword_end Sep 10 16:26:36.019928 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "y": str2.sub!("year", "<b>year</b>") Sep 10 16:26:36.019963 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.020008 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:106: warning: assigned but unused variable - str Sep 10 16:26:36.020114 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:121: syntax error, unexpected keyword_end, expect
I have CentOS 7 64bits, with rrdtool-ruby-1.4.8-8 ruby-2.0.0.598-2 rrdtool-1.4.8-8.
I've tried replacing : with , but then on the web browser i got "actconn and inactconn"
While trying to run your script (accessing it by web browser) i get this error on httpd:
AH01215: /var/www/html/lvs_stats/index.cgi:114: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\\n' Sep 10 16:26:36.019002 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "d": str2.sub!("day", "<b>day</b>") Sep 10 16:26:36.019046 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019115 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:115: syntax error, unexpected keyword_when, expecting keyword_end Sep 10 16:26:36.019150 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "w": str2.sub!("week", "<b>week</b>") Sep 10 16:26:36.019160 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019207 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:115: syntax error, unexpected ':', expecting keyword_end Sep 10 16:26:36.019233 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "w": str2.sub!("week", "<b>week</b>") Sep 10 16:26:36.019252 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019403 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:116: syntax error, unexpected keyword_when, expecting keyword_end Sep 10 16:26:36.019446 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "m": str2.sub!("month","<b>month</b>") Sep 10 16:26:36.019455 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019538 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:116: syntax error, unexpected ':', expecting keyword_end Sep 10 16:26:36.019603 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "m": str2.sub!("month","<b>month</b>") Sep 10 16:26:36.019625 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019676 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:117: syntax error, unexpected keyword_when, expecting keyword_end Sep 10 16:26:36.019710 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "y": str2.sub!("year", "<b>year</b>") Sep 10 16:26:36.019727 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.019885 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:117: syntax error, unexpected ':', expecting keyword_end Sep 10 16:26:36.019928 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: when "y": str2.sub!("year", "<b>year</b>") Sep 10 16:26:36.019963 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: Sep 10 16:26:36.020008 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:106: warning: assigned but unused variable - str Sep 10 16:26:36.020114 2015 [cgi:error] 26671 192.168.204.67:53968 AH01215: /var/www/html/lvs_stats/index.cgi:121: syntax error, unexpected keyword_end, expect
I have CentOS 7 64bits, with rrdtool-ruby-1.4.8-8 ruby-2.0.0.598-2 rrdtool-1.4.8-8.