O
O
OM12017-03-04 10:31:19
PHP
OM1, 2017-03-04 10:31:19

Ubuntu: what and how to configure to run php and python scripts?

Hey!
Ubuntu-16.04-x86_64
I am just starting to deal with Ubuntu and vds
1. Apache gives a test page, the PHP script at my_server_ip/script.php works
2. via ssh python with the python myscript.py command works
now I want to run cron, but here is the bash path/ to/script.php or bash path/to/script.py doesn't work , or it keeps throwing errors, or gives a listing
How to set up a virtual environment or how to execute scripts correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2017-03-04
@nuBacuk

Set and run the execution rights for scripts.
php /script.php
python /script.py

O
OM1, 2017-03-04
@OM1

For a complete recheck, I created a file, just the echo line, set the chmod rights and it worked ....
After that, I launched a PHP test script, which had not worked before - it worked ... I didn’t see something somewhere, what I changed - I didn’t I understand
Oh God magic!
Thanks for the help, sorry for the noob questions - 2nd day on ubuntu!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question