Results 1 to 10 of 34

Thread: Pulling latest software changes from GIT

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    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} [] []

  2. #2
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    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$
    Last edited by sherlyk; 01-19-2015 at 07:00 AM.

  3. #3
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Create a folder with name uploads inside public folder, then chmod it.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  4. #4
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    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


  5. #5
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    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.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  6. #6
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    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$

  7. #7
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Did you get latest commits form git or it failed for some reason ?

    Read the result.

    Also, you can run "git log" and see date of last commit, compare it with gitlab commits.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  8. #8
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Quote Originally Posted by sherlyk View Post
    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$

    This git pull did not worked as local files changed.

    git pull only work if your local files are not changed, if you change, make sure you commit.

    For now, since the change is not critical, take git gui, then see the changes, take note of it. Git gui have option to revert changes (check the menu items, you will see it). Revert changes, make sure you can apply those changes back if needed, so if needed make a copy of the file before you revert.


    Now

    Code:
    git status
    Will say everything updated, no files are listed as changed in git gui too.

    Now run, "git pull origin master" it will work.

    Post result.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •