bestmomo/laravel5-5-example

Error on installation after php artisan migrate --seed

lataupe78 opened this issue · 4 comments

Hi bestmomo!
Great Job & great ressource for newcomers like me !

Cependant...
I got an error while installing your project after
php artisan migrate --seed

[Intervention\Image\Exception\NotReadableException]
Unable to init from given url (http://localhost/files/img01.jpg).

Anyway I'am able to run the site, log as admin, but when I want to add a new Post, it throws an Exception with the same message...

And the same message again via ajax request by toggling the actif checkbox on new post only !

I'm working with a fresh Homestead and I've already checked the public folder with
chmod -R a+rX public

Cordialement / Best regards

Hi

Intervention/image needs php_fileinfo extension to run. Maybe it's the issue.

There are some issues, look at this thread.

Try change configuration from GD to "imagick.

Regards

I had the same issue and I solved.
You may have the same problem as the default url in the config file is:

'url' => env('APP_URL', 'http://localhost'),"

As for your fresh installation, you have no .env at this stage (as the install instructions mention the .env file as a later step)

Homestead use a ip url and port number, and the application is looking for the image file in ['url']/files/img01.jpg i think.

In the .env file the APP_URL was localhost, while I use blog.dev as host name.

In my situation I solved this problem by adding the .env file before I did the migration and seeding the tables, and changed the APP_URL to blog.dev as is in the hosts file.

This way it gives no errors

Regards.

The migration is seeding the databases but is loading the images as well so you need to 'php artisan serve' first then seed the database. also change http://localhost to http://localhost:8000 in the .env file as well as config/app.php. Let me know if this works for you.

run php artisan vendor:publish
choose Provider: Intervention\Image\ImageServiceProviderLaravel5
change config/image.php from GD to imagick
run php artisan serve
change http://127.0.0.1:8000 in the .env about APP_URL
run php artisan migrate:fresh && php artisan db:seed
it will be ok
Regards