Linux 篇

PHP掛掉修復

inux mint php由7.4升級至8.3後,網站不能進入頁面,解決方法﹕

將所有php版本除去﹕

sudo apt purge php*.*
sudo apt autoremove -y

重裝php7.4
sudo apt install php7.4
sudo apt install -y php libapache2-mod-php php-mysql

重啟apache2
sudo service apache2 restart

若不能進入網頁,出現Error: Class 'DOMDocument'not found 於filter_dom_load()
是因為伺服器缺少PHP的DOM擴充套件(extension)

若在Apache/Nginx使用
sudo apt-get update
sudo apt-get install php7.4-xml
sudo service apache2 restart
sude servic php7.4-fpm restart

大功告成﹗

Tags: 

更新PositiveSSL

瞬眼間一年又過去了,每年九月下旬都要更新PositiveSSL,寫下更新步驟作記錄

1. 購入認證

2. 在伺服器中產生CSR

3. 上載CSR到認證發出機構

4. 加入CNAME記錄,確認身份
用下以步驟,編輯CNAME記錄﹕
a. 進入Namecheap賬戶
b. 在表列選單中選取Domain List,按Manage按鈕
c. 按Advanced DNS去溜灠Host Records
d. 選取CNAME Record同時輸入正確目的值,再按Save All Changes按鈕

完成後強制認證﹕
Dashboard > 'SSL Certificates' > Click 'Details' near the certificate in question > click on "from this page (Edit methods)" (in the yellow box) > click on the drop-button "Edit Methods" itself > click "Save Changes/Retry Alt DCV”

Tags: 

加添Brilliant相集

將相集上載至﹕
drupal_path/sites/defulat/files/my_galleries

將相集加入www-data群組內﹕
sudo chgrp www-data -R photo_album

將相集設定使用者及www-data
sudo chown -R user:www-data photo_album

將相集設定為權限為770
sudo chmod -R 770 photo_album

用Brilliant Gallery 在文章中加入相集

Tags: