CG_dude Posted January 28, 2009 Share Posted January 28, 2009 Hello, I'm somewhat new to PHP, trying to execute a perl script from the PHP page. The perl script is on the same server and my version is PHP 4.2.3 I may have more than one issue, as the perl script opens a sybase connection and runs a sql query and in the script it outputs what I need to post to the PHP page. The issue is the script asks for my username and password for access to run the query. From the command line I can run a bl_wrapper.sh with the perl script and it wroks great. The shell script has this in it "bl -g $1 /users/apache/hpws/apache/cgi-bin username password". In the perl script there is a variable that is $endtime that spits out the end time. I've tried many things including exec, passthough, etc... Can anyone help ? Here is what I have so far .. <?php $command = "/users/apache/hpws/apache/htdocs/prod_report/bl_wrapper.sh pa_box_settle.pl"; $etime = ($command); $return = ($etime); exec($command,$etime,$return); print($etime); ?> Link to comment https://forums.phpfreaks.com/topic/142743-how-do-you-execute-a-perl-script-from-php/ Share on other sites More sharing options...
trq Posted January 28, 2009 Share Posted January 28, 2009 Whay are you setting $command, $etime and $return to the same string? Link to comment https://forums.phpfreaks.com/topic/142743-how-do-you-execute-a-perl-script-from-php/#findComment-748335 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.