laravel常见异常解决

    requested URL not found

 

http://stackoverflow.com/questions/21458080/the-requested-url-projectname-users-was-not-found-on-this-server-laravel

 

DocumentRoot "/var/www/html/laravel/public/"

 

<Directory "/var/www/html/laravel/public">

Allowoverride All

</Directory>

 

<IfModule mod_rewrite.c>

<IfModule mod_negotiation.c>

Options -MultiViews

</IfModule>

 

RewriteEngine On

 

# Redirect Trailing Slashes...

RewriteRule ^(.*)/$ /$1 [L,R=301]

 

# Handle Front Controller...

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^ index.PHP [L]

</IfModule>

 

 

Could not open input file: composer.phar

 

If anyone else came this low on the page and still didn't find a working answer (like I did), use this:

 

解决:

$ curl -sS https://getcomposer.org/installer | php

$ mv composer.phar /usr/local/bin/composer.phar

$ alias composer='/usr/local/bin/composer.phar'

$ composer --version

 

sudo composer.phar update

 

sudo composer phar install

 

et voila! A working composer :-)

 

 

 

composer 报 zlib_decode(): data error

http://www.07net01.com/2015/08/894255.html

 

使用composer 安装lumen 项目,执行composer create-project laravel/lumen --prefer-dist,命令报 [ErrorException]    zlib_decode(): data error 错。

 

解决办法:先运行

 

composer diagnose

 

若全部返回OK

 

再执行一般就行

composer install -vvv

 

Failed to enable crypto

 

解决:修改php.ini文件——有的我都改了

openssl.cafile=/Users/jackluo/tools/https-ca/cacert.pem

 

 failed to open stream: No such file or directory in /var/www/laravel/Learn-Laravel-5/bootstrap/autoload.php on line 17

PHP Fatal error:  require(): Failed opening required '/var/www/laravel/Learn-Laravel-5/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/laravel/Learn-Laravel-5/bootstrap/autoload.php on line 17

 

You have to run composer dumpautoload

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值