Welcome Guest, Not a member yet? Register   Sign In
Not able to access CI4 with XAMPP on Linux Mint
#1

Hi
I’m having problem accessing CI4, when I try localhost/CI4/ it shows me only the files in the directory and then tried to access the “public” directory but it says that access is forbidden...Meanwhile when I use the spark serve command it works okay...Any idea please...
Thanks
Reply
#2

We need more information, CI Version, PHP Version and Operating Sytem your using.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 12-09-2021, 03:40 AM by captain-sensible. Edit Reason: corrected error i put withbeer before )

yes spark is put there at the root of your web app and when fired up tells you what url to access the landing page and it knows what to do , because it was set up to do so. Its basically part of the system for simple use. Similar i guess to php inbuilt server

When you start using a web server on local host either via LAMP Linux Apache MySQl php ; you need to not only install it but configure a few things .

Xampp from Apache Friends is a sort of embedded LAMP that usually gets put at /opt One thing i don't like about xampp on linux is that because its basically an embedded system rather than actually "installed" as other packages are from your repo , is that system settings you change on your system are likely to have no influence on xampp

For instance my system php.ini is at : /etc/php/php.ini

You can search and see , i'm sure xampp has its own php.ini

So it starts getting confusing with xampp if your not careful ; is apache already on your rig , is it running ? what port is being used to server html 80 , 8080 . is it clashing with xampp ?


As insiteFx says we really need error data, but I can tell you , you have to configure so that for your web app , xampp has to be configured to use public .

I would start just putting a single html file at the web root of xampp and see if that gets displayed.

You might also explore blogs for Lampp on Mint . In that case you can follow the plenty of blogs how to configure things like virtual host , the url that will server up a web app if there are several at the root of your web server.


Start with the basics 777 , enable Writable directory recursively look up CI docs for when things go wrong ;

includebeer has a blog page on what to check when things go wrong which is useful


Set app/Config/Logger.php where it says :
Code:
public $threshold = 9;

Make sure app is running in "development mode"

One way to do it is , in the index.php , inside public directory :

Code:
$_SERVER['CI_ENVIRONMENT'] = 'development';



basics to install LAMP on Mint , open a shell i.e terminal :

Code:
sudo apt-get update && sudo apt-get dist-upgrade -y
//reboot system
sudo apt-get install lamp-server^ -y


then you can use systemd to check status ,from command line before proceeding eg
Code:
[andrew@darkstar:~][4]$ systemctl status httpd                            (12-09 10:37)
● httpd.service - Apache Web Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled;

Note i'm on Arch LINUX and my service for web server is called " httpd "
CMS CI4     I use Arch Linux by the way 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB