System(); Limits

SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
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
•••
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back