CI4 in localhost - 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: CI4 in localhost (/showthread.php?tid=76602) Pages:
1
2
|
CI4 in localhost - pippuccio76 - 06-01-2020 hi , sorry for english im new in ci4 , in ci3 when i unzip the project in my localhost i can access by the browser visit the url http://localhost/myproject , now in ci4 i must add at the url the public http://localhost/myproject/public but i have the error Code: [color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif][color=#222222][size=xx-large]Whoops![/size][/color] my .env is in development mode . If i run the command php spark serve it work fine , Why ? RE: CI4 in localhost - FlavioSuar - 06-01-2020 Hi, It's because in App\Config\App.php your baseURL setting is $baseURL = 'http://localhost:8080/'; Edit your .env file and set baseURL to $baseURL = 'http://localhost/yourproject/public/'; Hope this help!! RE: CI4 in localhost - pippuccio76 - 06-01-2020 (06-01-2020, 06:50 AM)FlavioSuar Wrote: Hi, sorry instead of : app.baseURL = 'http://localhost/codeigniter_4/public' app.$baseURL = 'http://localhost/codeigniter_4/public' or $baseURL = 'http://localhost/codeigniter_4/public' (my www is localhost) RE: CI4 in localhost - pippuccio76 - 08-18-2020 I set $baseURL = 'http://localhost/ci4/public/' but in browser if i run http://localhost/ci4/public/ i have this error : Fatal error: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in /home/stefano/localhost/ci4/system/CodeIgniter.php:184 Stack trace: #0 /home/stefano/localhost/ci4/system/bootstrap.php(181): CodeIgniter\CodeIgniter->initialize() #1 /home/stefano/localhost/ci4/public/index.php(36): require('/home/stefano/l...') #2 {main} thrown in /home/stefano/localhost/ci4/system/CodeIgniter.php on line 184 RE: CI4 in localhost - jreklund - 08-18-2020 PHP version 7.2 or newer is required, with the intl extension and mbstring extension installed. https://codeigniter.com/user_guide/intro/requirements.html You need to enable intl. RE: CI4 in localhost - pippuccio76 - 08-18-2020 (08-18-2020, 09:10 AM)jreklund Wrote: PHP version 7.2 or newer is required, with the intl extension and mbstring extension installed. I use 7.4 init and mbstring enabled same problem (it work by php spark serve ) but is possible to start simply visit de page as ci3? RE: CI4 in localhost - jreklund - 08-18-2020 I'm afraid you are not. Check with phpinfo(), it's not enabled. Or you wouldn't get that error message. No, you need a real virtual host to set it up. RE: CI4 in localhost - pippuccio76 - 08-19-2020 (08-18-2020, 11:02 PM)jreklund Wrote: I'm afraid you are not. Check with phpinfo(), it's not enabled. Or you wouldn't get that error message. Its' true , in my notebook there are several php , in use on localhost is the 7.2 , now work fine , thanks. Now where is the correct url ? the ci message are at http://localhost/ci4/public/ f.e. if i want run user/login i try http://localhost/ci4/public/user/login but i have this error Not Found The requested URL was not found on this server. *edit find must insert index.php as http://localhost/ci4/public/index.php/user/login RE: CI4 in localhost - InsiteFX - 08-19-2020 in .app/Config/App.php change: PHP Code: public $indexPage = 'index.php'; RE: CI4 in localhost - pippuccio76 - 08-19-2020 (08-19-2020, 04:04 AM)InsiteFX Wrote: in .app/Config/App.php Dont work need always index.php before controller/method |