One for the script kids

ok… I got a PHP form that will run a local Perl script, that Perl script SSH’s to a remote machine and run another script.

However PHP doesn’t seem to be running the script…

here is the code

<html>
  <head><title>Torres Email Configuation</title></head>

  <?php $fname=$_POST'fname'];
        $lname=$_POST'lname'];
        $uname=$_POST'uname'];
        $passwd=$_POST'passwd'];
        $domain="@apolloforest.com";
        $cmd="perl sshConnect.pl ".$fname." ".$lname." ".$uname." ".$passwd;
        echo "executing command ".$cmd."<br><br>";

        $passthru($cmd);
 ?>
</html>

I tried using exec() and popen()… anyone got any ideas???

This might be a dumb question but have you tried executing the perl script independently in debug mode to make sure it isn’t the perl script? Or made sure you have the correct file attributes? Or have you enabled error reporting in your php and checked the logs for any ideas? :smile:

Just a thought. I don’t know php that well but am pretty good with the perl, and no one else seemed to bite :stuck_out_tongue:

Will you even see this post? Sure has been a long time hehe…

Can you say security nightmare and horrible idea.  Also as agentofkaos said  enable error reporting and run all the scripts by command line to check for errors. A quick glimpse shows you’re just calling ‘perl’ to run the script, try putting the full path to perl instead of just ‘perl scriptname’

Also there is likely a much better way of accomplishing whatever you’re trying to do so what exactly are you trying to do?

The guy is long gone, he’s no longer a member here.  

Good work threadging this one back to the front page.

No shit, this was him working on my decrepit old Fedora 1 server. I just posted a question on another thread about the machine that replaced it.
FYI Brock baled from this hole in 05 in his flat black Subaru Junky, blew the motor, hitched to Winterpeg and met a hot French girl. He now lives with her in Montreal and makes a shitload of dough as programmer for a huge dating website.
I wonder (as he was from Nfld) if he can speak French at 300 miles an hour too.

yeah yeah ok, well I just got here so cut me some slack :stuck_out_tongue:
C’mon man, you know you wanted to relive the thread on the front page again :smiley:

Just got where? the internet? it’s pretty common knowledge that you dont bump old ass threads.

Seems to be a spate of that on almost every forum I visit lately.
Is threadging a new fad?

Everybody hunt down the first post they ever made and bump the thread!!!

Threadging?  I thought it was called necroing.

eh heh, stfu

Classier word.
I think another HTMF member first coined it…

I believe BigThumb gets credit for this one, but it just works so well I have to share it with the Greater Internet.

Yeah, I’m also pretty sure that BigThumb coined the term.  :sunglasses: