PDA

View Full Version : Double quotes in apache directives


simonbun
12th January 2007, 17:40
Hi,

I'm trying to use double quotes (") in the extra apache directives, yet they get changed to single quotes. Is there any way to use them?

I need them in a directive for setting a path for python
PythonPath "['/var/www/web4'] + sys.path"

The directive seems to need double quotes. I tried replacing them and leaving them out, but it doesn't work.

Thanks,
Simon

martinfst
12th January 2007, 18:37
What about escaping the special char's with a \
PythonPath [\'/var/www/web4\'] \+ sys.path
Or shouldn't the + sign be changed to a = sign?

simonbun
12th January 2007, 18:58
'fraid not, no.

Here's the syntax for the directive: http://modpython.org/live/current/doc-html/dir-other-pp.html

till
13th January 2007, 13:49
I dont think that there is code in ISPConfig that changes double quotes to single quotes in the apache directives field. But you may have a look at the isp_isp_web.lib.php file.

simonbun
13th January 2007, 15:02
Hmm thats odd. Every double quote i use in the apache directives get changed to a single quote on saving the form. I couldn't find anything suspicious in that file, till.

If its not ispconfig, what could be causing that?

martinfst
13th January 2007, 15:23
Maybe related to php magic_quotes?:confused:

simonbun
14th January 2007, 17:05
Magic quotes are off, but that shouldn't replace double quotes with single quotes. In fact i've never heard of a setting that does this.

No-one has seen this kind of behavior before? I'm using the latest stable version of ispconfig by the way.

till
14th January 2007, 18:23
I made a mistake. This behaviour is caused by the ISPConfig code. Please try to comment out line numeber 83:

$to_check = strtr($to_check, "\"", "'");

in the file /home/admispconfig/ispconfig/lib/classes/ispconfig_doc.lib.php

simonbun
15th January 2007, 09:28
Thanks till, that was the culprit indeed. So far i've not run into side-effects, but i'll report back here when/if i do.