Following Static pages tutorial - No input file specified.error |
Hi everyone
I'm new to codeigniter and I'm trying to install directly onto a live domain on a shared hosting server. Installed using composer. following the guide here: https://codeigniter4.github.io/userguide...poser.html public files are in the public_html directory. Everything else is one level up. The welcome page loads correctly here: https://codemechanic.co.uk/ I'm now following the guide here: https://codeigniter4.github.io/userguide...pages.html I've followed all steps correctly up to "Running the app" When I go to any of the addresses specified I receive the error "No input file specified." eg here: https://codemechanic.co.uk/pages I don't understand why this is. I've done some googling but can't find a solution. Things i've tried. changing the .htaccess file in public_html: Code: RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA] this changed the error to a 404 when visiting https://codemechanic.co.uk/pages I've also changed the baseURL to https://codemechanic.co.uk/ to in app/Config/App.php - no changes there. Does anyone have any suggestions?
You should enable development mode:
https://codeigniter4.github.io/userguide...nd-running Most likely you pages controller are named pages.php and not Pages.php. Due to the fact it's not a rewrite problem, as index.php url aren't working. https://codemechanic.co.uk/index.php/pages
Hi, you need to have a "." in front of your "env" for it to be able to work.
Now: env Should be: .env Pages look OK thought.
(08-22-2020, 03:05 AM)jreklund Wrote: Hi, you need to have a "." in front of your "env" for it to be able to work. OK thanks. Corrected that, named .env https://codemechanic.co.uk/pages returning a 404 when htaccess is set to : RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA] or "No input file specified." when set to: RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]
Keep a ? in there, that are server specifics. Open up your writable/logs and see what errors you have.
Have you disabled the auto route in /app/Config/Routes.php? Should be: PHP Code: $routes->setAutoRoute(true);
OK, will keep the ? in there.
no change to auto route. Only change to this file was adding the (:any) route: ![]()
|
Welcome Guest, Not a member yet? Register Sign In |