Just moved a Drupal Rc1 site to production, I got a really weird error. I started getting slashes every where, then after a bit of pulling hair out I remembered that hey this is this magic quote rubbish.

Drupal is not checking this correctly.

Comments

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

Could you give more detail please?

Where do you see slashes? And what do you mean by magic quotes?

roam2345’s picture

The PHP variable magic quote's if it is enabled drupal no longer checks that it is disabled on the status report page.

joachim’s picture

From the PHP manual:

> This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

I suspect the answer here is that you should not run Drupal with mq enable.

bojanz’s picture

Status: Postponed (maintainer needs more info) » Active

But why is Drupal not giving a warning anymore?
We require PHP 5.2, where magic quotes aren't deprecated, and we expect it to be off...

I see that we have this in htaccess:

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off
</IfModule>

so I guess that part is not really working for jucallme.

roam2345’s picture

@bojanz that was my case. I had developed everything on a php 5.3 environment. My hosting company is only using php 5.2. So when I had moved everything over. It just had slashes every where.

All I expected drupal to say was hey your php environment is wrong buddy.

I dought it has anything to do with this bug but when I checked this in php.info it said it was off. Only when I forced an over-rider in my php profile was the variable correctly switched off.

bojanz’s picture

So wait, phpinfo() said that magic quotes was off, but you still got the wrong behaviour? In that case, what exactly can Drupal do? Not much...

cosmicdreams’s picture

Status: Active » Postponed (maintainer needs more info)
bkosborne’s picture

Not sure if this is related to me...

I'm on a server running php 5.2.9 and I'm getting slashes everywhere. Magic quotes are turned off, as confirmed in php_info. This happens on a fresh install of D7 RC4. Tried a fresh install of D6.20 with no problem. Totally confused, not sure what else to do and it's driving me nuts!

bdragon’s picture

Do you by any chance have a poorly configured mod_security running?

bkosborne’s picture

Not sure, there is nothing about mod_security in my php_info

damien tournoud’s picture

chx’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Based on Damien's comment.