PHP CURL 使用 HTTP 2 一次抓取 Header、Body 與分割

PHP 使用 CURL 想要把 Header、Body 一次抓回來,要如何做呢?

閱讀全文〈PHP CURL 使用 HTTP 2 一次抓取 Header、Body 與分割〉

Linux grep 要過濾多個字串

Linux grep 要過濾字串,可以使用 -v 來過濾,例如:

  • grep -v string filename

若要過濾多個字串的話,偷懶就多串幾個 | 就好,例如:

  • grep -v string filename | grep -v string2 | grep -v string3

若不要用 Pipe(|),想要直接一行 grep 解決,要搭配 -e 操作,例如:

  • grep -v -e string -e string2 -e string3 filename

Ubuntu 24.x 遇到 Failed to start gdm.service 修復

Ubuntu Linux 24.x 突然遇到 Xwindow 無法進入,看到下述訊息:

  • Failed to start GNOME Display Manager

  • Failed to start gdm.service

要怎麼解決呢?

閱讀全文〈Ubuntu 24.x 遇到 Failed to start gdm.service 修復〉

Linux 遇到 SUID sandbox helper binary was found 錯誤修正

之前參考此篇:Linux 使用 Nativefier 將 Web 服務變成應用程式 將網頁轉>換成 Linux 的應用程式~

但是 Ubuntu Linux 升級到 24.04 後,執行卻會出現下述錯誤:

FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /opt/messenger-linux-x64/chrome-sandbox is owned by root and has mode 4755.

要怎麼解決呢?

閱讀全文〈Linux 遇到 SUID sandbox helper binary was found 錯誤修正〉