CodeIgniter Forums
Development on localhost - 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: Development on localhost (/showthread.php?tid=78503)



Development on localhost - pippuccio76 - 01-31-2021

Hi , to work properly on server , this is my  project root directory:

[Image: 4oXrPhJ.png]



The codeigniter app is inside the codeigniter folder :


[Image: TB3qhCe.png]



The htaccess work fine on server  ( to use link without index.php) but dont work on localhost , how can i use it on localhost without index.php or with spark ?


RE: Development on localhost - InsiteFX - 01-31-2021

In your Config/App.php make sure this is empty.

PHP Code:
public $indexPage ''



RE: Development on localhost - pippuccio76 - 02-01-2021

(01-31-2021, 09:44 PM)InsiteFX Wrote: In your Config/App.php make sure this is empty.

PHP Code:
public $indexPage ''

Same problem with public $indexPage = '';


RE: Development on localhost - InsiteFX - 02-01-2021

Then it must be a system configuration issue not sure of what your running.

I also see your running on a Mac, I' am on Windows 10 Pro x64.

I' am sure someone on here can help you.


RE: Development on localhost - pippuccio76 - 02-11-2021

(02-01-2021, 12:19 PM)InsiteFX Wrote: Then it must be a system configuration issue not sure of what your running.

I also see your running on a Mac, I' am on Windows 10 Pro x64.

I' am sure someone on here can help you.

D0n't offend me  Big Grin im on linux ...










RE: Development on localhost - InsiteFX - 02-11-2021

I wasn't trying to offend you, just stating that I did not know what OS you where running.


RE: Development on localhost - captain-sensible - 02-11-2021

@InsiteFX i think he was joking !

@pippucio76 are you running Linux (which distro) on bare metal or is it via virtualbox or alternative ?

The way i do Ci4 development on Linux (slackware) is by web apps in their own directories in /var/www/htdocs i.e apache

then use virtualhost config so that a url of http://127.0.0.2 to 127.0.0.9 will in a url bring up landing page of each separate web app. 127.0.0.1 is of course for all intents and purposes "localhost"

( i only bother will secure socket for live)

you seem to have yours in home directory , which is not unusual , but more work to set up - certainly i never have bothered to do that .

i would expect that if your using your home directory then a url to get Co home page up is going to involve that horrible tild then user name i.e

~/username



have you tried directly in apache document root out of interest ?


Also is a page giving summary of web development including Ci for slackware Linux on slackware doc site if your interested


RE: Development on localhost - pippuccio76 - 02-12-2021

(02-11-2021, 02:05 PM)captain-sensible Wrote: @InsiteFX i think he was joking !

@pippucio76 are you running Linux (which distro) on bare metal or is it via virtualbox or alternative ?

The way i do Ci4 development on Linux (slackware) is by web apps in their own directories in /var/www/htdocs i.e apache

then use virtualhost config so that a url of http://127.0.0.2 to 127.0.0.9 will in a url bring up landing page of each separate web app. 127.0.0.1  is of course for all intents and purposes "localhost"

( i only bother will secure socket for live)

you seem to have yours in home directory , which is not unusual , but more work to set up - certainly i never have bothered to do that .

i would expect that if your using your home directory then a url to get Co home page up is going to involve that horrible tild then user name i.e

~/username



have you tried directly in apache document root out of interest ?


Also  is a page giving summary of web development including Ci for slackware Linux on slackware doc site if your interested

im on xubuntu , i set my localhost as /home/stefano/localhost and work fine .

on ci3 if i go on browser to localhost/myproject it work . i want do same on ci4 but if i dont insert index.php on url doesn't work


RE: Development on localhost - captain-sensible - 02-16-2021

ok,

well on slackware its quite a fiddle getting apache to serve web content from a users directory from a url such as http://127.0.0.1/~andrew


I had to enable LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so in /etc/httpd/httpd.conf and a couple more

then edit /etc/httpd/extra/httpd-userdir.conf etc.

I got that working. I will have a go next at installing CI4 into directory "public_html" which is inside my home directory and no works with apache.

Will be at least a few days. If i can help will reply ...


but before i do that i think there needs to be some clarification.


your original images basically as far as i can see show navigation via something equivalent to Dolphin. I don't see an actual http url , nor how requests are being served or listened to. "localhost" is a bit of a red herring. On linux Ip 127.0.0.1 equates to "localhost".


To my knowledge on Linux these are the choices to develop with CI

1) use php built in server

2) fire up spark

3) use xampp which would be located at /opt

4) server web pages from web root of apache i.e /var/www/htdocs

5) tweak apache to server form linux usert home folder.


which one are you actually using ?

also xubuntu from memory is not cutting edge; from a terminal can you post output of :

Code:
php -v