Elasticsearch-PHP needs curl or custom http handler - laravel

i'm deploy laravel 5.2 to ubuntu and installed elasticquent lib and elasticsearch 2.3.4 , when i try to figure the result of aggregation :
RuntimeException in ClientBuilder.php line 144:
Elasticsearch-PHP requires cURL, or a custom HTTP handler.
I already install curl using command sudo apt-get install php5-curl and its still display the same error
How to fix it?
Thank you

sudo apt-get install php-curl
Try this, it will install curl as per your version of php.

You must run sudo apt-get install curl php5-curl to install curl and its php extension, if you are using PHP7, you must install php7.0-curl instead of php5-curl

Related

Homebrew specific version of sshuttle

While I was trying to install the older version of Sshutle,
I am trying to install sshuttle version 0.78.5 and using this command:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb
I am getting this error:
Calling Installation of sshuttle from a GitHub commit URL is disabled!
Use 'brew extract sshuttle' to stable tap on GitHub instead.
How do I enable the command?
Use of brew extract is not trivial. I think simplest solution for you is to execute:
curl --silent \
https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb \
--output sshuttle.rb
brew install ./sshuttle.rb

Odoo-v9 installtion

I have installed odoo-9 successfully, but it need to install few more packages I think because odoo-9 is dependent on node-less.
Problem :
After installed odoo-9 screen will not render completely, so anyone knows the reason why this happen ?
There is no more help available for odoo-9 and it's dependent packages.
Already refereed:
odoo 9 on Ubuntu Server 14.04 LTS
Odoo forum
Issue has been resolved by installing less.
Less CSS via nodejs
on Linux, use your distribution's package manager to install nodejs and npm.
Important
In debian wheezy and Ubuntu 13.10 and before you need to install nodejs manually:
$ wget -qO- https://deb.nodesource.com/setup | bash -
$ apt-get install -y nodejs
In later debian (>jessie) and ubuntu (>14.04) you may need to add a symlink as npm packages call node but debian calls the binary nodejs
$ apt-get install -y npm
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Once npm is installed, use it to install less and less-plugin-clean-css:
$ sudo npm install -g less less-plugin-clean-css
For more help Click here
by the way thats a really outdated version of node.
instead of
wget -qO- https://deb.nodesource.com/setup | bash -
use
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
All the other instructions are the same.
You need to install nodejs and less for Ubuntu you need to run :-
sudo curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g less less-plugin-clean-css
after run your issue get resolve .
You can get more details tutorial about odoo installation here odoo Apache Ubuntu
You can chekout this also for dependency and configuration
Documentation

Mcrypt PHP extension installation doesn't work

I am trying to install laravel via composer ( http://laravel.com/docs/quick#installation ) and I got stuck at the point where it requires Mcrypt extension
Mcrypt PHP extension required.
I installed Mcrypt extension using brew. But still it throws the same requirement error.
I also tried changing the path as suggested here but my which php doesn't show anything other than
/usr/bin/php
Am I doing something wrong with assigning path at ~/.bash_profile? why is "which php" output still the same. and why is mcrypt installation not working on laravel workout?
What command did you use to install mcrypt? It is possible that you try to install the mcrypt extension for the wrong php version.
Try debugging the situation with
php -v
and
ls -al /usr/bin/php
There is a different install recipe for version 5.5 and 5.4 of PHP.
brew install php54-mcrypt
brew install php55-mcrypt
OK, I was fed up off all other solutions which weren't working, so finally downloading and compiling php from source itself worked.
So here's what I did:
Download php from official site
Follow following instructions
cd to/extracted/php/folder
cd /ext/mycript
phpize
./configure
make
make test
sudo make install
Add extension=mcrypt.so to /etc/php.ini file.
Now restart the server
sudo apachectl restart
You are good to go, Cheers! :)

Difficulty installing Laravel 4 and phpmyadmin on an amazon EC2 instance

So, I installed Laravel 4 on an amazon EC2 instance by following this tutorial:
Basically, my steps included:
———- Installing Apache ———-
$ sudo apt-get install apache2
———- Installing PHP ———-
$ sudo add-apt-repository ppa:ondrej/php5
$ sudo apt-get update
$ sudo apt-get install php5 libapache2-mod-php5
———- Installing PHP Mcrypt ext. ———-
$ sudo apt-get install php5-mcrypt
———- Installing MYSQL ———-
$sudo apt-get install mysql-server
———- Installing GIT ———-
$ sudo apt-get install git-core
———- Laravel GIT Repo ———-
sudo su
mkdir laravel
cd laravel/
git clone https://github.com/laravel/laravel.git
———- Installing Composer ———-
curl -sS https://getcomposer.org/installer | php
php composer.phar install
Now, I am trying to install phpmyadmin on the EC2 instance, and I am at a loss on how to go about doing it. I am a newbie
So should I install it in the laravel folder?
I have tried this:
downloading the phpmyadmin file
sudo wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.3.9.1/phpMyAdmin-3.3.9.1-all-languages.tar.gz
unzipping
tar -jxf phpMyAdmin-3.4.1-all-languages.tar.bz2
renaming
mv phpMyAdmin-3.4.1-all-languages phpmyadmin
Obviously it is not done, and I dont think I am doing this at the right folder. Please help anyone?
PhpMyAdmin has nothing to do with Laravel and isn't required at all; you can manage your MySQL database using the command line client, the MySQL workbench or PHPMyAdmin running on a remote computer (assuming it can connect to your DB running on your EC2 instance).
I would recommend not installing PHPMyAdmin as it's always a target for vulnerability scanners and can be vulnerable (plus it's one more thing to keep up to date).
If you still want to use it then extract its tar file somewhere else (not in Laravel's directory), and then change your Apache configuration to redirect something like "/pma" or "/phpmyadmin" to that directory.
If you're using Ubuntu, then you can just install PhpMyAdmin with the package manager, with this command :
sudo apt-get install phpmyadmin
Just follow the instructions, enter your MySQL root password when asked and that's it, your Apache configuration will be updated automatically, and then you can access it on http://server/phpmyadmin.
See the PhpMyAdmin article in the Ubuntu documentation.

Installing opencv on Ubuntu - can't find libopencv_calib3d

I successfully installed Opencv via
sudo apt-get install libcv-dev libcv4 libcvaux-dev libcvaux4 libhighgui-dev libhighgui4 opencv-doc python-opencv
But now when I try to use ruby-opencv I keep getting
libopencv_calib3d not found.
error
What am I missing?
On Ubuntu 14.04 I had this issue, which was resolved using:
sudo apt-get install libopencv-dev
Try also
sudo apt-get install libopencv-calib3d2.3
Add libopencv-calib3d-dev if you need to compile the Ruby bindings yourself.

Resources