CodeIgniter Forums
Starting with CI4 - 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: Starting with CI4 (/showthread.php?tid=69227)



Starting with CI4 - kris - 10-22-2017

I wanted to start a new application and try with CI4 But I even am not able to display a simple echo

I have this message

If you see this message, you have not configured your web server properly.
You need to set your "document root" to the 
Code:
public

 folder inside your project. This could be your default setting, or that of a virtual host, depending on how you set up your local development environment.


What shall I do. I am developping in local with url like localhost/cI4/index.php/test

I created a test.php controler with just echo test. 


RE: Starting with CI4 - donpwinston - 10-22-2017

In Apache's https.conf you need to set the document root to something like /opt/lampp/htdocs/public if you are using lampp.

If you're using mamp/mamp pro then set the doc root to xxx/cI4/public if that's were your installation is.


RE: Starting with CI4 - natanfelles - 10-22-2017

Learn the User Guide.
When you upload to a hosting company you will need to configure the **application/Config/Paths.php** file.

Also see the **public/index.php**.

To solve this issue, configure the "document root" of your virtual host to be the **public** folder path. Or run the PHP server like described on the User Guide.