All About Composer

Composer was created to solve two main problems
Autoloading code
Third-party code

Update Composer
composer self-update

Find out where Composer Stores its files
composer config –list –global

Initialize composer on a directory
composer init

Search for packages in the command line
composer require


Remove Old linux Kernels

Find out which version of the kernel that you are running:
uname -r
sudo apt-get remove linux-image-4.4.0-72-generic
sudo apt-get remove linux-headers-4.4.0-72-generic

Of course replace 4.4.0-72-generic with your kernel version number.
cd /var/lib/initramfs-tools

Remote old kernel file from this folder
then run the following:

/usr/sbin/update-initramfs -u -k all

Xdebug Log Error : Could not connect to client

I: Connecting to configured address/port: localhost:9000.
E: Could not connect to client. :-(

You are getting this error because “LISTEN UP” : xdebug expects the client to open port 9000 so it can communicate with it. So it it the other way around (SMH)…
You probably expected the server to have port 9000 open don’t ya. Nops!!! The client is the one that needs to have port 9000 opened.

So if you are using Netbeans as an example and you are using a remote server for your PHP files, you need to follow these steps :

First  : 
Open up port 9000 on your client machine (Windows or Linux Firewall)

Second :  
Make sure you can telnet your client on port 9000 or whichever
port you choose FROM THE SERVER.

third : 
Configure the server to talk to the client. Lets say your client 
IP is Change the Xdebug settings to the followings:
xdebug.auto_trace = 1
xdebug.remote_host=  ; This is the client IP

Configure your netbeans so the server can communicate with it:


Fifth: Test it. Happy debugging!!!

firewalld.service: Start operation timed out. Terminating.

If you are getting the error below:

systemd[1]: firewalld.service: Start operation timed out. Terminating.
systemd[1]: Failed to start firewalld – dynamic firewall daemon.

It may be due to the fact that the process is stuck somehow. Just run the following command to solve the issue:

Terminate the process

pkill -f firewalld

Start firewalld

firewall-cmd --state
systemctl start firewalld
firewall-cmd --state