How to fix Skype can’t connect – Ubuntu 16.04

I just updated to Ubuntu 16.04 and tried to make a Skype call.  It said that “Skype can’t connect”.  The error message looks like this:

Skype Can't Conect Ubuntu

To fix this you need to remove Skype completely from your system including your settings.

1) Remove the skype and it’s settings

sudo apt-get remove –purge skype skype:i386

2) Remove any settings in your home directory:

rm -rf ~/.Skype

3) Reinstall the application:

sudo apt-get install skype

You should then launch Skype and see the following term dialogue box.

Terms of Use_026

If you don’t see this box when you first launch Skype then you didn’t remove all the settings.  Your Skype should now connect 🙂

How To Install PHP 5.6 on Ubuntu 16.04

I just upgraded one of my Ubuntu Servers to Ubuntu 16.04.  The media wiki installation shopped working because it now comes with PHP 7.  I tried upgrading mediawiki to the latest version but this didn’t seem to work either.   I can’t seem to find out if Mediawiki support PHP 7.  So, I thought I would install PHP 5.6 in parallel on Ubuntu 16.04 by using a PPA (which I generally don’t like)

Here are the commands that I used:

add-apt-repository ppa:ondrej/php
apt update
apt install php5.6 libapache2-mod-php5.6 php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-mysql
a2dismod php7.0
a2enmod php5.6
systemctl restart apache2

Hope this helps someone.

 

Apache config error Invalid command ‘php_flag’ Ubuntu 16.04

I have just started to upgrade some servers to Ubuntu 16.04.  It looked good until I rebooted to the server and the Apache2 service didn’t start up properly.  I view the logs in systemd.  Using the command:

systemctl status apache2.service

● apache2.service – LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2016-04-26 13:29:37 EDT; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 1343 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Apr 26 13:29:37 hostname apache2[1343]:  * The apache2 configtest failed.
Apr 26 13:29:37 hostname apache2[1343]: Output of config test was:
Apr 26 13:29:37 hostname apache2[1343]: AH00526: Syntax error on line 59 of /etc/apache2/apache2.conf:
Apr 26 13:29:37 hostname apache2[1343]: Invalid command ‘php_flag’, perhaps misspelled or defined by a module not included in the server configuration
Apr 26 13:29:37 hostname apache2[1343]: Action ‘configtest’ failed.
Apr 26 13:29:37 hostname apache2[1343]: The Apache error log may have more information.
Apr 26 13:29:37 hostname systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 26 13:29:37 hostname systemd[1]: Failed to start LSB: Apache2 web server.
Apr 26 13:29:37 hostname systemd[1]: apache2.service: Unit entered failed state.
Apr 26 13:29:37 hostname systemd[1]: apache2.service: Failed with result ‘exit-code’.

I did a Apache2ctl config test like so:

AH00526: Syntax error on line 59 of /etc/apache2/apache2.conf:
Invalid command ‘php_flag’, perhaps misspelled or defined by a module not included in the server configuration
Action ‘configtest’ failed.
The Apache error log may have more information.

The problem is the setting “php_flag engine off” and “php_admin_value engine Off” settings.  Which looks like so.  This setting stops php files being executed in certain folders (such a image folder etc).

<DirectoryMatch ^.*/somewhere/>
AllowOverride None
  php_flag engine off
php_admin_value engine Off
</DirectoryMatch>

I removed both of these and restarted apache again using:

sudo systemctl start apache2.service

Hope this helps someone else.

How to move the Unity menu to the bottom – Ubuntu 16.04

There are two ways of move the Unity menu from the side to the bottom.   You can either move the launcher to the bottom using a single command line statement or dconf.  The best way is just to cut and paste this command into a terminal

gsettings set com.canonical.Unity.Launcher launcher-position Bottom

This setting will stay and the Unity menu with stay at the bottom even after a reboot.  You can also move the menu back to the left hand side like so:

gsettings set com.canonical.Unity.Launcher launcher-position Left

Voila.  You are good to go 🙂

 

How To Set The Default Paper Size To A4 in Firefox

I am running Firefox on Ubuntu and the default paper size was US Letter.  I wanted to set the default paper size to A4.  There isn’t a graphically interface to do this.  So you have to:

  1. Visit about:config
  2. Search letter
  3. You should have a result with a value of na_letter.
  4. Double click to modify and change the value to A4

Then it should look like this:

Selection_007

 

Hopefully that helps someone change the default paper size from US Letter to A4.