Home Forums Support Shared Hosting – Installing 4.5.7

This topic contains 10 replies, has 5 voices, and was last updated by  kevinsaptel 2 months, 2 weeks ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #18763

    Cyril32
    Participant

    Hello,

    I am trying to install version 4.5.7 on a shared server. I have followed instruction from the invoice ninja website and also from laravel tutorial, since I understand that invoice ninja is a fork from laravel.

    the directory structure looks ok, permissions look ok, database has been created and .env file has been configured.

    However, I get a php error:

    Parse error: syntax error, unexpected ‘as’ (T_AS), expecting ‘,’ or ‘)’ in /home/kolib/domains/cyrilmorel.ca/ninja/vendor/composer/autoload_real.php on line 39

    Apparently the following code is at fault:

    
                foreach ($map as $namespace => $path) {
                    $loader->set($namespace, $path);
                }
    
                $map = require __DIR__ . '/autoload_psr4.php';
                foreach ($map as $namespace => $path) {
                    $loader->setPsr4($namespace, $path);
                }
    

    The web admin at the hosting company believes that the ninja code is corrupt. Do you know any such problems with version 4.5.7?

    Many thanks.

    Cyril

    #18764

    Hillel Coren
    Keymaster

    I’m not sure, I haven’t seen this error before.

    Is there a reason you aren’t using the latest version (v4.5.9)?

    #18767

    Cyril32
    Participant

    Hi Hillel,

    No reason in particular, this was the latest version at the time I downloaded the code. Would it make sense to use version 4.5.9 instead of version 4.5.7, Are there any significative changes?

    Many thanks,

    Cyril

    #18768

    Hillel Coren
    Keymaster

    If it’s a new install I’d recommend using the latest version.

    https://github.com/invoiceninja/invoiceninja/releases

    #18769

    Cyril32
    Participant

    Ok, I am going to do that.

    Besides that, Is there any thing I should check on top of the above mentioned point (directory structure, file permissions, database config and .env file config?)

    Many thanks,

    Cyril

    #18770

    Hillel Coren
    Keymaster

    Sorry, not sure. I haven’t been able to find anything relevant on Google.

    #18823

    Cyril32
    Participant

    Hello Hillel,

    Thanks for the endeavour, I am wondering if I need to run the following command on the server:

    sudo composer install

    and also:

    sudo composer update
    sudo composer install

    This step is mentionned in the following tutorial, but it is nowhere I can see on the invoice ninja web page.

    Thanks for your help!

    Cyril

    #18824

    Titanfail
    Participant

    IIRC, composer is used when you clone from the github repo. If you’re downloading the zip file, I don’t think composer is necessary. At least I think that’s how it works. Don’t quote me on it just yet.

    #18825

    Cyril32
    Participant

    Thanks Titanfail!

    #19577

    olidev
    Participant

    It is difficult to deploy Laravel on shared hosting because you don’t have ssh access there. This means you cannot use composer commands. This make it difficult to maintain your Laravel apps on shared hosting.

    #20344

    kevinsaptel
    Participant

    As we know that it is hard to deploy this but you can see a tutorial about laravel on WPiTech

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Posted in: