Ad Widget

Collapse

Multiplying backslash (\\) problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ian_d
    Junior Member
    • Sep 2005
    • 11

    #1

    Multiplying backslash (\\) problem

    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
    Member
    • Aug 2005
    • 71

    #2
    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

    Comment

    • Nate Bell
      Senior Member
      • Feb 2005
      • 141

      #3
      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

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Originally posted by bytesize
        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.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • ian_d
          Junior Member
          • Sep 2005
          • 11

          #5
          Excellent! This does indeed work!

          Thanks bytesize!

          Ian

          Comment

          Working...