[英]Running continuous PHP (script) background processes on a WAMP server
I got the 140dev Twitter framework (which uses the Twitter phirehose) manually running (via the webbrowser on my local wamp server), but I can't figure out how to run both get_tweets.php and parse_tweets.php as a background process like with SSH commands: 我得到了140dev Twitter框架(使用Twitter phirehose)手动运行(通过本地wamp服务器上的webbrowser),但是我不知道如何将get_tweets.php和parse_tweets.php作为后台进程运行,例如: SSH命令:
nohup php script.php > /dev/null &
Some of you started using (the Windows equivalent of) cronjobs, but this isn't the right way to go. 你们中的一些人开始使用cronjobs(相当于Windows),但这不是正确的方法。 I think this is because of creating multiple connection (or re-connections) to the Twitter streaming phirehose isn't allowed? 我认为这是因为不允许与Twitter流phihose建立多个连接(或重新连接)吗? How can I run both PHP scripts (get_tweets.php and parse_tweets.php) as a background process on my local WAMP server (and later on a VPS)? 如何在本地WAMP服务器(以及以后的VPS)上同时运行两个PHP脚本(get_tweets.php和parse_tweets.php)作为后台进程?
Just to clearify: 只是为了澄清:
Thank you in advance. 先感谢您。
Find the php/bin
folder where the php.exe
is located. 找到php.exe
所在的php/bin
文件夹。 Copy the folder path and add it to your PATH environment variable (Follow this for instance to edit your PATH variable. 复制文件夹路径并将其添加到您的PATH环境变量中(例如,按照此步骤编辑PATH变量。
Once this is done, you'll be able to execute php in the command line from anywhere. 完成此操作后,您将可以在命令行中的任何位置执行php。 Just start php script.php
with a command line in the right folder and it should work. 只需在正确的文件夹中使用命令行启动php script.php
,它就可以工作。 There might be some configuration to make so that the php in command line uses WAMP's php.ini. 可能需要进行一些配置,以便命令行中的php使用WAMP的php.ini。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.