分類:Windows

Laragon

剛安裝完 Laragon

使用 Laragon 快速建立 Laravel 專案

發生錯誤

ERROR 1045 (28000): Access denied for user ‘root’@’172.18.0.1’ (using password: NO)

 

解決辦法

Menu -> Mysql -> my.ini

找到下面這一行,打開,密碼改為自己設定的 root 密碼

password=xxxx

 

docker toolbox window10 啟動錯誤,重啟

今天電腦重啟後

啟動環境出現以下錯誤

$ docker-compose up -d
ERRORERROR: Windows named pipe error: 穡t??禮瓣瞻?穡?竄羹穢w????簧??C (code: 2)
Traceback (most recent call last):
File “logging\__init__.py”, line 884, in emit
File “site-packages\colorama\ansitowin32.py”, line 40, in write
File “site-packages\colorama\ansitowin32.py”, line 141, in write
File “site-packages\colorama\ansitowin32.py”, line 169, in write_and_convert
File “site-packages\colorama\ansitowin32.py”, line 174, in write_plain_text
IOError: [Errno 0] Error
Logged from file errors.py, line 79

docker ps 查看一下

$ docker ps
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.36/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

 

看來是docker沒起來,重啟一下

開啟 Docker Quickstart Terminal

$ docker-machine restart
Restarting “default”…
(default) Check network to re-create if needed…
(default) Windows might ask for the permission to configure a dhcp server. Sometimes, such confirmation window is minimized in the taskbar.
(default) Waiting for an IP…
Waiting for SSH to be available…
Detecting the provisioner…
Restarted machines may have new IP addresses. You may need to re-run the docker-machine env command.

 

$ docker-machine env
export DOCKER_TLS_VERIFY=”1″
export DOCKER_HOST=”tcp://192.168.99.100:2376″
export DOCKER_CERT_PATH=”C:\Users\neo\.docker\machine\machines\default”
export DOCKER_MACHINE_NAME=”default”
export COMPOSE_CONVERT_WINDOWS_PATHS=”true”
# Run this command to configure your shell:
# eval $(“C:\Program Files\Docker Toolbox\docker-machine.exe” env)

neo@DESKTOP-QVUSV16 MINGW64 /e/docker (master)
$ eval $(“C:\Program Files\Docker Toolbox\docker-machine.exe” env)

$ docker-share mount -t
Testing /e/docker.. OK

 

$ docker-compose up -d
memcached is up-to-date
Starting nginx …
Starting elasticsearch …
Starting php7 …
Starting elasticsearch … done

win7 下 xampp 安裝 mongodb 的 extension

一、
首先打開瀏覽器,輸入 localhost/phpinfo.php
看到自己的 apache Architecture 是 x86
php 版本是5.6

二、
接著到 http://pecl.php.net/package/mongodb
選擇 stable 版本
目前satble版本最新是1.1.8
點選 DLL 進入下一頁

下一頁選擇 php5.6 適用的
選擇 TS, x86
5.6 Thread Safe (TS) x86

三、
下載後解壓縮
裡面有
php_mongodb.dll
複製到 C:\xampp\php\ext

四、
接著打開 php.ini 設定檔

在extension那邊
加入
extension=php_mongodb.dll

存檔
重新啟動 apache

五、
檢查 phpinfo
搜尋mongo
應該可以看到套件內容

如果沒有
請重新啟動電腦(windows)看看