PDA

View Full Version : Multiplying backslash (\\) problem


ian_d
05-10-2005, 22:49
I'm currently using version 1.1beta1, but I've been experiencing this problem for a couple of versions. There is a thread that was started about this problem in version 1.1aplha5, but no fixes were submitted and Alexei has not responded, so I don't know if he's aware of this.

I tried reviving the initial thread with no result so here goes.

Every time I update or create an item, Zabbix doubles the amount of backslashes (ie: \ becomes \\ becomes \\\\ and so on...) if they are present. It seems to do this in all fields where it is possible to enter a \ (description, key, unit, etc)

I had previously gotten around this by using forward slashes in a file size monitoring key. But that doesn't work for perf_counters, wich I am trying to set up.

I do not wish to go mucking in the database like others have done, so this problem is leaving me with a much less functional Zabbix than I would like.

I haven't seen this resolved in any thread. Please, any help would be appreciated.

Ian

bytesize
06-10-2005, 12:35
Hi,

Edit your php.ini and change make sure the values below are set to Off:

magic_quotes_gpc = Off
magic_quotes_runtime = Off

Restart apache, then edit the items so your perf_counter only has one backslash. Click "Update" and hey presto, it should work!

If not, try deleting the item and re-adding it again. If it works, the item will only show one backslash in the host items listing.

Regards,

John

Nate Bell
06-10-2005, 16:08
Well I'll be. I didn't have the same problem as the parent poster, but if I ever entered a ' in a description, it looked like Zabbix would add a \ before it. Turns out it was php's dirty work. I turned off the magic_quotes, and was able to add a ' without an extra \.

Thanks for the tip!

Nate

Alexei
06-10-2005, 18:24
Hi,
magic_quotes_gpc = Off
magic_quotes_runtime = Off
Nice tip! That perfectly explains why I've never had this problem on my latest ZABBIX test system.

I'll try to make ZABBIX immune to these PHP parameters if it can be achieved.

ian_d
06-10-2005, 20:15
Excellent! This does indeed work!

Thanks bytesize!

Ian