Posts

Showing posts from July, 2020

Apache server php & mysql

Image
Mac 已內建Apache Server 設定Apache讀取指定的資料夾 1.開啟Apache terminal: sudo -s apachectl start 網頁測試(Apache預設讀取/Library/WebServer/Documents/): http://localhost/ 2.建立特定資料夾 3.於/etc/apache2/users建立username.conf檔 內容: <Directory "/Users/username/Sites/">    AllowOverride All    Options Indexes MultiViews FollowSymLinks    Require all granted </Directory> 4.編輯/etc/apache2/httpd.conf 將以下三行前的#刪除: LoadModule userdir_module libexec/apache2/mod_userdir.so Include /private/etc/apache2/extra/httpd-userdir.conf LoadModule php7_module libexec/apache2/libphp7.so 5.編輯 /etc/apache2/extra/httpd-userdir.conf 將這行前的#刪除: Include /private/etc/apache2/users/*.conf 6.測試可否讀取到指定的資料夾 terminal: apachectl restart 輸入網址: http://localhost/~username/ 7.於localhost建立phpinfo.php 內容: <?php echo phpinfo(); ?> 8.測試php運行 apachectl restart 網址輸入: http://localhost/phpinfo.php 9. 下載安裝mySQL 後,確認是否可連到MySQL: terminal: cd /usr/local/mysql/bin ./mysql -h localhost -u

Visual Box - "Kernel driver not installed (rc=-1908)"

Image
⚠️ "Kernel driver not installed (rc=-1908) Make sure the kernel module has been loaded successfully. where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT." 1.restart 2" command.+R" 3.terminal: spctl kext-consent add VB5E2TV963 reboot

How to close Mac loginwindow appears "Other" user 關閉"其它"使用者

Image
某天發現登入畫面出現Other,想說這是什麼鬼… 有點礙眼 上週新心來潮研究一下怎麼刪~

Dreamweaver view mulitple files at the same time

https://www.youtube.com/watch?v=05PMQ7FWTPI

MySQL - $PATH

Image
Mysql-設定環境變數$PATH 方法一: 直接進入系統/etc更新後重新開機,這樣一來,以後一開啟Terminal就可以直接下 mysql 指令了。 方法二: 是說 您得先看你的是什麼shell 我的話是zsh 或是可以像其它網路教學的選擇更改~/.bash_profile , 但經過測試 .zsh .bashrc .bash_profile 都需開機後再次source該shell ,很麻煩的~ 所以最後我選擇直接系統paths加入mysql bin的路徑就好了。 補充說明: /etc/profile和/etc/paths是系統級別的,系統啟動就會載入, 關於 若~/.bash_profile存在,其它bash shell檔就不讀了 而~/.bashrc是bash shell開啟的時候載入的。

Apache - mkdir() "permission deny"

Image

phpMyAdmin install

Image
download:  https://www.phpmyadmin.net/downloads/

phpMyAdmin - " mysqli::real_connet():The server requested authentication method unknown to the client [caching_sha2_password]"

Image
mysqli::real_connet():The server requested authentication method unknown to the client [caching_sha2_password] mysqli::real_connet():The server requested authentication method unknown to the client. ALTER USER 'root' @ 'localhost' IDENTIFIED WITH mysql_native_password BY ' password ' ; 可參考: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html?fbclid=IwAR1AyO27q5slXGPyrLilZBL9TZpgkf_VxLdcFWo4EYx4q-E5vfiTRIj9pS0#upgrade-caching-sha2-password