HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   API Nginx directives problems (http://www.howtoforge.com/forums/showthread.php?t=61028)

abdi 20th March 2013 08:22

API Nginx directives problems
 
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

falko 25th March 2013 10:54

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

abdi 25th March 2013 21:52

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);


All times are GMT +2. The time now is 03:05.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.