NYCPHP Meetup

NYPHP.org

[nycphp-talk] Error from PHP system function

Nelly Yusupova nelly at cgim.com
Sun Dec 2 12:20:21 EST 2007


Thank you all for your suggestions.   

Although I have no idea why the old script stopped working on the new
server,  I was able to accomplish the same task with CURL functions.

Thank you again!

Sincerely,
Nelly Yusupova
Webgrrls International
nelly at cgim.com
917 603-9226 (phone)
http://www.webgrrls.com

***************************************************************
JOIN WEBGRRLS AT THE NYC WEBGRRLS HOLIDAY CELEBRATION ON DECEMBER 6TH!

For more details and to RSVP, go to: http://www.webgrrls.com/newyork-ny/

***************************************************************


-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Rolan Yang
Sent: Saturday, December 01, 2007 9:04 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Error from PHP system function

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

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php





More information about the talk mailing list