Sunday, May 17, 2020

Docker error : debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) debconf: delaying package configuration, since apt-utils is not installed

debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module)
debconf: delaying package configuration, since apt-utils is not installed

Solution :

Install in the container
sudo apt-get install apt-utils
and Run command
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections


apt- repository error

W: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY

If you get this error while installing a Ubuntu package, you must have added a package in the apt repository before but it is not able to verified the signature as  public key is not available. Here is the solution for you.

There must be a key after the text 'NO_PUBKEY' in the error, copy the key and run the command

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>

Here use the key in the command instead of <PUBKEY>

Your command should be like

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C

Now try to install the package again, you should not get above error again.


Saturday, May 16, 2020

Codeigniter 404 error - Application is migrated from windows to linux

If you have migrated your Codeigniter project from Windows to Linux and it is giving error 404 on Linux system but same project was working fine on Windows, there may be case sensitivity issue in your filenames because Linux treats file code.php and Code.php of same folder differently .

Solution :
Change first letter of filename in uppercase of all files of models and controllers both.
Folder name should be started with small letter. But filenames of the folders should be started with capital letter.

models :
./Admin.php
./Employee.php
./Emails.php
./Contractor.php
./Index.html
./User.php
./users
        ./users/User.php
        ./users/Email.php
./employees
         ./employees/User.php
        ./employees/Email.php

controllers:
./Admincontroller.php
./Employeecontroller.php
./Mailcontroller.php
./Index.html
./Users.php
./users
        ./users/Usercontroller.php
        ./users/Emailcontroller.php
./employer
         ./employer/Employercontroller.php
        ./employer/Employer.php