Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter project issue on Ubuntu?
#1

(This post was last modified: 05-10-2023, 11:15 PM by WateUhlerredyh. Edit Reason: Fixed html issues! )

I'm struggling to get my CodeIgniter project to function on Ubuntu after developing it on Windows. The primary issue is that I'm not receiving any error or warning messages to help me identify the problem. The screen remains blank. My environment is set to development in the index.php file, and display_errors is enabled by setting it to On. PHP appears to be operational as php_info() returns output. Additionally, I believe I've correctly configured MySQL and have declared the defaults (host, user, password, port) in php.ini. Can you suggest any approaches to display an error message echatrandom or verify my configuration? Your assistance would be greatly appreciated. Thank you!
Reply
#2

(This post was last modified: 03-11-2023, 06:39 AM by captain-sensible.)

Moving from Windows to a Linux dsitro introduces a mix of issues. I touched on a few here: https://docs.slackware.com/howtos:misc:a..._slackware

I'm now on Arch Linux (by the way )
[
1) being succint first thing is to use coomand:

from terminal cd webroot i.e something like cd /srv/http/kursaal2.org
Code:
sudo chmod 777   writable   -R
// thats going to recursively make everything read and writable so do that first .
2) MySQl adds another onion layer. You might consider installing https://sqlitebrowser.org/ create a sqlite database file ; its serverless so you can just stick it in writable in the list below by sqlite is called Art (you dont have to have the .db extension) with sqlite you can easily browse see whats going on, crrate fields) connection stright forward .
3) Are you using ubuntu own apache server or are you using some variavtion of xampp?
One issue is that you dont want to be in root on Linux (risk of borking whole OS) but yo uwill irritatingly find as a normal user you can't edit code. I mentioned in slackware one approach . On arch i think I did a chown ; as yo ucan see on filesin writable owner is me and group is http. group http has read, write and executable so it can do what it needs to and I have read and write so I can edit





On my Arch iif I look at writable

Code:
ls -la writable                                                                            (03-11 13:10)
total 96
drwxrwxrwx  7 andrew http  4096 Nov 19 16:55 ./
drwxr-xr-x 12 andrew http  4096 Feb 20 13:48 ../
-rwxrwxr-x  1 andrew http 69632 Nov 19 16:55 Art*
drwxrwxrwx  2 andrew http  4096 Mar 11 12:47 cache/
drwxrwxrwx  2 andrew http  4096 Mar 11 12:47 debugbar/
-rwxrwxrwx  1 andrew http   124 Sep  5  2022 .htaccess*
drwxrwxrwx  2 andrew http  4096 Mar 11 12:48 logs/
drwxrwxrwx  2 andrew http  4096 Sep  5  2022 session/
drwxrwxrwx  2 andrew http  4096 Sep  5  2022 uploads/

I purposely edited a line in home controller so , it would wouldn't work . if i look in logs directory (inside writable directory ) files shows:

Code:
CRITICAL - 2023-03-11 12:48:41 --> Class "App\Controllers\fpdf" not found
in APPPATH/Controllers/Home.php on line 39.
1 SYSTEMPATH/CodeIgniter.php(934): App\Controllers\Home->Index()
2 SYSTEMPATH/CodeIgniter.php(499): CodeIgniter\CodeIgniter->runController()
3 SYSTEMPATH/CodeIgniter.php(368): CodeIgniter\CodeIgniter->handleRequest()
4 FCPATH/index.php(67): CodeIgniter\CodeIgniter->run()

yep thats right fpdf can't be found, because i edited a line ;so yes points me in rigth direction. But on your dev, is logs being written to?

in app/Config/Logger.php I have

Code:
public $threshold = 9;

for dev in /etc/httpd/conf/


http, i have virtual host and have lines like


Code:
ErrorLog "/var/log/httpd/kursaal2.org-error_log"

thats gives me another place to look
I use Arch Linux by the way 

CMS in Action
Reply
#3

In the future please do not cut, copy and paste your posts.

It copies over all the html font code etc; I fixed it for you this time. Moderator.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB