PDA

View Full Version : Drupal sites escaping Full HTML since Bluehost upgraded my site to CentOS 6



Kasha
04-28-2012, 08:38 AM
My website on BlueHost was recently upgraded from CentOS 5 to CentOS 6. I have several Drupal 6 sites and just noticed that since the upgrade, when I use the Full HTML or PHP input format, the code is escaped. For example, when creating a block using input format Full HTML, when I enter this code:


<p><a href="/">Home</a> | <a href="/about-us">About Us</a> | <a href="/gallery">Gallery</a> | <a href="/contact">Contact Us</a></p>

After I save the block the code is automatically escaped to look like this:


<p><a href=\"/\">Home</a> | <a href=\"/about-us\">About Us</a> | <a href=\"/gallery\">Gallery</a> | <a href=\"/contact\">Contact Us</a></p>

This is happening in all my Drupal sites even though I haven't made any changes to the basic configuration. It did not happen prior to the upgrade. I've cleared my cache but this didn't have any effect. Is anyone else who has a Drupal site on BlueHost experiencing this problem? Perhaps the upgrade to CentOS 6 is only a coincidence, but that's the only recent change in my sites. I am using the most recent version of Drupal 6 (v. 6.25).

I have another Drupal site on a different host (not BlueHost) and this is not happening on that site.

Thanks for any insight you may be able to provide.

techieshark
04-28-2012, 05:20 PM
I've noticed the same thing. This is really annoying.

deardive
04-29-2012, 01:23 AM
See http://drupal.org/node/1437998.

german
04-29-2012, 04:41 AM
I have the same problem.

deardive
04-29-2012, 06:58 AM
Magic quotes is deprecated and should generally be off.

Or:

The problem (introduced 2012) is that the true state of the system and the declared runtime state are different. The directive in .htaccess that says
php_value magic_quotes_gpc 0
is actually ineffective, but is what is confusing Drupal.
Remove it or comment it out from your Drupal .htaccess file.

Kasha
04-29-2012, 07:40 AM
Updating the .htaccess file didn't work for me, but I took your advice, deardrive, and edited my root php.ini. I set magic_quotes_gpc to off and that solved the problem. Thanks so much! This has been driving me crazy. For anyone who needs the "how to", edit the root php.ini file in your site, and change this line:

magic_quotes_gpc = On

to this:

magic_quotes_gpc = Off

mmorsi
04-29-2012, 10:37 PM
Updating the .htaccess file didn't work for me, but I took your advice, deardrive, and edited my root php.ini. I set magic_quotes_gpc to off and that solved the problem. Thanks so much! This has been driving me crazy. For anyone who needs the "how to", edit the root php.ini file in your site, and change this line:

magic_quotes_gpc = On

to this:

magic_quotes_gpc = Off

Ran into the same issue this morning and this worked for me (drupal 6 on hostmonster). Here is what I did to resolve this

* open ~/public_html/php.ini w/ a test editor and change all lines with 'magic_quotes_gpc = On' to 'magic_quotes_gpc = Off'

* symlinked this file into my drupal directory (as inctructed at the top of php.ini)
ln -s ~/public_html/php.ini ~/public_html/blog/

After that (and a quick refresh) drupal was back to working as normal!

drupaldevelopers
06-17-2012, 10:29 PM
Hey guys if any of you are interested to know more about Drupal and integration http://www.dckap.com/webinar-detail.htm?pid=23