Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I ran into bug last night related to saving graph template items. Under certain conditions saving a graph template item could cause all attached graphs to swap data sources. If you don't play with graph templates, don't both with this patch, otherwise I recommend applying it.
To apply, download to your Cacti directory and apply like so:
If the patch is important enough (like this one), I will post a note to the message board.
Edit: If you have already been bitten by this bug, simply go back into the graph template and re-save the affected graph items after aplying this patch.
-Ian
Last edited by raX on Sat Apr 03, 2004 4:53 pm, edited 1 time in total.
PS: Does anyone know how to disable PHP parsing on a per-directory basis for Apache 2? I tried using 'php_admin_flag', 'RemoveHandler', and 'RemoveType' all to no avail.
I couldnt patch my cacti0.85 because the system (linux) never return me the prompt, but i changed template.php with the new one patched. And with this way i got same results, the traffic_in not change when i try to modify it.
raX wrote:I ran into bug last night related to saving graph template items. Under certain conditions saving a graph template item could cause all attached graphs to swap data sources. If you don't play with graph templates, don't both with this patch, otherwise I recommend applying it.
To apply, download to your Cacti directory and apply like so:
If the patch is important enough (like this one), I will post a note to the message board.
Edit: If you have already been bitten by this bug, simply go back into the graph template and re-save the affected graph items after aplying this patch.
-Ian
Hi Ian,
I did this but my problem still exists in cacti-0.8.5
I still can't change max value of traffic_in...
raX wrote:PS: Does anyone know how to disable PHP parsing on a per-directory basis for Apache 2? I tried using 'php_admin_flag', 'RemoveHandler', and 'RemoveType' all to no avail.-Ian
What option did you try using with php_admin_flag?
Just did a Google search for "disable php parsing per-directory basis"...
engine (boolean)
This directive is really only useful in the Apache module version of PHP. It is used by sites that would like to turn PHP parsing on and off on a per-directory or per-virtual server basis. By putting engine off in the appropriate places in the httpd.conf file, PHP can be enabled or disabled.
So I think it would be
php_flag engine off
or maybe
php_admin_flag engine off
Hopefully that will get you one step closer at least
I tried doing this and it appeared to have no effect. Someone told me that this only works when your PHP is in CGI mode, which mine is definitely not. I haven't seen this confirmed on any websites though.
I tried doing this and it appeared to have no effect. Someone told me that this only works when your PHP is in CGI mode, which mine is definitely not. I haven't seen this confirmed on any websites though.
I just checked my httpd.conf (Redhat9) and noticed I wasn't using any php_admin_flag's, just php_admin_value's..
e.g. php_admin_value session.use_trans_sid 0
Hours past my bed time again, I'll try ASAP to set engine_off on a subdirectory of a vhost, but you might try php_admin_value engine 0 in a <Directory...>? Not sure if you can nest directories inside of vhosts or if you can just use the full path outside of a vhost though, never tried yet..
I tried doing this and it appeared to have no effect. Someone told me that this only works when your PHP is in CGI mode, which mine is definitely not. I haven't seen this confirmed on any websites though.
Thanks for your suggestions!
-Ian
Err, sleep can wait for the likes of you )
I just tested on apache 2.0.48 / Redhat9 / PHP 4.3.4
A vhost is set up for /home/emagic/html.. Right below the <directory...> for it I have this:
<Directory "/home/emagic/html/test">
php_admin_value engine 0
</Directory>
and it served up a little test index.php as plain text as soon as I set that up.
I figured it out! There was another reason why my "AddType text/plain .php" was not working. Apparently Redhat doesn't use AddType to assign PHP to .php files, but SetOutputFilter. I just replaced this statement with "AddType application/x-httpd-php .php", and all is well.
I was having graph template issues (items swapped, not appearing etc) - replaced my template.php and data_sources.php with the new ones and now I get this on save of any graph item:
Warning: Cannot modify header information - headers already sent by (output started at /export/web/crawlspace/htdocs/cacti-0.8.5/lib/template.php:1162) in /export/web/crawlspace/htdocs/cacti-0.8.5/graph_templates_items.php on line 192
Also noticed the graph template item has a
Data Source [Field Not Templated]
next to it
fletch wrote:I was having graph template issues (items swapped, not appearing etc) - replaced my template.php and data_sources.php with the new ones and now I get this on save of any graph item:
Warning: Cannot modify header information - headers already sent by (output started at /export/web/crawlspace/htdocs/cacti-0.8.5/lib/template.php:1162) in /export/web/crawlspace/htdocs/cacti-0.8.5/graph_templates_items.php on line 192
There are only 1159 lines in the 'lib/template.php' file, which makes me think you have extra whitespace at the bottom. Simply getting rid of this whitespace should eliminate your error.