我在位于/var/www/html/site/
的服务器上安装了laravel,我可以在dev.site.com
访问它。我想通过更改该虚拟主机的文档根目录,将主板网址更改为site.com
。所以我将site.com
指向/var/www/html/site/public
并且laravel给出了错误:
base64_decode() expects parameter 1 to be a string, array given
只有在我使用网址site.com
访问网站时才会发生这种情况,当我将其更改回dev.site.com
时,再次没问题。我已将应用程序网址更新为site.com
。
我在centos 4.5 final上运行了laravel 4.2。
<VirtualHost *:80>
ServerName dev.site.com
ServerAlias dev.site.com
ServerAdmin tech@myDomain.com
DocumentRoot "/var/www/html/site/public"
<Directory /var/www/html/site/public>
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName site.com
ServerAlias site.com
ServerAdmin tech@myDomain.com
DocumentRoot "/var/www/html/site/public"
<Directory /var/www/html/site/public>
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
/var/www/html/site/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
* @param string $payload
* @return array
*
* @throws DecryptException
*/
protected function getJsonPayload($payload)
{
$payload = json_decode(base64_decode($payload), true);
7 Illuminate \ Encryption \ Encrypter getJsonPayload
* Decrypt the given value.
*
* @param string $payload
* @return string
*/
public function decrypt($payload)
{
$payload = $this->getJsonPayload($payload);
// We'll go ahead and remove the PKCS7 padding from the encrypted value before
dev.site.com
再次没问题。答案 0 :(得分:1)
只需清理我的饼干即可解决....