[nycphp-talk] Error from PHP system function
Rolan Yang
rolan at omnistep.com
Sat Dec 1 09:04:05 EST 2007
Nelly Yusupova wrote:
> Here is the command that I'm trying to execute.....
>
> system ("/usr/bin/wget -P/tmp --post-data
> 'subscribees=$email&adminpw=$password&send_welcome_msg_to_this_batch=0&send_
> notifications_to_list_owner=0'
> http://www.emdrhap.org/mailman/admin/$list/members/add", $returnval);
>
> Nelly.
>
Try something like
$cmd= "/usr/bin/wget -P/tmp --post-data
'subscribees=$email&adminpw=$password&send_welcome_msg_to_this_batch=0&send_notifications_to_list_owner=0'
http://www.emdrhap.org/mailman/admin/$list/members/add";
print $cmd;
system($cmd,$returnval);
to see if there might be something funky going on with the command line.
Have you properly escaped the $list, $email, and $password? If a space
creeps up in there it could throw it all off.
If all else fails, you might want to try the CURL functions to post and
retrieve data from a remote script.
~Rolan
More information about the talk
mailing list