Dynadot โ€” .com Registration $8.99

System(); Limits

Spaceship Spaceship
Watch

buddybuddha

Established Member
Impact
2
Ok, yet another post about the solution to the same problem.

I am using the following code in a test.pl script

Code:
#!/usr/local/bin/perl

use CGI;
$cgiobject = new CGI;
print $cgiobject->header;

print "Testing<br>";
system("./EmailAdd.php");

The file, EmailAdd.php contains this code (slightly censored)

Code:
<?

$ch = curl_init("http://buddybud:[email protected]:2082/frontend/x2/mail/doaddpop.html");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'email=AOEUIDHTNS&password=test&domain=buddybuddha.net&quota=20');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_REFERER, "http://www.buddybuddha.net:2082/frontend/x2/mail/addpop2.html");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
curl_close($ch); 

?>

When run by itself, the PHP script does its job and creates the email account. However, when run through the perl script it does not. Any explanations?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
You might try putting the path to the php interpreter in your php script. It will probably be:

#!/usr/local/bin/php

Add that to the top of the php file and you may also want to use the full system path in your system command such as system("/home/user/www/php.php");

You may also need to change the permissions on the php script to be executable.

You could also get rid of the php file entirely and have perl do all the work. ;)
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back