Your folder structure's all messed up, because your website's DOCUMENT ROOT should be your Laravel "public" folder, BUT on your shared host it's named htdocs. You'll also be tempted to dump your entire laravel app in htdocs, but that's not what should be done. HOPEFULLY you'll be able to create folders in the same level as your htdocs folder so it'll look something like this:
app/ bootstrap/ htdocs/ .htaccess index.php artisan composer.json
Try this: Whatever's in your laravel "public" drop into htdocs, in the same level as htdocs docs put your app, bootstrap, and vendor folder (if you already ran composer), and all of the files that on are on that level. Then in bootstrap/paths.php change "public" to "htdocs".
Give that a shot.
Hello 2upmedia,
thank you for the answer. I am aware that my folder structure is messed up but this is because I have no other choice on this server. I have had this situation once before and luckily everything is working fine. The problem is that clients sometimes just buy a hosting and don't want to consider your suggestions as a developer regarding hosting company so then I have to deal with things like this when I have already developed an application.
Anyways, back to my problem - I have figured out that on this server I don't have PEAR installed. Now, since I have never worked with a server without PEAR installed on it, could you tell me if this can cause my app behavior? I have already emailed my manager to fix this with hosting company, but he doesnt know what PEAR is and is concerned that it could affect some other websites running on the same server which are very important to the company. These websites are all written in pure PHP (not using any framework). Well, I can not think of a scenario where PEAR would affect any PHP apps, but if you know something please point it out so I can deal with this.
If the situation with PEAR turns out to not be really important to my issue I will then try to reorganize the app completely or rewrite it somehow... or god knows what, because it's the first project given to me in this company (yeah Im new there) and I guess it would be bad if I failed on the very beginning...
svemirko said: thank you for the answer. I am aware that my folder structure is messed up but this is because I have no other choice on this server. I have had this situation once before and luckily everything is working fine. The problem is that clients sometimes just buy a hosting and don't want to consider your suggestions as a developer regarding hosting company so then I have to deal with things like this when I have already developed an application.
I think you have to manually change some include and app paths as explained here:
Anyways, back to my problem - I have figured out that on this server I don't have PEAR installed.
If you look you error closely there is a dir "/usr/local/share/pear" in include path!
Pozdrav, Svemirko!
Another choice is to create a subdomain that points to the public folder. That wouldn't involve any changes to paths other then updating "url" in your app config file.
I have fixed it!
The problem was indeed in paths. I figured this out by doing dd(require DIR.'/paths'); just before the line 44 of bootstrap/start.php ($app->bindInstallPaths(require DIR.'/paths.php');).
Thank you for your help guys!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community