How to install Invoice Ninja on Hostgator

Hi there,
I have my own shared host but after I extracted the files from the invoice ninja onto my site, I get a list of files and no prompt to set up the app and database etc.

Am I missing a step?

http://invoices.alexpapanicolaou.com/ninja/

Thanks!

By default you can access the site using the /public folder.

The best practice is to configure the site by mapping your webroot to the public folder but you may also be able to change it using the .htaccess file.

https://coderwall.com/p/erbaig/laravel-s-htaccess-to-remove-public-from-url

Thanks for the reply… I tried that with this in my .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]

RewriteRule “^.env” - [F,L]

RewriteRule “^storage” - [F,L]

https://coderwall.com/p/erbaig/laravel-s-htaccess-to-remove-public-from-url

RewriteRule ^(.*)$ public/$1 [L]

</IfModule>

Here is the URL I’m using with this but I get 500 Internal Server error still…I’m surprised this isn’t straight forward with a simple hostgator server?

http://invoices.alexpapanicolaou.com/

I didn’t notice that you’re using a subdomain. In that case you should map you server’s web root to the /public folder use the default .htaccess file.

Ah ok. So I should go to the main domain and add. Htaccess code in there just like above?

You shouldn’t need to change the .htaccess file at all, you need to map the webroot to /public.

How would I do that? Sorry, I’m a newbie to web configs

It varies, I’d suggest either searching for ‘hostgator laravel’ or contacting your webhost for help.

So would I need to install Laravel on my shared hostgator account? Not sure why…
http://laravel.io/forum/02-13-2014-how-to-install-laravel-on-a-hostgator-shared-server

Our app is a Laravel app so the similar steps should apply, for example making sure you have PHP >= 5.4.

Oh boy, yeah it looks like that Laravel.io documentation is good until it gets to this part

“Anyway, open the ‘laravel/bootstrap/paths.php’ file and correct the bootstrap path like this:”

There isn’t any ‘paths.php’ in the bootstrap directory…stumped…

Maybe this will help…

https://laracasts.com/discuss/channels/servers/deploy-laravel-5-application-on-hostgator-shared-hosting/replies/109320

Thanks Hillel,
Was able to update my public_html/index.php it but still getting a 500 Internal Server error when trying to access the ninja invoices page. Any ideas?

Have you checked your web server error logs for details on the error.

Here is the error I got…

[Mon Jan 25 08:38:38 2016] [error] [client 69.136.229.188] SoftException in Application.cpp:313: File “/home3/papanic/public_html/invoices.com/public/index.php” is writeable by group
[Mon Jan 25 08:35:09 2016] [error] [client 66.249.83.165] SoftException in Application.cpp:313: File “/home3/papanic/public_html/invoices.com/public/index.php” is writeable by group

Maybe this will help…

http://www.colinmcnulty.com/blog/2009/03/22/recovering-from-internal-server-errors/

Ok that helped…getting somewhere now…but got this error…

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home3/papanic/public_html/invoices.com/public/index.php on line 52

Parse error: syntax error, unexpected T_STRING in /home3/papanic/public_html/invoices.com/public/index.php on line 52

I checked index.php line 52 and it shows this…

51 $response = $kernel->handle(
52 $request = Illuminate\Http\Request::capture()
53 );

That looks like a PHP version issue, can you check which version you’re running.

I’m on PHP 5.5

All post I’ve found for this error are related to the PHP version. Is it possible you’re running two separate versions of PHP. It can be helpful to add a phpinfo page to double check the server (vs CLI) version.

http://stackoverflow.com/questions/17156251/unexpected-character-in-input-ascii-92-state-1
http://stackoverflow.com/questions/13125007/unexpected-character-in-input-ascii-92-state-1-in-a-silex-application

https://mediatemple.net/community/products/dv/204643880/how-can-i-create-a-phpinfo.php-page