Why does the payload invalid error appears? - php

enter image description hereenter image description hereI'm getting a payload invalid error for every artisan command:
![][2]
My application was working fine previously without any error, until I ran the app a few days ago on localhost and this error is shown.

You seem to have an old version of the views. Please, run the following commands and try again:
php artisan cache:clear
php artisan view:clear

The payload invalid issue arises when the blades are of different version and the vendor files are of different version.A simple solution is to copy all the content in your current page and then copy it inside a newly created blade with the same version as of the vendor files.

Related

php artisan serve command display error message

I am using php 7.3.2 on window 7. When I try to run php artisan serve, it shows this error on the webpage:
Whoops, looks like something went wrong.
Is it related to the message that I received when I want to migrate database, it says
Application In Production!
My error in laravel log shows
production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in C:\xampp\htdocs\Inventory\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php:43
Following the error in your log file you seem to be missing your key attribute in your .env file. See this SO question for a solution.
To generate the secret key, run
$ php artisan key:generate
make sure to follow the official docs when installing Laravel.
Your laravel is running in production mode. If you are developing local, you should switch that for your local maschine.
To do so: In your .env set the APP_ENV to local (APP_ENV=local) and try again.
Now, you will see the full error message and you are able to handle it now.

Laravel swagger api-docs json file not found

Hello i am trying to add swagger into my laravel project.
installed
composer require "darkaonline/l5-swagger:5.6.*"
so when i do
http://127.0.0.1:8000/api/documentation
got info
Fetch error Not Found http://127.0.0.1:8000/docs/api-docs.json
already created docs folder with that json file.
Should i adjust route or change swagger base URL somewhere, not sure whats the problem. Tnx for your help.
You should run the command
php artisan l5-swagger:generate
after adding the annotations
And if you are still getting the Not Found http://your-host/docs/api-docs.json error.
Run chown www-data storage -R
if you still get "Not Found" error after running the
command : php artisan l5-swagger:generate
run
php artisan route:cache , worked for me
open in incognito in chrome or as a private tab in firefox
this problem for your internet explorer, chrome, FireFox

laravel - Move app to another server, blank page and artisan error

I need to move app in laravel from web server to local sever (I trying on XAMPP). I moved all files, database and in files I changed URI in:
/index.php
<? header("Location: http://localhost/public"); ?>
but I get errors in:
On http://localhost/ I have blank page
On http://localhost/public and every another route I getting error: http://pastebin.com/zUFqS8ET
When I use php artisan or another commands I getting error:
[ErrorException]
Undefined index: HTTP_USER_AGENT
I forgot about somethink?
EDIT:
Ok, I downgrade my PHP to 5.6.* but artisan still not working - same error, what's the problem?
EDIT 2:
Here is logs - problem is in SMF but I don't know why ...
http://pastebin.com/HZQ7CZeg
Sorry, I know this is obvious. But, have you run PHP composer install? And as a basic test you can create an empty laravel project to test your computer's configuration. If it works then you know its something in your project you need to update.
Laravel installation

laravel artisan app:name resulted in syntax errors

I am using Laravel 5 on a shared host. I have installed it ok. However on running:
/usr/bin/php55-cli artisan app:name 247
the laravel install broke. I tracked it down to app.php and the new name caused syntax errors. I got it working again by using Linux to do a global replace changing it back from 247 to App.
Does anyone know why? And how can I get artisan to work properly?
Thanks
This is not Laravel nor artisan issue, but plain PHP syntax error.
PHP does not allow variable or class name to start with an integer. Same goes to namespaces. So your error comes from you app name being 247. First letter can not be an integer.

how can i connect my laravel server?

C:\Users\karim486\Desktop\laravel\bookstore>php artisan serve
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()
this problem show my pc . not connected php artisan serve
enter image description here
how can i solve this problem.
I think you upgraded to a new Laravel version. Some packages (eg HTML & forms) arn't ready for the newest version. Switch to the package from https://laravelcollective.com/ and it will work again.

Categories