Laradock 部署 LaraBBS 採坑大全

nagexiucai發表於2018-08-22

http://laravelacademy.org/post/7691.html

  • SQLSTATE[HY000] [2002] Connection refused

https://github.com/laradock/laradock/issue...
http://laradock.io/documentation/#i-get-my...

DB_HOST
REDIS_HOST
BEANSTALKD_HOST
都是要放入專案.env中,而不是laradock的.evn裡。


  • SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

ALTER USER 'YOURUSERNAME'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOURPASSWORD';
https://blog.csdn.net/qq_26819733/article/...

  • SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'

將 config/database.php 配置檔案中mysql 的 strict 的值改為false即可!
https://blog.csdn.net/qq_36663951/article/...


  • file_put_contents(/www/web/larabbs-1/storage/framework/cache/data/f9/47/f947913e0c6993749ff54a26039f2d18c8a26175): failed to open stream: No such file or directory.
chown -R www-data:www-data /var/www/larabbs
專案目錄的 storage 資料夾沒有寫入許可權。在專案目錄執行 chmod -R 777 storage

  • No hint path defined for [sudosu]. (View: /Users/powercen/sites/larabbs/resources/views/layouts/app.blade.php) (View: /Users/powercen/sites/larabbs/resources/views/layouts/app.blade.php)

檢查你的頂級域名是否在這裡面:config/sudodu.php 裡的 allowed_tlds
問答:按教程操作模板植入 sudosu 出錯


  • Non-static method Redis::hSet() cannot be called statically

是PHP自帶了redis擴充和predis衝突了,但是在php.ini配置檔案中沒有找到redis的相關資訊,最後在/etc/php.d/redis.ini和php-zts.d/redis.ini中找到redis.so
實際上是在php-fpm容器的【/usr/local/etc/php/conf.d/docker-php-ext-redis.ini】。
ps aux |grep php-fpm # 檢視命令列引數看到配置檔案路徑【php-fpm: master process (/usr/local/etc/php-fpm.conf)】得到線索。

echo "; extension=redis.so" > /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
docker restart <php-fpm-container-id>

https://lvwenhan.com/php/413.html
http://www.mamicode.com/info-detail-237291...


  • 管理端ErrorException (E_WARNING) sizeof(): Parameter must be an array or an object that implements Countable

進入workspace容器:composer update summerblue/administrator


laradock display_errors
https://segmentfault.com/q/101000000915915...

laradock xdebug
https://www.jianshu.com/p/e6310c8c7328

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章