This topic contains 9 replies, has 4 voices, and was last updated by olidev 1 day, 23 hours ago.
-
AuthorPosts
-
January 30, 2019 at 2:35 pm #18763
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
January 30, 2019 at 2:41 pm #18764I’m not sure, I haven’t seen this error before.
Is there a reason you aren’t using the latest version (v4.5.9)?
January 30, 2019 at 2:49 pm #18767Hi 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
January 30, 2019 at 2:50 pm #18768If it’s a new install I’d recommend using the latest version.
January 30, 2019 at 2:56 pm #18769Ok, 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
January 30, 2019 at 3:00 pm #18770Sorry, not sure. I haven’t been able to find anything relevant on Google.
January 30, 2019 at 11:46 pm #18823Hello 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
January 31, 2019 at 12:47 am #18824IIRC, 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.
January 31, 2019 at 12:59 am #18825Thanks Titanfail!
February 21, 2019 at 11:58 am #19577It 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.
-
AuthorPosts
You must be logged in to reply to this topic.