Jump to content

Recommended Posts

I have a script, that works just fine... It executes the php file that I want it to... I just have a simple question that I cannot find an answer for anywhere!

 

How do I access the variables that I pass through the exec function? My code is below... When the fork_blast.php page is executed, how do I get the variable there? I want to pass a user ID to this page, because it is going to perform a lengthy task... how do I access the $UserID

 

 

$PATH=$_SERVER['DOCUMENT_ROOT'];

exec ("/usr/bin/php ".$PATH."/fork_blast.php \"".$UserID."\" >/dev/null &");

Link to comment
https://forums.phpfreaks.com/topic/157401-solved-simple-exec-fork-question/
Share on other sites

  • 4 months later...

Hello, the above worked for me previously, but it stopped working when i moved to the new host.

 

But EXEC("whoami") works prefectly in this host and register_argc_argv is also set to ON.

 

But i am unable to access the variables that i pass. PLEASE HELP !

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.