I'm trying to execute my php script with a Curl request in cloud9.
When I run, I have this Exception:
"Uncaught exception 'Exception' with message 'php function "curl_init" is missing' in /home/ubuntu/workspace/test.."
I tried to install curl with sudo apt-get install php-curl
or sudo apt-get install php5.5-curl,
also with "ppa:ondrej/php" repository.
Curl package seems to be installed successfully in the cloud9 virtual machine, but it hasn't been enabled in my php.ini.
Hope this works for you:
sudo apt-get update
Then:
sudo apt-get install php5-curl
If you are running Ubuntu, use
$ sudo apt-get install php-curl
This will install 'php7.2-curl' as at 16/05/2019.
Related
I've tried following commands:
sudo yum -y update
sudo yum install -y libevent libevent-devel
sudo yum install -y memcached
sudo yum install -y php-pecl-memcache
sudo service memcached restart
sudo service httpd restart
I can see only memcache module which is installed after run above commands.
Finally got Solution!
I've done some research on installation any module for php 7.1. I got success while run below command:
sudo yum install -y php71-memcached [use 72 instead of 71(php version) for php7.2]
I think you had tried commands from this link, but all are not working :D
https://devdocs.magento.com/guides/v2.3/config-guide/memcache/memcache_centos.html
I'm using php7.1 on Ubuntu 17.04, I have tried to install cURL using this command:
sudo apt-get install php-curl
but I get this:
Package 'php-curl' has no installation candidate
I tried also to specify the cURL version using:
sudo apt-get install php7.1-curl
but i got
E: Couldn't find any package by regex 'php7.1-curl
So, please, how do I install curl for PHP 7.1?
You need to add PHP ppa first, update, and install
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.1-curl
While it seems strange that you are not able to find php-curl, you should search for php curl package version available on your system:
sudo apt update
sudo apt search ^php
Between the results, it should display something like this (the output was taken from Ubuntu 17.10, yours will be different):
php7.1-curl/artful-updates,artful-security 7.1.15-0ubuntu0.17.10.1 amd64
CURL module for PHP
then, you just install it as usual:
sudo apt install php7.1-curl
happy coding!
I'm trying to install sqlsrv by using the commands from this page. However, when running
pecl install sqlsrv-4.2.0preview
I get the error: Error 1 ERROR: 'make' failed.
I tried :
apt-get update
apt-get install build-essential
apt-get install libpcre3-dev
apt-get install make
All of these are installed on the latest version.
I'm running a container using the php:7.0-apache image. Running apachectl -V returns Apache/2.4.10 (Debian).
Here is the full log output from the command I ran: https://pastebin.com/MYDY3xwU
I had this exact error.
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
#include <sql.h>
Apparently the header file its looking for is only in the package unixODBC-devel.
I installed that package and was able to successfully complete the build. yum install unixODBC-devel.
Possibly, a better explanation is here.
stackoverflow Question # 15447386
I had the following error on Ubuntu 18.04 when installing
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory #include <sql.h>
Installing the package unixodbc-dev as Matthew Goheen proposed solved the issue
sudo apt-get install unixodbc-dev
try
sudo apt-get install unixodbc-dev
When I try to install php 5.3 stable from source on Ubuntu (downloading compressed installation file from http://www.php.net/downloads.php) and I run ./configure I get this error:
configure: error: xml2-config not found. Please check your libxml2 installation.
All you need to do instal install package libxml2-dev for example:
sudo apt-get install libxml2-dev
On CentOS/RHEL:
sudo yum install libxml2-devel
For the latest versions it is needed to install libxml++2.6-dev like that:
apt-get install libxml++2.6-dev
I had the same issue when I used a DockerFile.
My Docker is based on the php:5.5-apache image.
I got that error when executing the command RUN docker-php-ext-install soap
I have solved it by adding the following command to my Dockerfile:
RUN apt-get update && apt-get install -y libxml2-dev
Ubuntu, Debian:
sudo apt install libxml2-dev
Centos:
sudo yum install libxml2-devel
this solution it gonna be ok on Redhat 8.0
sudo yum install libxml2-devel
OpenSuse
"sudo zypper install libxml2-devel"
It will install any other dependencies or required packages/libraries
I am trying to install pspell for PHP 5 in Ubuntu. I have installed the aspell library which is required to run pspell as shown here
I am not sure if there are any settings I need to change, etc.
When I try to execute the below mentioned line of code
$pspell_link = pspell_new("en");
I get an error
Fatal error: Call to undefined function pspell_new()
Any idea on what could be wrong ?
Any help greatly appreciated.
just do
sudo apt-get install libpspell-dev
sudo apt-get install php5-pspell
sudo apt-get install aspell-en
then restart your apache2 server with the following command
sudo service apache2 restart
it will be added automatically to your php.ini
you can try this example
For those using PHP 7.2 / Ubuntu 18.10, here is what I did to get PSPELL working:
sudo apt-get install php5-pspell
sudo apt-get install php-pspell
sudo apt-get install aspell-en
sudo apt-get install aspell-fr
sudo apt-get install aspell-de
sudo apt-get install aspell-es
sudo service apache2 restart
I use multiple languages, so included some of them in the example above. I believe EN is included by default.
"I have installed the aspell library which is required to run pspell as shown here"
that's if you compile your own PHP - did you recompile with pspell?
Note that this package just provides the API and data, you are getting an error becuase your PHP doesn't know how to interface with it.
If you're not into building your own code, the PHP extension is available as a package:
(NB this is JUST the PHP side of the service)
http://packages.ubuntu.com/source/dapper/php-pspell
C.
Have you configured php.ini to load the extension?