![]() |
Following Static pages tutorial - No input file specified.error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Following Static pages tutorial - No input file specified.error (/showthread.php?tid=77365) Pages:
1
2
|
Following Static pages tutorial - No input file specified.error - CrossCrash - 08-22-2020 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/installation/installing_composer.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/tutorial/static_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? RE: Following Static pages tutorial - No input file specified.error - jreklund - 08-22-2020 You should enable development mode: https://codeigniter4.github.io/userguide/tutorial/index.html#getting-up-and-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 RE: Following Static pages tutorial - No input file specified.error - CrossCrash - 08-22-2020 Thank you for the quick reply. Controllers page is named Pages.php, and env file is set to development. So no problems there. Controller set up like so: ![]() RE: Following Static pages tutorial - No input file specified.error - jreklund - 08-22-2020 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. RE: Following Static pages tutorial - No input file specified.error - CrossCrash - 08-22-2020 (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] RE: Following Static pages tutorial - No input file specified.error - jreklund - 08-22-2020 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); RE: Following Static pages tutorial - No input file specified.error - CrossCrash - 08-22-2020 OK, will keep the ? in there. no change to auto route. Only change to this file was adding the (:any) route: ![]() RE: Following Static pages tutorial - No input file specified.error - jreklund - 08-22-2020 Can you try and reverse those $routes->get() and put / one after (:any)? RE: Following Static pages tutorial - No input file specified.error - CrossCrash - 08-22-2020 ![]() Like this? still returning 404. RE: Following Static pages tutorial - No input file specified.error - jreklund - 08-22-2020 Yep, but apparently that made things worse. So go back again. Check your writables/logs folder for tips. |