N
N
NeuroPastor2016-07-26 14:56:30
PHP
NeuroPastor, 2016-07-26 14:56:30

How to run a script on a domain from the console?

Tell me how you can run the file from the console?
Those. php -f domain.tld/script.php doesn't work - "could not open input file". File permissions are 777.
In other words, you need to bypass the restriction on the maximum script execution time by accessing it not by an absolute path, but as in the example above.
Okay, I'll explain it differently. There is server A, on which the console is open, and there is server B, on which the file is located. How to run a script from the console of server A, which is located on server B, which will certainly run longer than allowed in the configs, if you run it from a browser, which is why execution from the console is necessary.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Grabko, 2016-07-26
@VGrabko

Run console relative to domain root and run php script.php

S
SergeySL, 2016-07-26
@SergeySL

Use file path - replace domain.tld with the one in DocumentRoot.

X
xmoonlight, 2016-07-26
@xmoonlight

Well, the path must be local!
./script.phpor/home/user/www/script.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question