When scriptA.php is run by some logged in user, an in turn will call another scriptB.php using a system() or exec().
Is it possible for scriptB.php to get parameters of the SESSION data of the user that run scriptA.php in the first place ?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t do it in the traditional way (using
$_SESSION). The best way would be to pass the data as arguments to the CLI command or to write it to itsSTDIN(and read them inscriptB.php).If you have permissions you could also go and read the session file (if you’re handling sessions in files)… but that wouldn’t be advisable.