FB plugin

Source Code Display Plugin

顯示具有 系統管理 標籤的文章。 顯示所有文章
顯示具有 系統管理 標籤的文章。 顯示所有文章

星期四, 10月 25, 2018

WP Mail SMTP: the way to make Woocommerce email notification work in Google Cloud Platform


40+216 Faces
(Photo via bark, CC Licensed)


I have to say that Mailgun is a powerful plugin to make wordpress email work because I receive the TEST email from mailgun successfully. But, I can't get any email notification through mailgun while the woocommerce get any order.

In GCP(google cloud platform), mailgun doesn't work for woocommerce. Finally, the woocommerce new order email notification works by using G-Suite API. The following steps show how i solve this problem. (More information)


Step 1. [Wordpress] Install WP Mail SMTP by WPForms

Step 2. [G Suite] Create a Web Application

Step 3. [G Suite] Grant Permissions and Send Test Email

for complete reference, please refer to WPForms Blog

星期一, 5月 07, 2018

CentOS 忘記 root 密碼


忘記密碼很討厭,幸好只要在終端機面前,還有簡單的方法可以搶救。

  • 將 CentOS 重開機,啟動時的畫面按下 'e' 
  • 選擇第二項目 kernel /vmliz ... 選項並按下 'e' 來編輯參數 (edit 的意思)
  • 在參數最後增加 ' single' ,完成後按下 'Enter'
  • 跳回畫面後按下 'b' ,繼續完成開機 (boot 的意思)
  • 開機後就會進入Single模式
  • 直接輸入 passwd 來修改 root 密碼
  • 星期三, 5月 02, 2018

    Laravel 小筆記


    Q: Laravel constructor can't use session()!

    Yes! session()->all() return null in the constructor! and I found same conclusion in stackoverflow.


     Q: Laravel 的 homestead 下載完之後,virtualbox 可以在那個位置找到 vm 資訊?

    ~/.vagrant.d/boxes/laravel-VAGRANTSLASH-homestead/5.2.0/virtualbox
    這是一個 ubuntu 系統

    Q: Laravel 的 homestead 下載完之後,使用 virtualbox 啟動之後的登錄帳密是什麼?

    vagrant / vagrant

    星期三, 4月 18, 2018

    Upgrade PHP 5.4 to PHP 5.6 on CentOS 7


    Google Cloud Engine provides different version of CentOS. One is CentOS 6x, the other is CentOS 7. Both version 6x and 7 provide the PHP 54. If you need upgrade the PHP from PHP54 to PHP56, the following steps can work for me: (My environment is CentOS 7)

    Step 1: Install EPEL (Skip this if EPEL installed!)

    wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

    rpm -Uvh remi-release-7*.rpm epel-release-7*.rpm

    星期一, 7月 17, 2017

    臨門一腳!申請 G Suite 後,Gmail 設定出現"使用者名稱和密碼遭拒"


    spam gmail


    怎麼無法用收信軟體收 G Suite 裡的 Gmail?


    奇怪!照著之前的作法,竟然在申請 G Suite 後的信箱,照著規劃竟然無法收信?而且出現「使用者名稱和密碼遭拒」,明明帳號密碼通通沒錯,到底怎麼會一回事?


    星期三, 7月 12, 2017

    壓縮與解壓縮指令 tar 與 unzip


    在 wordpress 的官網上,下載了最新版本,檔名為 latest.zip,此時該怎麼解壓縮到目錄mywordpress 呢?試試以下方法

    unzip latest.zip -d mywordpress

    換言之,此指令碼為

    unzip 壓縮檔 -d 目標目錄


    反之,如果要壓縮一個目錄,可以使用以下指令


    tar zcvf 目標檔名.tar.gz 目錄名稱

    星期日, 4月 23, 2017

    yum update libsmbios 出現的版本衝突


    Cheers.
    解掉煩人的 bug 心情十分開心,應該找人乾杯一下

    使用 yum update 時,出現了以下錯誤:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Error: Package: libsmbios-devel-2.2.27-4.4.1.el6.x86_64 (installed)
    Requires: libsmbios = 2.2.27-4.4.1.el6
    Removing: libsmbios-2.2.27-4.4.1.el6.x86_64 (@dell-omsa-indep)
    libsmbios = 2.2.27-4.4.1.el6
    Updated By: libsmbios-2.3.1-2193.9883.el6.x86_64 (dell-omsa-indep)
    libsmbios = 2.3.1-2193.9883.el6
    Removing: libsmbios-2.2.27-1908.9058.el6.x86_64 (installed)
    libsmbios = 2.2.27-1908.9058.el6
    Updated By: libsmbios-2.3.1-2193.9883.el6.x86_64 (dell-omsa-indep)
    libsmbios = 2.3.1-2193.9883.el6
    Available: libsmbios-2.2.26-3.el6.i686 (epel)
    libsmbios = 2.2.26-3.el6
    總之,使用以下方法解決:

    星期三, 10月 12, 2016

    [PHP] 在 CentOS6.7 中升級 PHP5.5 至 PHP5.6


    Cheers.
    解掉煩人的 bug 心情十分開心,應該找人乾杯一下

    [曾經失敗]
    # rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
    # yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
    理論上這樣的設定應該可行,但一直出現相依性的錯誤,於是想其他辦法:

    熱門文章