Running on Apache... whoops - 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: Running on Apache... whoops (/showthread.php?tid=74307) |
Running on Apache... whoops - kcs - 09-08-2019 Hi, I have some apps built with CI3 working on my machine served by Apache, I am trying to run the CI4 starter app on Apache but I am stuck on the Whoops page without a clue. I installed the starter app via composer. Running it using the built in server functions well, I see the welcome page. But with Apache vhost, I can't find out what is wrong. Here's my vhost: Code: <Directory "/Users/karine/Dev/ci4/public/"> In my env file: Code: CI_ENVIRONNEMENT = development The mod_rewrite modele is loaded and I set the permissions on writable to 777 just to be sure. Despite the development environnement, i don't see any log message that can help me figure out where the error is happening. Thanks for your help RE: Running on Apache... whoops - donpwinston - 09-08-2019 Did you rename the env file to .env? If so then you should not get the whoops page. You should get an informative error message. RE: Running on Apache... whoops - dave friend - 09-08-2019 To be sure that the <Directory> directive is properly associated with the VHost put it inside the <VirtualHost> block, i.e. Code: <VirtualHost *:80> It can't hurt and will prevent "confusion" if there are any other <Directory> blocks in the server's config files. RE: Running on Apache... whoops - kcs - 09-08-2019 Thank you both for the help @Dave friend I moved the directory part just to be sure (but I did not see any change). @donpwiston, I missed I had to rename .env here's what I get: Quote:Fatal error: Uncaught TypeError: RE: Running on Apache... whoops - dave friend - 09-09-2019 (09-08-2019, 11:10 PM)kcs Wrote: @Dave friend I moved the directory part just to be sure (but I did not see any change). I'm sure you did it, but I'm going to say it anyway - you have to restart Apache after changing conf files. RE: Running on Apache... whoops - kcs - 09-09-2019 (09-09-2019, 06:43 AM)dave friend Wrote:(09-08-2019, 11:10 PM)kcs Wrote: @Dave friend I moved the directory part just to be sure (but I did not see any change). I did yes. Apache returns a 200 status code. (Thanks for checking). RE: Running on Apache... whoops - kcs - 09-09-2019 I just resolved the issues I was having: I added the http:// that were apparently missing for my base url in my .env file Code: app.baseURL = 'http://local.ci4.com' With this I could finally see a nice debug screen with a clear message telling me Code: Cache unable to write to /Users/karine/Dev/ci4/writable/cache/ I had made the folder writable writable, but did not see there were some other folders in it... So changing the permissions on the cache folder made the trick |