Sep 13 2007

PHPlist, Drupal, and magic_quotes

Published by Eric at 11:11 am under Blogs, Linux, Web 2.0

If you’re attempting to run an installation of PHPlist alongside Drupal you’ll find PHPlist complains about settings for magic quotes. I can’t vouch for the completeness of this fix but it gets rid of the errors without breaking anything else.

Assuming you installed the lists folder in the root of your Drupal site, you’ll find that an htaccess file in your Drupal install is changing the magic quotes values which are impacting PHPlist. You can override this for PHPlist using another htaccess file. Navigate into the lists folder for PHPlist and create an .htaccess file with the contents:

# Changes for PHPlists running on a Drupal installation

php_value magic_quotes_gpc        1
php_value magic_quotes_runtime    0

Word of warning: don’t modify your host’s PHP.INI for these settings as it will likely break something else if you host multiple domains. In my case it broke WordPress so stick with the htaccess method.

3 Responses to “PHPlist, Drupal, and magic_quotes”

  1. votaon 16 Oct 2007 at 9:11 am

    Hi,

    I have a multisite drupal installion.

    I have installed phplist in the root.

    the .htaccess file in the lists directory already has a .htaccess file with the following data

    DirectoryIndex index.php

    Order allow,deny
    deny from all

    Order allow,deny
    allow from all

    php_flag magic_quotes_gpc on

    this is phplist 2.10.5

    changing

    php_flag magic_quotes_gpc on

    to

    php_value magic_quotes_gpc 1
    php_value magic_quotes_runtime 0

    makes no difference. I still get the warning message in the phplist web admin interface :

    Warning: Things will work better when PHP magic_quotes_gpc = on

    any ideas?

    thank you

  2. ericon 16 Oct 2007 at 12:57 pm

    My .htaccess file in /lists contains only the lines in my original post - yours has a few other commands. I would try commenting or removing them to see the result.

    To check if Apache is using your .htaccess file try changing the DirectoryIndex value to point to another file and see what happens.

  3. votaon 20 Oct 2007 at 8:21 am

    Thanks.

    I changed the file to only include

    # Changes for PHPlists running on a Drupal installation

    php_value magic_quotes_gpc 1
    php_value magic_quotes_runtime 0

    but still getting the warning message

    cheers

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.