zlib_decode () 和 doctrine/dbal Laravel 5.2
laravel 看来国内用的确实是少啊。。。
在使用过程中,对数据库的迁移,出现了这么两个问题,结果到处没资料,phphub上也是4.2版本的。难道新的没人用?
首先是数据库的列名如果需要修改,或者删除列的话,需要doctrine/dbal 驱动,国内的介绍言语不详,就不能好好说哈?非要说一句“请保证composer.json中包含了doctrine/dbal ”,简直是猪一般的描述啊,怎么保证?
如果要说,新手自己查资料去,谢谢,这点能力是有的,但是干嘛说一半话???
实际中需要先安装 doctrine/dbal 驱动,但是安装这里也有两个方式一个传统的apt-get方式一个就是咱们已经有的composer方式,咱们学习lavavel啦,自然用composer的命令行方式了,
composer require doctrine/dbal
然后报错了:Failed to decode response: zlib_decode(): data error
网上的解决办法:http://blog.41ms.com/post/36.html
仍然无效,我了个去。。。
composer update
仍然出错还是zlib那个错误,看了提示网址:check https://getcomposer.org/doc/articles/troub... for more info
ip a | grep inet6
查看一下有输出,看来是ipv6的缘故,ubuntu关闭ipv6的方法:https://ttt.tt/173/
再次产看,IPV6顺利关闭了。
再次运行:
composer self-update
composer require doctrine/dbal
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^2.5 for doctrine/dbal
./composer.json has been updated
> php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing doctrine/lexer (v1.0.1)
Downloading: 100%
- Installing doctrine/annotations (v1.2.7)
Downloading: 100%
- Installing doctrine/collections (v1.3.0)
Downloading: 100%
- Installing doctrine/cache (v1.6.0)
Downloading: 100%
- Installing doctrine/common (v2.6.1)
Downloading: 100%
- Installing doctrine/dbal (v2.5.4)
Downloading: 100%
Writing lock file
Generating autoload files
> php artisan optimize
Generating optimized class loader
这里才最终装好。
总结:
1、zlib_decode()错误、需要禁用IPV6
2、数据库支持,因为数据库驱动没有安装,需要装
3、因为开启了xdebug,速度很慢很慢,这么一个东西,大约过去30分钟。
laravel,确实是坑中之坑啊。。。
继续~~~go on。。。
推荐文章: