Tuesday, July 19, 2016

Installing php7.0 with xdebug in Linux Ubuntu

First run these commands to install php 7.0 and all necessary libraries of php 7.0.

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
apt-get install php7.0-fpm php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-mysql php7.0-phpdbg php7.0-mbstring php7.0-gd php7.0-imap php7.0-ldap php7.0-pgsql php7.0-pspell php7.0-recode php7.0-snmp php7.0-tidy php7.0-dev php7.0-intl php7.0-gd php7.0-curl php7.0-zip php7.0-xml

After that, download stable release of x-debug extension.

wget -c "http://xdebug.org/files/xdebug-2.4.0.tgz"

Extract archive

tar -xf xdebug-2.4.0.tgz

Build extension

cd xdebug-2.4.0/
phpize
./configure
make && make install

Add following lines to /etc/php/7.0/apache2/php.ini config file

# Added for xdebug
zend_extension="/usr/lib/php/20151012/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_connect_back=0

Check whether xdebug is enabled from phpinfo().




Sunday, June 5, 2016

if you are experiencing apportcheckresume error in Ubuntu.

So far the only thing that has actually worked is:
Purge the apport program with its configuration
sudo apt-get purge apport 
Remove packages that are no longer needed (ex. auto-installed dependencies of apport)
sudo apt-get autoremove 
Clean APT cache from old packages
sudo apt-get clean 
Install back apport
sudo apt-get install apport 

Hopefully that will work for you.

Monday, May 30, 2016

If your linux is experiencing crash from upwoerd upon startup.

If your linux is experiencing crash from upwoerd upon startup. This is a known bug in Linux caused by your i-devices (iphone, ipad...). If you're experiencing this error try this command. It seems fixing the error.

sudo apt-get install libimobiledevice-utils

If you want to mount a partition upon startup in linux

You have to enter your partition information to /etc/fstab file. Then your disk will be mounted automatically!
Just go for following step:
  • First take back up of /etc/fstab
    sudo cp /etc/fstab /etc/fstab.backup
    
  • Execute following command to get your partition UUID information that will help you to configure /etc/fstab file.
    sudo blkid
    
    Search for your partition's UUID which you want to mount automaticall. Your HDD partitions shouls be displayed like:
    /dev/sda1: LABEL="Backup" UUID="00A0CE7EA0CE7A24" TYPE="ntfs"
    /dev/sda5: LABEL="40GBTWO" UUID="00A0CE7EA0CE7A24" TYPE="ntfs" 
    /dev/sda6: UUID="7550252c-3da7-4cd9-8da3-71e9ba38e74a" TYPE="ext4" 
    /dev/sda7: UUID="088fd084-a011-4896-aa93-c0caaad60620" TYPE="swap" 
    /dev/sdb1: LABEL="SaurK" UUID="0DB6254A58CEF6F7" TYPE="ntfs"
    
    and so on. It is just an example but format will be same.
  • Now copy the UUID of the partitions which you want to insert in /etc/fstab file.
  • Now open /etc/fstab file and insert entry for your HDD partitions on the last line of /etc/fstab file. Take help from previous entry, for format etc:
    sudo gedit /etc/fstab
    
    When opened your entry would be like this:
    UUID=<your_UUID_for_Disk_partitions> /media/<location_where_you_want_to_mount>             ntfs    errors=remount-ro 0
    
    Just an example:
    UUID=00A0CE7EA0CE7A24 /media/Backup               ntfs    errors=remount-ro 0
    
    you may have to replace ntfs to ext4 or fat32 according to the file system of your partition. It displays in blkid output.
  • Now create location where to mount your disk partitions. Create a folder for each partitions to mount. ((note: a directory may be already created, if so ignore this step.) For example:
    sudo mkdir /media/Backup
    
  • Then execute this command once finished:
    sudo mount -a
    
You can refer this link for further help: Auto mounting with /etc/fstab Hope it works for you..
From:
http://askubuntu.com/questions/343438/why-are-partitons-not-automatically-mounting

Terminator

There is one very interesting tool in Linux. It is called terminator and you can open multiple terminals within it. Before starting using it, it has been messy to work with multiple terminals at once. So to install this tool, run this command.

sudo apt-get install terminator

And you can split your screens just by clicking right mouse and choosing which way you want to split it (horizontally | vertically)


If your system settings is missing in Ubuntu

After I installed fresh copy of Ubuntu 14.10 on my machine I had only few settings on my settings panel, and I went like this for months. But it was child's play to fix this. I found command this from internet.

sudo apt-get install ubuntu-desktop

basically it re-installs Unity (Desktop environment of Ubuntu I guess). And you don't even need to restart and you have everything back.