1

I'm trying to run this console command from web: shell_exec('php cli_script.php') and it works for me on the local machine but I don't know where is php on others machines.

Is it possible to get current location of php binary for either systems Windows and Linux? whereis and which don't work on Windows so I can't parse the output.

3
  • just set the path on the other machine to include the php interpreter Commented Feb 17, 2014 at 0:04
  • cd \ then dir php.exe /s /a /p Commented Feb 17, 2014 at 0:04
  • 2
    possible duplicate of Get current PHP executable from within script? Commented Feb 17, 2014 at 0:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.