The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Squirrelmail adding back slashes to everything

Discussion in 'E-mail Discussions' started by ttremain, Feb 2, 2012.

  1. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    For some reason, squirrelmail has started adding backslashes to everything. Apostrophes & double quotes specifically.

    This is happening in the body of emails, and in the subject lines.

    Anyone else see this, or have a suggestion for me?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    There are reports that having magic_quotes_runtime, magic_quotes_gpc or magic_quotes_sybase on in the php.ini file may cause that issue in Squirrelmail.

    Have you made any recent changes to php.ini for cPanel on the machine? The php.ini used by Squirrelmail is typically at /usr/local/cpanel/3rdparty/etc/php.ini :

    Code:
    grep ^magic /usr/local/cpanel/3rdparty/etc/php.ini
    You should see the following return if these are off:

    Code:
    root@host [~]# grep ^magic /usr/local/cpanel/3rdparty/etc/php.ini
    magic_quotes_gpc	=	Off		; magic quotes for incoming GET/POST/Cookie data
    magic_quotes_runtime=	Off		; magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
    magic_quotes_sybase	=	Off		; Use Sybase-style magic quotes (escape ' with '' instead of \')
     
  3. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    I've made no manual changes to /usr/local/cpanel/3rdparty/etc/php.ini

    Any changes would have been made through WHM.

    All of the magic_quotes_* settings are off.

    I'd like to think most PHP scripts are smart enough to check if magic_quotes are on or off, but I know that is not always the case. Every now and then I find in my own code somewhere that I've forgotten to use mysql_real_escape_string(). I am glad to hear that PHP 6 will be removing magic_quotes altogether.

    I'm drifting from the subject though.

    I've added a file with phpinfo() to test, and all these options are still off.

    I've run server.name:2095/3rdparty/squirrelmail/src/configtest.php And it shows everything okay.
    (configtest.php will test for magic_quotes, supposedly)
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Thomas,

    I don't know what would be causing the issue then. Since you have root access to the machine, would you be able to open up a ticket using WHM > Support Center > Contact cPanel or using the link in my signature?

    Thanks!
     
Loading...

Share This Page