API Nginx directives problems

Discussion in 'Developers' Forum' started by abdi, Mar 20, 2013.

  1. abdi

    abdi New Member

    Hello Till,

    I just noticed that when you save an Nginx directive through API eg:

    Code:
    location / {
            rewrite "^/blogs[/]{0,1}$"   /modules/boonex/blogs/blogs.php last;
    }
    
    The finel results that are passed to the vhost file are:
    Code:
    location / {
            rewrite \"^/blogs[/]{0,1}$\"   /modules/boonex/blogs/blogs.php last; 	
    }
    
    As you have noticed, it adds \" where there is "
    With that modification, it kills the directives and thus they can NOT work.

    Is this a configuration problem or a bug (I report it in bug tracker)?

    NB: I would like to make that change in the API file it self if its embeded there then will pass it to you if its a bug ...But I request that you point me to the location of the API functions on the debian server.

    Joseph
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Works for me. Please check your PHP settings (e.g. magic_quotes_gpc).
     
  3. abdi

    abdi New Member

    Thanks Falko,
    Though I have:

    Code:
    magic_quotes_gpc = Off
    magic_quotes_runtime = Off
    magic_quotes_sybase = Off
    
    Never the less I seem to have resolved it with:

    Code:
    $params['nginx_directives'] = stripslashes($nginx_directives);
    
     

Share This Page