Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: magic_quotes_gpc Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
lessthan
Newbie
Newbie


Joined: 29 October 2006
Location: United Kingdom
Online Status: Offline
Posts: 12
Posted: 02 November 2006 at 6:55am | IP Logged Quote lessthan

On the basis of your earlier advice, I was convinced that magic_quotes_gpc was set to "on" on my server and that there was nothing that I could do about it. I continue to get slashes in front of the single and double quote characters in e-mail body and headers.

I therefore looked at the php documentation very carefully and produced this modified test script:-

<?php
if (!get_magic_quotes_gpc()) {
   ?>
    magic_quotes_gpc on (true)
   <?php
} else {
   ?>
    magic_quotes_gpc off (false)
   <?php
}
print ("<br>");
if (!get_magic_quotes_runtime()) {
   ?>
    magic_quotes_runtime on (true)
   <?php
} else {
   ?>
    magic_quotes_runtime (false)
   <?php
}
?>

The results came as:-

magic_quotes_gpc off (false)
magic_quotes_runtime on (true)

This seems to contradict your advice. I have included magic_quotes_runtime as well: this is purely to make sure that you have all the available information, as I am not clear if it is relevant to the discussion.

Is my script at fault?

Sorry to bother you further on this issue, but I wanted to be clear about what you said.

Thanks again,


Talat
Back to Top View lessthan's Profile Search for other posts by lessthan
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 02 November 2006 at 9:39am | IP Logged Quote Andrew

int get_magic_quotes_gpc (void) returns the current configuration setting of magic_quotes_gpc (0 for off, 1 for on).

int get_magic_quotes_runtime (void) returns the current active configuration setting of magic_quotes_runtime (0 for off, 1 for on).

There is an error in your code:

Code:

if (!get_magic_quotes_gpc())
{
   // This means get_magic_quotes_gpc is off
}
else
{
   // This means get_magic_quotes_gpc is on
}

if (!get_magic_quotes_runtime())
{
   // This means get_magic_quotes_runtime is off
}
else
{
   // This means get_magic_quotes_runtime is on
}


Thus, you have inverse magic quotes state. Actually "magic quotes" on your server are in the following state:

magic_quotes_gpc on (true)
magic_quotes_runtime off (false)


We'll implement "magic quotes" workaround soon.


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
lessthan
Newbie
Newbie


Joined: 29 October 2006
Location: United Kingdom
Online Status: Offline
Posts: 12
Posted: 02 November 2006 at 10:00am | IP Logged Quote lessthan

Thanks, Andrew! I had it backwards! At least now I know what the situation is, before I run any other php scripts. I gather from various forums that this function of php annoys a lot of people.

Best wishes,


Talat
Back to Top View lessthan's Profile Search for other posts by lessthan
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide