Timeline for PHP shell_exec() script running from CPanel terminal but not from ajax POST call
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 21, 2019 at 7:25 | review | Close votes | |||
Sep 5, 2019 at 3:05 | |||||
Aug 20, 2019 at 21:13 | comment | added | Rushil Joshi | @JimL. Thank you! This worked. | |
Aug 20, 2019 at 18:40 | comment | added | Jim L. |
As my previous comment says then, you'll need to update your test.php file to include the full path to python3.6 in your PHP code. Possibly the full path to test.py also.
|
|
Aug 20, 2019 at 18:20 | answer | added | RalfFriedl | timeline score: 0 | |
Aug 20, 2019 at 18:13 | history | edited | Rushil Joshi | CC BY-SA 4.0 |
added 147 characters in body
|
Aug 20, 2019 at 18:04 | comment | added | Rushil Joshi | @JimL. added! It shows a path, but python3.6 is not in that path. | |
Aug 20, 2019 at 18:02 | history | edited | Rushil Joshi | CC BY-SA 4.0 |
added 175 characters in body
|
Aug 20, 2019 at 17:51 | comment | added | Jim L. |
My first guess is that it's a PATH issue. Can you please edit your post to include the output of this test.php : <?php print shell_exec('echo $PATH'); ?>' Does it show a PATH at all? Is your python3.6` in that path? If either answer is no, you'll need to specify the full path to /where/ever/you/have/python3.6
|
|
Aug 20, 2019 at 17:40 | review | First posts | |||
Aug 21, 2019 at 7:05 | |||||
Aug 20, 2019 at 17:39 | history | asked | Rushil Joshi | CC BY-SA 4.0 |