jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

Help Production #378

Closed fusedtechresource closed 8 years ago

fusedtechresource commented 8 years ago

Hello Guys,

i plan to upload my app in shared hosting to test but i dont know how to set up.

i already tried to upload all files in free web hosting but i got some error

http://peramax.tigrimigri.com/

can you give me instruction or reference?

thanks,

newbie here!

flick36 commented 8 years ago

The error i get when accessin your page is:

Missing argument 3 for Illuminate\Session\FileSessionHandler::__construct(), called in /home/peramax/public_html/bootstrap/cache/compiled.php on line 12291 and defined

Just delete that file compiled.php and run php artisan optimize

fusedtechresource commented 8 years ago

hi @flick36 ,

I did't see compiled.php in my file, i have compile.php,

I tried to remove the .env file and setup manually in the config but i got another errors haha.

'prefix' => env('API_PREFIX', 'api'),

error: Unable to boot ApiServiceProvider, configure an API domain or prefix.

can you please give me an reference or instruction step by step how to make a production file ready to upload on shared hosting

flick36 commented 8 years ago

that's because if you remove the .env file you probably didn't configure the value that uses API_PREFIX (that's dingo/api) you shouldn't delete the .env file... i mean you can but what for? it saves from this kind of errors... the compiled.php file should be in /home/peramax/public_html/bootstrap/cache/compiled.php

Now, Laravel it's not friendly with shared hosting, cause it use composer and stuffs... but sure you can make it work, i ha done it already i just point the domain to the public folder, instead of the root folder... that's all.. you for what i can see are using the root folder, and then redirects to the public folder... yeah that's not going to work, especially because you laravel app domain with that confi would be http://peramax.tigrimigri.com/public and all your routes would be http://peramax.tigrimigri.com/example-route but they'll should be http://peramax.tigrimigri.com/public/example-route that's why you want to point the domain to the public folder instead of the root folder.