I have a php script that has the session id number and i want to send this variable to perl. I am having trouble sending it.
Php script:
<?php
set_time_limit(0);
session_start();
$session = session_id(); #TRYING TO SEND "$session" to Perl Script
$session . ' ' . $fileLine2;
shell_exec("second_one.pl" . " -s " . $session);
?>
Perl Script:
use Getopt::Std;
getopts("s:", \%option);
$session_num = '';
if ($option{s}){
$session_num = $option{s};
}
I don't know where i'm goin wrong.
Help please.
Php and Perl please help
Moderator: General Moderators
- andyhoneycutt
- Forum Contributor
- Posts: 468
- Joined: Wed Aug 27, 2008 10:02 am
- Location: Idaho Falls
Re: Php and Perl please help
are you getting any errors? if so, please post them.
Re: Php and Perl please help
Try using absolute path to your Perl script in shell_exec.
Also, is your Perl script executable? 0755 and shebang line?
PS: In fact, if your Perl script is not reachable through your PATH env var, it won't get executed event if it was in the current directory...
Also, is your Perl script executable? 0755 and shebang line?
PS: In fact, if your Perl script is not reachable through your PATH env var, it won't get executed event if it was in the current directory...
There are 10 types of people in this world, those who understand binary and those who don't