-
Run the command.
Code:
cd ~/www/imagehostnow.com
ls -l
Find below the result.
Code:
sherly@HOME:~/www/imagehostnow.com$ cd ~/www/imagehostnow.com
sherly@HOME:~/www/imagehostnow.com$ ls -l
total 92
drwxrwxr-x 12 sherly sherly 4096 Jan 16 11:54 app
-rwxrwxr-x 1 sherly sherly 2452 Jan 8 10:46 artisan
drwxrwxr-x 2 sherly sherly 4096 Jan 16 11:54 bootstrap
-rw-rw-r-- 1 sherly sherly 717 Jan 8 10:46 composer.json
-rw-rw-r-- 1 sherly sherly 58953 Jan 9 11:04 composer.lock
-rw-rw-r-- 1 sherly sherly 567 Jan 8 10:46 phpunit.xml
drwxrwxr-x 6 sherly sherly 4096 Jan 8 10:46 public
-rw-rw-r-- 1 sherly sherly 519 Jan 8 10:46 server.php
drwxrwxr-x 20 sherly sherly 4096 Jan 9 11:04 vendor
sherly@HOME:~/www/imagehostnow.com$
-
In that result, you can see the file
Code:
-rwxrwxr-x 1 sherly sherly 2452 Jan 8 10:46 artisan
All good now.
You can check phpMyAdmin and see the new tables created.
Now visit the imagehostnow.dev (local dev web site) and try uploading an image, see if it works.
Post a screenshost of the result you get.
-
Uploaded image in imagehostnow.dev. But showed ERROR: Internal Server Error
http://i.imgur.com/LPOqi8F.png
-
Error. To see why that happened, laravel have log file. It is located in folder
Code:
app/storeage/logs/laravel.log
First delete that file. Then generate the error. Then look at that file, read it. You will find why that error happened. Try to find the reason by reading error log.
EDIT: We delete the file, so we have less logs to read. If you don't delete, the file may have lot more lines. So its better delete the file, generate the error by uploading the image or what ever step required to reproduce the error, then read the log file.
-
Uploade image in imagehostnow.dev.But showed ERROR: Internal Server Error.
Find error log content as follows:
Code:
[2015-01-16 06:59:21] production.ERROR: exception 'Symfony\Component\HttpFoundation\File\Exception\FileException' with message 'Unable to create the "/home/sherly/www/imagehostnow.com/public/uploads/4ca4238a0b" directory' in /home/sherly/www/imagehostnow.com/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php:134
Stack trace:
#0 /home/sherly/www/imagehostnow.com/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php(239): Symfony\Component\HttpFoundation\File\File->getTargetFile('/home/sherly/ww...', '1.jpg')
#1 /home/sherly/www/imagehostnow.com/app/controllers/UploadController.php(43): Symfony\Component\HttpFoundation\File\UploadedFile->move('/home/sherly/ww...', '1.jpg')
#2 [internal function]: UploadController->index()
#3 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)
#4 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('index', Array)
#5 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(UploadController), Object(Illuminate\Routing\Route), 'index')
#6 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(962): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'UploadControlle...', 'index')
#7 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#8 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#9 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#10 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#11 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#12 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#13 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#14 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#15 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#16 /home/sherly/www/imagehostnow.com/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#17 /home/sherly/www/imagehostnow.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#18 /home/sherly/www/imagehostnow.com/public/index.php(49): Illuminate\Foundation\Application->run()
#19 {main} [] []
-
I was getting upload error.
Then I tried to set permission for 'uploads' folder by running following command:
Code:
chmod -R 777 /home/sherly/www/imagehostnow.com/public/uploads
But received error as follows:
Code:
sherly@HOME:~$ cd www
sherly@HOME:~/www$ cd imagehostnow.com
sherly@HOME:~/www/imagehostnow.com$ chmod -R 777 /home/sherly/www/imagehostnow.com/public/uploads
chmod: cannot access ‘/home/sherly/www/imagehostnow.com/public/uploads’: No such file or directory
sherly@HOME:~/www/imagehostnow.com$
-
Create a folder with name uploads inside public folder, then chmod it.
-
I created new folder upaloads in /home/sherly/www/imagehostnow.com/public
then run command
Code:
chmod -R 777 /home/sherly/www/imagehostnow.com/public/uploads
i got this page
http://i.imgur.com/n0YVYn8.png
-
Have you updated source code from git ?
There are lot of changes after this version. Run
Code:
cd ~/www/imagehostnow.com
git pull origin master
Run this every day to get latest version of source code.
Post result here after you run the commands.
-
I run command:
Code:
cd ~/www/imagehostnow.com
git pull origin master
Result:
Code:
sherly@HOME:~/www/imagehostnow.com$ cd ~/www/imagehostnow.com
sherly@HOME:~/www/imagehostnow.com$ git pull origin master
remote: Counting objects: 181, done.
remote: Compressing objects: 100% (169/169), done.
remote: Total 181 (delta 109), reused 0 (delta 0)
Receiving objects: 100% (181/181), 22.68 KiB | 0 bytes/s, done.
Resolving deltas: 100% (109/109), completed with 18 local objects.
From ssh://git.buyscripts.in:10022/buyscripts/imagehost
* branch master -> FETCH_HEAD
1316183..3fe7347 master -> origin/master
Updating 1316183..3fe7347
error: Your local changes to the following files would be overwritten by merge:
app/config/database.php
Please, commit your changes or stash them before you can merge.
Aborting
sherly@HOME:~/www/imagehostnow.com$