停止Mac Mavericks上的内置php服务器-Livecode [英] Stopping in-built php server on Mac Mavericks - Livecode

查看:83
本文介绍了停止Mac Mavericks上的内置php服务器-Livecode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Livecode开发某些东西,并且我一直在尝试使用Mavericks自己的内置php服务器.我通过通过外壳发送以下命令来启动服务器...

I'm developing something in Livecode and I have been experimenting with using Mavericks own in-built php server. I started the server by sending the following command through shell...

php -S localhost:8000

这使PHP能够通过localhost:8000/

This enabled PHP to run successfully through localhost:8000/

但是,我现在不知道如何停止/禁用PHP以便继续测试启动它-以前通过终端启动PHP时,我可以执行ctrl + c来停止php运行,但是由于我没有这样做还不知道如何通过我的应用程序执行此操作,而是收到此错误...

However, I can not work out how to stop/disable PHP now in order to continue testing starting it - when I previously started PHP through the terminal I was able to do ctrl+c to stop php running but since I do not yet know how to do this through my app I get this error instead...

Failed to listen on localhost:8000 (reason: Address already in use)

有人知道如何通过终端或通过Livecode应用程序阻止它吗?尝试仅使用ctrl + c来通过终端将其停止

Anybody know how I can stop it either via the terminal or through my Livecode app? Attempts to stop it through the terminal using just ctrl+c do not work

推荐答案

打开终端并输入:

ps -ef | grep php

它将列出带有pid(进程ID)的php进程

it will list the php process with the pid (process id)

类似

$ ps -ef | grep php

  501 14263 14133   0 10:25AM ttys001    0:00.21 php -S localhost:8000

  501 14355 14265   0 10:25AM ttys002    0:00.00 grep php

请注意列出您的php进程的行号,第二列是您的pid 在该示例中,进程标识为14263,将其杀死:

The note the number for the line that lists your php process, the second column is your pid in the example the process id us 14263, kill it:

$ kill 14263

再做一个ps

$ ps -ef | grep php

  501 14358 14265   0 10:26AM ttys002    0:00.00 grep php

$

该过程不再列出

这篇关于停止Mac Mavericks上的内置php服务器-Livecode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆