O
O
Outsider V.2017-07-30 22:10:18
PHP
Outsider V., 2017-07-30 22:10:18

Why does PHP launch an interactive console instead of a script?

There was an autorun of the php script through the task scheduler, everything worked, now suddenly instead of running the script this opens: Task
7e115acb64fb4b90994316b619042747.PNG
settings:
3ff442abb2dc4d40aa16f1b7a0ab4324.PNG
And when you start it manually via the console, everything is ok:
32487e984b8042bfb679875d1b500ef7.png
What is this nonsense?
Windows 10 x64, PHP 7.2.0b1, E:\Program Files\PHP 7\ specified in path.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Outsider V., 2017-07-31
@Audiophile

It was in PHP (this is a known bug) - rolled back from PHP 7.2.0b1 to 7.1.7 b everything worked as it should. However, it is not clear what is the difference for php.exe between running the command manually and running the Scheduler.

A
Andrey Nikolaev, 2017-07-31
@gromdron

Just conducted this experiment - the result - worked.
The only thing is that my command is different from yours.
1) I did not enter the path, I specified the working directory (when creating the task, you can do this)
2) I explicitly indicated which program to use
I got:
1) Program name: php.exe
2) Passed parameters: "E:\ test\test.php"
3) Working folder E:\PHP-7\
Opened the list of tasks, found the required task, looked at the "Actions" tab for the command that is being executed (I got 'php.exe "E:\test\test. php"' )
The command worked great.
PS nothing happens just like that - who did what? Perhaps the task hung and the new one did not start,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question