[SOLVED] CI4 on Shared Hosting. Can't load views. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: [SOLVED] CI4 on Shared Hosting. Can't load views. (/showthread.php?tid=75937) |
[SOLVED] CI4 on Shared Hosting. Can't load views. - seunex - 03-30-2020 I was trying to play and learn codeigniter 4 my code was working perfectly on my local host (Xampp) then i decide to test on live server (Shared Hosting). There i got stuck i dont know where to go what else to do because what i use in local host is the same i uploaded to live server. Screen shot of my localhost login page Local host page view here and here is the sources code to the above page Now in my live server here the page shows This is wired after how many months of develping this application i really do not know where to go from here because i was totally confuse and i dont know what to do again. The sad path is that if my method is to load pure php page for example return view('welcome'); can you believe if i told you that welcome page will open up but i still dont understand my smarty template is not loading. Every thing work correctly on my local server i found it hard on live server now. i dont know what to do anymore just confuse. RE: Problem running C on live server (Shared Hosting)I - jreklund - 03-30-2020 As you have developed on Windows and not Linux it's most likely a case-sensitive matter. Your files/folder may be named Auth/Auth.tpl but you can on Windows load them as auth/auth.tpl. But you should load them as Auth/Auth.tpl. So you need to check your capitalization. You should also move your files one path down. You should not access CI as /public/, so your index.php are placed in the wrong folder. RE: Problem running C on live server (Shared Hosting)I - seunex - 03-30-2020 (03-30-2020, 09:40 AM)jreklund Wrote: As you have developed on Windows and not Linux it's most likely a case-sensitive matter. Your files/folder may be named Auth/Auth.tpl but you can on Windows load them as auth/auth.tpl. But you should load them as Auth/Auth.tpl. So you need to check your capitalization. Hi thank you for your response my told file are lowercase in view folder have a sub folder auth >> auth.tol. this is how I do use them I use smarty also in ci3 and I have no problem I probably don't know what is going wrong here. But if I try to load the details welcome page of ci4 it will will work but I can not load my told file here RE: Problem running CI4 on live server (Shared Hosting)I - jreklund - 03-30-2020 I guess you need to debug smarty, getting the absolute path it's trying and correcting it from there. Reverse where $this->source->exists get checked, and see how it tries to look for the file. RE: Problem running CI4 on live server (Shared Hosting)I - seunex - 03-30-2020 (03-30-2020, 10:30 AM)jreklund Wrote: I guess you need to debug smarty, getting the absolute path it's trying and correcting it from there. May God bless you and add to your knowledge bro! Case sensitive from my smarty class i load views instead of Views. You save y day stay bless! RE: [SOLVED] CI4 on Shared Hosting. Can't load views. - jreklund - 03-30-2020 I'm glad it worked out. I updated the subject to solved and added what that the problem where regarding views. |