简体   繁体   English

全新安装时Laravel base64_decode错误

[英]Laravel base64_decode error on fresh install

I'm trying to get started with laravel but it seems like hell to get it working. 我正在尝试使用laravel,但要使其正常工作似乎很麻烦。

First of all, here is the error (this happens when i try to access /myapp/public ): 首先,这是错误(当我尝试访问/ myapp / public时会发生这种情况):

Laravel base64_decode错误

Some considerations: 一些注意事项:

  1. I'm using MAMP Pro with php 5.4.4 我在php 5.4.4中使用MAMP Pro
  2. Already installed MCrypt extension 已安装MCrypt扩展
  3. Already gave app/storage write permission 已授予应用/存储写权限
  4. Already optimized artisan by running php artisan optimize 通过运行php artisan optimize已经优化过的artisan

Don't know where to go from here, can you help? 不知道从这里去哪里,你能帮忙吗?

Thanks in advance. 提前致谢。

EDIT: 编辑:

I'm using OSX and php5 json is already enabled 我正在使用OSX,并且已经启用php5 json

The error message tells you that you gave an array, not a string. 错误消息告诉您,您给了一个数组,而不是字符串。

Basically its saying $paylod = array('something'=>'somethingelse'); 基本上是说$ paylod = array('something'=>'somethingelse');

So it is expecting you provide it with $payload['something'] so that it knows what string to decode. 因此,期望您为其提供$ payload ['something'],以便它知道要解码的字符串。

have you installed/enabled php5 JSON support? 您是否已安装/启用了php5 JSON支持?

When I set up laravel on a fresh ubuntu 13.10 server I had to run: 当我在新的ubuntu 13.10服务器上设置laravel时,我必须运行:

sudo apt-get install php5-json

among other needed modules (like mcrypt) for laravel 4 to work. laravel 4正常运行所需的其他模块(例如mcrypt)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM