Sep 13 2007
PHPlist, Drupal, and magic_quotes
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”
Leave a Reply
You must be logged in to post a comment.

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
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.
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