Why codeigniter4-framework-v4.6.4-0-ge4d3702 give error

Website URL

upos.free.nf

Error Message

when we use codeigniter4-framework-v4.6.4-0-ge4d3702 it gives forbidden error while when we use codeIgniter-3.1.13-0-gbcb17eb display so many errors related to framework

in both case i simply codeigniter zip file upload and extract. how it would be solved

Other Information

(other information and details relevant to your question)

You have not uploaded your site yet, try extracting your zip on your local computer and uploading the folder containing the files. If that doesn’t work, use a better FTP client, like FileZilla.

2 Likes
8 Likes

I currently place code4 folder with framework-4.0.4 and follow below process then after its give same error message

How to install CodeIgniter 4 on InfinityFree

  • Step 1 - Download CodeIgniter 4 Source Code (zip) and extract the zip.

  • Step 2 - Extract the zip to your project folder root. Say D:\Dev

  • Step 3 - Rename the folder framework-4.0.4 to your project name. Example: MyProject

  • Step 4 - Go inside the MyProject Folder, and open app\Config\App.php in a text editor, and change $baseUrl to your domain (or subdomain) with a trailing slash.

  • Step 5 - CodeIgniter 4 requires you to “point” the server to the public folder. To do this, create a .htaccess file in the project root, ie. MyProject, and add the following into it:

RewriteRule (.*) /public/$1 [QSA,L]

  • Step 6 - Finally, upload everything inside MyProject to your htdocs folder via FTP.

Even to this point we are not seeing any errors, just a default landing page.

Could you please at least share on which URL did you get that 403 error?

5 Likes

when i use version framework-4.0.4 and his url https://upos.free.nf/code4/ give above error

on appstarter-4.6.4 version give below error

https://upos.free.nf/appstarter-4.6.4/
give error message This page isn’t working

You did not follow the guide.

CodeIgniter 4 is not just upload and boom.

First of all, you uploaded the project into a sub folder. Which can work but no, it’s a disaster. The guide asks you to upload the content of that folder, not the folder itself, into htdocs.
So the URL should definitely not have things like code4 or appstarter-4.6.4 in it.

Besides, you clearly haven’t done the .htaccess part, or done it correctly. Because if you did, you’ll not have the 403 error.

Why? Because what can be loaded is located inside the public folder, so you must use that piece of .htaccess to load from that folder. The project folder itself (code4) doesn’t have anything to load so it will always return a 403.

Finally, this

is not a 403 error. It’s a 500 error, which means that your code crashed. I hope you didn’t just move the index.php out of public because that is not how it works.

5 Likes

Also, while the guide was written for CodeIgniter 4.0.4, that was simply the latest version at the time. We do not recommend running that specific version, the instructions probably work for all CodeIgniter 4 versions.

If, indeed, you apply them correctly.

Also, please consider that the appstarter template you’re using is not just plain CodeIgniter, it needs a Composer install step to work. And seeing how the vendor directory is absent, I’m guessing that you didn’t do that.

What you do appear to have done is move files into different locations, notably the files from the public directory. While that can be done as an alternative to the .htaccess route that the community guide proposes, it does mean that you’re tinkering with the structure of the framework, which means you need to know what you’re doing.

All in all, please understand that CodeIgniter is a framework, not a CMS. It’s a component you use to build your own application, and its target audience is developers. It’s not like WordPress where you can just drop a zip file on the server, login to a web interface, and click everything together.


My recommendation to move forward is as follows:

  1. Setup a local development environment, like XAMPP.
  2. Install CodeIgniter on your own computer, make sure everything is installed (including the Composer dependencies), following the instructions from CodeIgniter.
  3. Apply the necessary configuration from the community guide.
  4. When you have CodeIgniter installation that works, you can upload it to your account here over FTP.

Then, when you actually start building your application, you can develop and test it locally on your own computer first, and only upload your changes when you have something that works and you’re confident to deploy.

If you just upload CodeIgniter directly to our servers, how are you going to build your application then? Using the text editor from the file manager?

7 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.