CodeIgniter Forums
CodeInigter 4 - 403 Forbidden - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Choosing CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=8)
+--- Thread: CodeInigter 4 - 403 Forbidden (/showthread.php?tid=75613)



CodeInigter 4 - 403 Forbidden - geem - 02-26-2020

I just downloaded CodeIgniter 4.0.2, extracted the zip file, renamed the folder to ci4

Tried to access localhost/ci4/  and I'm getting a 403 error.

What am I doing wrong? I didn't do anything else


RE: CodeInigter 4 - 403 Forbidden - zahhar - 02-26-2020

Recommend you to read this and follow instructions there: https://codeigniter4.github.io/userguide/installation/index.html

It will not work if you just download it, unpack and rename. Probably, you should at least run webserver (built in spark, or external one like Apache). Please read this: https://codeigniter4.github.io/userguide/installation/running.html

Otherwise it is not possible to help you, because in your question you do not give any hint anout your system: Windows, Linux or Mac, local or cloud, what is your webserver and PHP version (if installed at all), etc.


RE: CodeInigter 4 - 403 Forbidden - geem - 02-26-2020

(02-26-2020, 11:16 AM)zahhar Wrote: It will not work if you just download it, unpack and rename. Probably, you should at least run webserver

Thank you for helping, I have pretty much everything setup under the Apache section

I'm deploying it on Linux, using Dockerized Apache and PHP 7.4.2

If I download CI3 from the website, unzip and place it on my Docker volume path, it runs, but when I do the exact same thing for CI4 it redirects me to 403 Forbidden

I already edited the baseURL

Any other ideas? I just want to see the default CI4 home page


RE: CodeInigter 4 - 403 Forbidden - donpwinston - 02-26-2020

Did you set your document root to "xxxxxx/xxxxx/public"?


RE: CodeInigter 4 - 403 Forbidden - zahhar - 02-27-2020

How about chmod for index.php, is it executable?


RE: CodeInigter 4 - 403 Forbidden - littlej - 03-01-2020

Hello geem !

1/ To load CI3, you go to the root folder. To load CI4, you need to go to the "public" folder. So `localhost/ci4/public" instead.
2/ As CI3 is working for you, the error 403 probably means permissions issues with Apache. Probably due to point 1/


RE: CodeInigter 4 - 403 Forbidden - tweenietomatoes - 03-02-2020

CI4's document folder is under "/public".

You should set your document root to:

localhost/ci4/public


RE: CodeInigter 4 - 403 Forbidden - John_Betong - 03-02-2020

@gem.

Did you make the writable folder writable?

chmod -R 0777 CodeIgniter4/writable

If that still does not show the Welcome page then try adding the following to the top of the iCodeIgniiter4/public/ndex.php file.

Code:
<?php
define('CI_DEBUG', FALSE); // bypass (bool) app/Config/Boot/development.php

If that works then remove changes and try to understand why it is not working Smile


RE: CodeInigter 4 - 403 Forbidden - tweenietomatoes - 03-02-2020

don't forget to add DECLARE(STRICT_TYPES=1);
to every single php page.


RE: CodeInigter 4 - 403 Forbidden - includebeer - 03-08-2020

(03-02-2020, 03:54 PM)tweenietomatoes Wrote: don't forget to add DECLARE(STRICT_TYPES=1);
to every single php page.

No! This has nothing to do with the 403 error.
Geem just need to fix the original installation problem.