[Solved] Page editing escapes characters (0.9.5)

Feed 8 posts, 5 voices

Avatar
3 posts

Hi,

When I’m editing pages in my 0.9.5 installation, with filter set to —none—, Frog CMS escapes characters in my php code, making the script useless.

For instance:
When I write <?php echo 'Hello'; ?>, Frog CMS turns it into <?php echo \'Hello\'; ?>

I can’t find any info on this on the forum and I find it quite strange that nobody else is experiencing the same problem.

Please advice

Anders

 
Avatar
291 posts

Your PHP has magic quotes on. What version of Frog are you running. IIRC new versions of Frog disable magic quotes automagically.

 
Avatar
67 posts

Hi Anders,

Nope can’t reproduce that…

Think about it, if it were so, the world would end :)

OK – O/S, Browser ?
At what point does the escaping happen ?
( as in, after you hit enter on that line ? After you save the page ? )

Cheers Dave

 
Avatar
3 posts

Thank you for your feedback guys. I figured it probably had something to do with magic quotes, but I can’t seem to resolve it.

Client:
OS: Windows XP SP3
Browser: FireFox 3, Chrome and IE7

Server:
OS: Linux 2.6.18-028stab060.8 #1 SMP Mon Feb 9 20:25:36 MSK 2009 i686
Webserver: Apache 2.2.9
PHP: Version 5.2.6
magic_quotes_gpc: Local Off, Master On (reported by phpinfo() )

I’ve also tried to set “php_value magic_quotes_gpc off” in my .htaccess

Also, get_magic_quotes_gpc() return 0.

I do not control the httpd.conf file of the web-server, so I’m not able to change anything there.

Are there any other .htaccess/php_value settings I might try to set to affect the problem?

Anders

 
Avatar
3 posts

Might this be related?

I’ve created test.php:

Click <a href="test.php?test=a'b">this link</a><br/>
<?php
echo "get_magic_quotes_gpc() returns " . get_magic_quotes_gpc() . "<br/>";
print '$_GET["test"] is: ' . $_GET['test'] . "<br/>";

phpinfo();

?>

and .htaccess:

php_flag magic_quotes_gpc off

phpinfo() reports magic_quotes_gpc to be off, get_magic_quotes_gpc() returns 0, but@ $_GET[‘test’]@ still is set to a\'b...

 
Avatar
3 posts

It seems my host has set php_admin_flag magic_quotes_gpc on, so I can’t override it in .htaccess.

Found the hint here

Applied this workaround in index.php

I’m not happy with the solution, but it seems to work. Have to contact my web host to get this fixed I guess.

The odd thing, though, is that phpinfo() reports magic_quotes_gpc as off even though it’s actually enabled.

 
Avatar
96 posts

norfa,

Did you resolve this issue with your host? Can you give details please?

 
Avatar
96 posts

My problem solved – see http://forum.madebyfrog.com/topic/1378?page=1#post_8944

 
Avatar
10 posts

you can create a “php.ini” file with “magic_quotes_gpc=off” on the first line.
when you place the file in your website folder “httpdocs/ or public_html/” just what its called, you wont have anymore problems with .htaccess files or Magic Quotes.