碎碎念

跳到主文

murmur

部落格全站分類:財經政論

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 11月 08 週五 201919:05
  • [PHP] 如何停止伺服器內的php server

Q:

之前使用

php -S localhost:8000

指令把php server架起來。

如果想要執行另外一個專案會出現

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

錯誤訊息。

這時必須先停止原本的執行緒,再執行另外一個專案。

 

A:

open a terminal and type:

 

ps -ef  grep php

 

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

something like

 

 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

 

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

 

do another ps

 

 ps -ef  grep php

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

 

The process should not be listed anymore

--

轉自 https://stackoverflow.com/questions/25608908/stopping-in-built-php-server-on-mac-mavericks-livecode

--

文章標籤
全站熱搜
創作者介紹
創作者 dizzy03 的頭像
dizzy03

碎碎念

dizzy03 發表在 痞客邦 留言(0) 人氣(4)

  • 全站分類:
  • 個人分類:Programming
▲top

熱門文章

  • ()[Telegram][轉] 一鍵解除iOS版Telegram對群組和頻道的限制/蘋果iPhone有些頻道不顯示問題
  • ()[Chrome] [問題] Google Chrome 瀏覽FB超lag...問題原來在AD-block
  • ()[Windows] 視窗最大化後發生視窗頂部或最下方出現黑色/白色/灰色空間
  • ()[Windows][轉] 教你從 Windows 11 23H2 升級至 24H2 後降級回去,並鎖住版本
  • ()[轉] 修復:谷歌瀏覽器錯誤'err_quic_protocol_error'
  • ()國光號 中興號座位表
  • ()[轉] 檢視自已的交易信念 by comewish
  • ()[轉]【軟體】Office 2019 專業增強版繁體中文版下載、免費永久啟用完整教學
  • ()[Word] Word「第幾頁,共幾頁」選項怎麼不見了? 其實在這裡啦
  • ()[轉] 5 個免費 Bilibili 影片下載免安装線上工具推薦!

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:0
  • 累積人氣:17,692
dizzy03
PIXNET Logo登入