davidxd33
davidxd33

Reputation: 1206

base64_decode() exception when changing URL of Laravel

I have a laravel installation on my server located /var/www/html/site/ and I can access it here dev.site.com. I would like to change the board url to site.com simply by changing my document root for that virtual host. So I point site.com to /var/www/html/site/public and laravel gives back an error:

base64_decode() expects parameter 1 to be a string, array given

This only happens when I access the website using the url site.com and when I change it back to dev.site.com, it's fine again. I've updated the application url to site.com.

I'm running laravel 4.2 on centos 4.5 final.


Virtual Hosts

<VirtualHost *:80>
    ServerName dev.site.com
    ServerAlias dev.site.com
    ServerAdmin [email protected]
    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 [email protected]
    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

Just to be clear again, if I go to dev.site.com it's fine once again.

Upvotes: 0

Views: 4477

Answers (1)

davidxd33
davidxd33

Reputation: 1206

Solved simply by clearing my cookies....

Upvotes: 1

Related Questions