bangkatak001's avatar

problem upload image directory path in server vps

good day

i have problem in my laravel system, i cant uploaded image in my server but in localhost my system laravel run good never problem.

i have error in log [code] [2018-05-03 07:01:12] local.ERROR: Can't write image data to path (public_html/core/public/uploads/large-1525330871-h-250-Screenshot_14.png) {"exception":"[object] (Intervention\Image\Exception\NotWritableException(code: 0): Can't write image data to path (public_html/core/public/uploads/large-1525330871-h-250-Screenshot_14.png) at /home/cabinshop/web/cabin. [/code]

my directory in server

0 likes
3 replies
bangkatak001's avatar

my directory in server

public_html/ |-------- core <----- laravel system |-------- shop |-----> index.php

core = laravel system shop = laravel public

im edit shop/index.php [code] require DIR.'/../core/bootstrap/autoload.php'; $app = require_once DIR.'/../core/bootstrap/app.php';

=============================== $app->bind('path.public', function() { return DIR; // return base_path('shop'); });

[/code]

we need help

thanks

lostdreamer_nl's avatar

Probably on a windows host locally? Linux is different with file / folder permissions.

Make sure the folder 'public_html/core/public/uploads' is writable. If you have SSH access

  • ssh into the server
  • cd into the correct path for your install ( cd /home/cabinshop/web/cabin )
  • set the permissions ( chmod 0777 -R public_html/core/public/uploads )

After that you should be able to upload files on your linux server as well.

1 like
mussy's avatar

Thank you it was helpful for me

Please or to participate in this conversation.