2019年6月17日 星期一

讓 Laravel 在 CentOS 上執行

如何讓 Laravel 在 Centos 7 上正常執行,您可以執行下面指令就可以使用 Laravel

# might not be necessary, try the below first
yum install policycoreutils-python -y

# add a new httpd read write content to sellinux for the specific folder, -m for modify
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/laravel/storage(/.*)?"

# same as the above for b/cache
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/laravel/bootstrap/cache(/.*)?"

# this command is very important to, it's like a restart to apply the new rules
restorecon -Rv /var/www/html/laravel/

資料來源:https://stackoverflow.com/questions/23411520/how-to-fix-error-laravel-log-could-not-be-opened

Windows 10 啟用相片檢視器

1) 先建立 PhotoViewer.reg 檔案

2) PhotoViewer.reg 檔案內容
    Windows Registry Editor Version 5.00
    ; Change Extension's File Type

    [HKEY_CURRENT_USER\Software\Classes\.jpg]
    @="PhotoViewer.FileAssoc.Tiff"

    ; Change Extension's File Type
    [HKEY_CURRENT_USER\Software\Classes\.jpeg]
    @="PhotoViewer.FileAssoc.Tiff"

    ; Change Extension's File Type
    [HKEY_CURRENT_USER\Software\Classes\.gif]
    @="PhotoViewer.FileAssoc.Tiff"

    ; Change Extension's File Type
    [HKEY_CURRENT_USER\Software\Classes\.png]
    @="PhotoViewer.FileAssoc.Tiff"

    ; Change Extension's File Type
    [HKEY_CURRENT_USER\Software\Classes\.bmp]
    @="PhotoViewer.FileAssoc.Tiff"

    ; Change Extension's File Type
    [HKEY_CURRENT_USER\Software\Classes\.tiff]
    @="PhotoViewer.FileAssoc.Tiff"

    ; Change Extension's File Type
    [HKEY_CURRENT_USER\Software\Classes\.ico]
    @="PhotoViewer.FileAssoc.Tiff"

3) 執行 PhotoViewer.reg 檔案

修復 Win 10「相片」工具

1) 微軟徽標鍵Win+X 選 A 輸入(以系統管理員開啟windows PowerShell)。

2) 移除現有的 Microsoft.Windows.Photos 軟體。
    get-appxpackage *Microsoft.Windows.Photos* | remove-appxpackage

3) 重新安裝 Microsoft.Windows.Photos 軟體。
    add-appxpackage -register "C:\Program Files\WindowsApps\*Photos*\AppxManifest.xml" -disabledevelopmentmode

讓 Laravel 在 CentOS 上執行

如何讓 Laravel 在 Centos 7 上正常執行,您可以執行下面指令就可以使用  Laravel : # might not be necessary, try the below first yum install policycoreutils-python -...