Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed last month.
Improve this question
I use PHP "badfarm/zanzara" Telegramm-bot. I had started it by terminal in browser on my Fornex hosting with command php start_bot.php which refers to script "start_bot.php" execution. After that I have closed terminal but the bot did not stop. It has been running several days by now. How could I stop the bot?
Here is an approximate code sample (it's more complicated in real script):
Download and install htop
Start htop by the same command
Press F4 and input php start_bot.php then press ENTER
F9 and select SIGKILL
Done
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Is it possible to invoke the browser via php code ?
Thank you in advance.
PHP is processed by the Web server. The browser is a client application on a client machine. The server cannot launch a client application without having a helper application in place and running on the client machine. Any other architecture would be very bad from a security standpoint - the client machine would have no control over who could run an application on their machine.
if you use firefox, you can use this:
pclose(popen('firefox -url http://www.example.com/reader.php?code=12345 &', 'r'));
other browsers have different console arguments, so you can try it yourself.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
php composer.phar install,
php composer.phar update, and
php composer.phar self-update
They all just hang and go nowhere. I wonder why
I had a php ide open with with debug on, and another running program was sitting at a breakpoint, roadblocking any php statement.
It's the second time it happened to me.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am trying to run PHP script from erlang code.Can anybody explain with a simple example?
I am basically trying put some data on google server via this php script.
Since Erlang webserver (Yaws) CAN run PHP scripts, this is an example.
first on the yaws.conf, write this.
the env variable.
php_exe_path = /usr/bin/php-cgi
Also be sure you enable the php processing for the individual server, like this.
<server www.example.org>
port = 80
listen = 0.0.0.0
allowed_scripts = php yaws cgi
</server>
Yaws will invoke the php-cgi binary and talk the CGI protocol to the
binary.
And thats all, you can run PHP Scripts into Earlang WebServers (Yaws)
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
This question shows how to run a persistent PHP script. However, is there a way to also write the output to a text file? I've tried running nohup php hello_world.php & > &1 > output.txt, but I get syntax error near unexpected token '&'. If I remove the &, the output is logged, but the script only runs once. Thanks.
Try this:
nohup php hello_world.php > output.txt &
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I need to trigger some codes That perform certain action , or I want to perform those codes with a timing ,ie I want to run a PHP file today 10.00AM .. How it possible ?
For a cron the code for 10AM would be:
0 10 * * * /usr/bin/php /path/to/script.php >/dev/null 2>&1
This is a good site to have a look at: http://crontab-generator.org/
But you will need to learn the basics of setting up the cronjob as there maybe some small differences between distros
If you're on a linux-based server. Look into cron (http://en.wikipedia.org/wiki/Cron) that'll allow you to automate the running of your script.