translation

This is an AI translated post.

투잡뛰는 개발 노동자

[php] Setting up Codeigniter 4 on Ubuntu

Select Language

  • English
  • 汉语
  • Español
  • Bahasa Indonesia
  • Português
  • Русский
  • 日本語
  • 한국어
  • Deutsch
  • Français
  • Italiano
  • Türkçe
  • Tiếng Việt
  • ไทย
  • Polski
  • Nederlands
  • हिन्दी
  • Magyar

Summarized by durumis AI

  • I recorded the process of resolving problems encountered while installing Codeigniter 4 on a development server.
  • After installing Apache2 and PHP 7, I downloaded the Codeigniter 4 framework files and uploaded the project files to Apache2.
  • By setting permissions for the project files, installing essential PHP extensions, and modifying the php.ini file, I resolved errors and successfully displayed the initial Codeigniter 4 screen.

Codeigniter 4.
I had the opportunity to work on a new project at the company. Since the existing web page was using Codeigniter 3 after joining, I decided to use Codeigniter 4 out of curiosity and anticipation.

The first thing to do is to set up the development server. This document was created to record the (?) that I experienced while setting up Codeigniger 4 on the development server.

The operating system of the development server was tested on Ubuntu 20.04.2 version


Apache2 and php version 7 were pre-installed, so I downloaded the Codeigniter 4 (CI4) framework file. It seems that PHP version 7.3 or higher is required by default.



Access the above URL and click CI4 Download to download the framework file. It seems that PHP version 7.3 or higher is required by default.


You can see the files above after unzipping. The CI version I used for the test is 4.1.3.

Now upload the downloaded project file to Apache2.



I changed the project name to ci4 for testing. After uploading, access localhost(or address)/public/index.php to check if it works properly.

I see the error screen as soon as I connect.

In fact, this was the beginning of the digging. In my case, it was an error that seemed to be caused by the lack of folder permissions and PHP extensions installed. First, change the permissions of the /writable folder within the project file.


sudo chmod -R 777 writable


Second, you need to install essential php extensions. The essential extensions are curl, intl, mbstring, and xml. It may be installed on the server you are running, but I am setting up the server for the first time, so I install it one by one.


sudo apt-get install php-curl
sudo apt-get install php-intl
sudo apt-get install php-mbstring
sudo apt-get install php-xml


Run the above commands one by one to install the necessary extensions.

Finally, you need to uncomment the crul and intl extensions in the php.ini file.


sudo nano /etc/php/7.4/apache2/php.ini


The location of the php.ini file may vary depending on the server environment. Run the above command to access the php.ini file in edit mode.


;extension=bz2
extension=curl
;extension=ffi
;extension=ftp
;extension=fileinfo
;extension=gd2
;extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=ldap
;extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
;extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql

As you scroll down the php.ini file, you will see the above part. Remove the ; in front of curl and intl, save it by pressing Cntl + x, and exit.

Change all the settings and restart apache.


sudo service apache2 restart



If you access the above url again, you can see the initial CI4 screen output normally.

It's nothing special when I organize it, but it took a lot of time through Google search and (?) while setting up the development server for the first time.

I've been working on SM-oriented servers, so I haven't had the opportunity to set up a development server directly. It was a good experience to learn, even though it was difficult.







TheCareer
투잡뛰는 개발 노동자
코딩, 취업, 이직, 경제에 관심 많은 IT 노동자
TheCareer
[SI Developer Story] 08. Understanding Your Role in an SI Project During Initial Deployment This guide is for developers who have been newly deployed to an SI project to help them understand their role. It is important to understand the overall framework and required functions of the project through proposals and RFPs, and to gain the necessary

April 18, 2024

[Non-majors, Surviving as Developers] 6. Things to Prepare Before Enrolling in a Non-major Developer Academy Before enrolling in a web development academy, it is more effective to study programming basics and purchase a budget-friendly laptop. Over a 6-month course, it is recommended to gain experience in web fundamentals and client-side development. It is bette

March 29, 2024

[SI Developer Story] 04. What to do on your first day at an SI company As an SI developer, you will start your first day at headquarters or at the client's site. At headquarters, you will spend your time studying with your personal laptop. At the client's site, you will prepare for a new start by setting up your development

April 17, 2024

Introducing Rector, a PHP Version Upgrade Tool This article introduces the Rector tool to address compatibility issues when upgrading the PHP version of GNU Board 5. Rector is a static analyzer that automatically upgrades PHP 5.3 to 8.2 code to the target version. After installing Composer and Rector,
초록 기린
초록 기린
초록 기린
초록 기린

March 24, 2024

Arduino IDE Setup #2. Arduino IDE Dark Theme, Font, Tab Spacing Settings +a (Useful Setup) This guide provides instructions on how to configure the Arduino IDE for better readability and improved productivity. By adding line numbers to the code, showing detailed output during compilation, applying a dark theme, changing font and tab spacing, an
Lucy Archive
Lucy Archive
Arduino IDE Line Number Display Setting
Lucy Archive
Lucy Archive

June 11, 2024

Difficulties Encountered While Developing the Korea Investment & Securities API This blog post delves into the challenges and solutions encountered during the development process of the Korea Investment & Securities API. It shares a developer's experiences and tips, covering topics like account opening, ISA account transfer, unsuppor
(로또 사는 아빠) 살림 하는 엄마
(로또 사는 아빠) 살림 하는 엄마
(로또 사는 아빠) 살림 하는 엄마
(로또 사는 아빠) 살림 하는 엄마
(로또 사는 아빠) 살림 하는 엄마

April 23, 2024

Where can I learn coding? : Collection of web coding online courses This article introduces various free and paid online courses for coding beginners. From free lectures such as Life Coding, Khan Academy, and EBS to paid services such as Code States, Inprun, and Fast Campus, systematic learning is possible. It covers a wi
길리
길리
길리
길리

March 29, 2024

2024.01.25 (Fri) Operation Update This blog post introduces the recent website style modifications, SEO improvements, and writing-related changes. It covers various aspects, including addressing style issues occurring in mobile environments, fixing URL errors, shortening the blog name, im
durumis-release
durumis-release
durumis-release
durumis-release

January 29, 2024

A collection of websites that help with English writing This article introduces various online tools that can help you proofread your English writing. By utilizing features of ChatGPT, ProWritingAid, Wordvice, Outwrite, Grammarly, etc., you can effectively correct grammar, spelling, and vocabulary. You can a
길리
길리
길리
길리
길리

April 1, 2024