warning: shell_exec() has been disabled for security reasons in /home/mysite/public_html/modules/massmailer/engines/phplist/phplist.module on line 731.

Can anyone tell me what could be the cause of this error? i got it as i tried to send an email out via the massmailer module

Comments

jbrauer’s picture

Your PHP configuration doesn't allow the 'shell_exec()' function. This is one of the functions disabled when PHP is run in Safe Mode. (More info from the PHP manual.)

------------------
Adding Understanding

--

underpressure’s picture

Is this an issue due to server settings or can i correct this from with in the Drupal file?

  }

  return ''.shell_exec('env -i modules/massmailer/engines/phplist/bin/phplist -p processqueue -c ../../config.php -d '. $_SERVER['PHP_SELF'] .' -h '. $_SERVER['HTTP_HOST']).'';

}

Regards,
underpressure
http://ravalonline.com

jbrauer’s picture

It's a setting in your host's PHP configuration. Taking the offending line out would perhaps prevent the error message but the module wouldn't work without that line.

------------------
Adding Understanding

--

underpressure’s picture

I've contacted my host waiting for a response. will let you guys know

Regards,
underpressure
http://ravalonline.com

jbrauer’s picture

Consider this errant duplicate comment deleted.
------------------
Adding Understanding

--

underpressure’s picture

click on the link to see what my host has to say on the matter. please note this is page 3 of 4.

http://jewlzk.com/forums/showthread.php?t=157&page=3

i think i might be more confused that when i started. if anyone can help please do i would love to get pass this headache. or is there another type of massamailer module that i'm not aware of?

Regards,
underpressure
http://ravalonline.com

heine’s picture

There's another way to disable functions, that's often used in conjunction with, but not dependant on safe mode: the directive disable_functions.

As the name suggests, this directive disables functions.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

jbrauer’s picture

Do you have access to edit your PHP settings (php.ini)?

You can also create a page that has PHP info - phpinfo(); in it so you can see the settings of PHP. Look for Safe Mode settings and disable functions.

--------------------------
Adding Understanding

--

underpressure’s picture

i don't have access to php.ini well atleast i don't think so.

my host says:
linux servers well redhat, don't run safe mode in PHP, its impossible, doesn't have the function.

i just don't know what to do anymore i'm just so fedup.

Regards,
underpressure
http://ravalonline.com

mwu’s picture

we need a page in handbook on installing php
http://drupal.org/requirements#comment-139919

underpressure’s picture

can anyone recommend an alternative module or a solution?

Regards,
underpressure
http://ravalonline.com

discursives’s picture

Thanks very much to the Drupal community!

A fresh install of CivicSpace 0.8.3, and I turned Massmailer and phplist on. All else looks fine.

Host assures me that we are running php with safe mode disabled. php 4+ is installed.

But still this error. Is it that the host is lying to me? Is there some nuance that is not being brought to light? They really are helpful folks. I want to believe them, but I have been through my installs and all looks well.

I do not have a cgi directory or the like, or access to php.ini as far as I can see. I have shell access, but a custom php.ini may require me to compile my own php. Is this really the only solution? Or can I use shell access in some other tricky way?

Thank you so much for the help. The host, BTW, is Dreamhost.

Steve Halleman’s picture

I had the same problem. I am installing civcspace. I got a copy of civicspace 0.8.4-alpha1. This uses curl instead of shell_exec. My webhost had no problem with it. I had to comment out the statemnt that checks for the availability of shell_exec. After that this error went away.

I still haven't gotten massmailer to work, but I did get past that error.

Regards,

Steve Halleman

underpressure’s picture

thanks every bit helps

Regards,
underpressure
http://ravalonline.com