If you see the error notice properly you can understand what does it means. This error notice means some of your PHP has old constructors. So if you replace these old constructors with new constructor then the problem will be solved.
To do this, open streems.php file by this command.
sudo gedit /usr/share/php/php-gettext/streams.php
StringReader Error: To find it go to line number 52 then
//Replace this line
function StringReader ($str='') {
//with
function __construct($str='') {
FileReader Error: To find it go to line number 90 then
//Change this
function FileReader ($str='') {
//To
function __construct($str='') {
CacheFileReader Error: To find it go to line number 146 then
//Change this
function CacheFileReader ($str='') {
//To
function __construct($str='') {
Then save & close the file. After that open gettext.php file by this command.
sudo gedit /usr/share/php/php-gettext/gettext.php
Go to line number 101 then
// Replace this line
function gettext_reader($Reader, $enable_cache = true) {
//With
function __construct($Reader, $enable_cache = true) {
Elasticsearch is a distributed, real-time, full-text search engine. Elasticsearch developer by JAVA (based on Lucene). It has an HTTP web interface and schema-free JSON documents. In this article, I will describe how to install and then configure elasticsearch in ubuntu 16.04. Let’s see
Before you install elasticsearch, please ensure java is installed on your machine. If not then install java first before doing anything.
Install Elasticsearch in Ubuntu 16.04
Installing Java 8
First Add the Java PPA to apt package database.
sudo add-apt-repository -y ppa:webupd8team/java
Then run update commands to update your apt package database.
sudo apt-get update
Then install Java 8 and verify it is installed, run following command.
After successfully install Java, now you can install Elasticsearch on your machine.
Installing and Configuring Elasticsearch
You can download elasticsearch from their official website elastic.co. It would be always good to download deb (Debian) version for the ubuntu, cause it has everything integrated to successfully run elasticsearch. You can also download it through the command line:
Then install this as usual ubuntu way with the dpkg command:
sudo dpkg -i elasticsearch-1.7.2.deb
After execution this command your installation will be completed, now you have to configure elasticsearch. By default all configuration files of elasticsearch stored into the /etc/elasticsearch directory. Here you can get two files elasticsearch.yml and logging.yml. To configure the elasticsearch you have to open elasticsearch.yml file in your text editor.
sudo nano /etc/elasticsearch/elasticsearch.yml
Now find the line node.name and cluster.name in this file and uncomment it (remove # before them) and change the value of these two.
Find the line, network.bind_host uncomment it by removing the # character at the beginning of the line, and change the value to 0.0.0.0 so it looks like this:
network.bind_host: 0.0.0.0
After all done, elasticsearch will be installed on your computer, now just run this command to start elasticsearch.
sudo service elasticsearch start
For testing elasticsearch output. just type http://localhost:9200/ in your browser and see the possible response.