How can one install imap for php in ubuntu for php7.1 preferably in the terminal.
There's some info on this on the php.net manual but it's a bit dated.
It talks about the c-client library and restarting apache afterwards etc
I'm still pretty new with linux
As long as it is part of the php repo you are using, this will be the package you are looking for.
sudo apt install php7.1-imap
You can install IMAP by following ways.
Step1: sudo apt-get install php7.1-imap
Step2: sudo phpenmod imap
Step3: php -m. Find out imap module
Step4: Run below command to confirm imap is install.
1. php -i | grep -i imap
2. dpkg -l | grep php7.1-imap
Step5: check phpinfo()
check imap is showing or not.
After enabling a module, you have to restart your pc. If a module is still not displayed in phpinfo(), please check on the next day.
Related
Hi I'm trying to install mailparse for my php7.4.21 on my linux centos7 server but the documentation is not great and I'm no sysadin.
https://www.php.net/manual/en/mailparse.installation.php states "In order to use these functions you must compile PHP with mailparse support by using the --enable-mailparse configure option". This is not very helpful but so far I've had to do the following:
// To install re2c:
> curl http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/r/re2c-0.14.3-2.el7.x86_64.rpm --output re2c-0.14.3-2.el7.x86_64.rpm
> rpm -Uvh re2c-0.14.3-2.el7.x86_64.rpm
// I then installed mailparse
> pecl install mailparse
// I then modified php.ini to add the following:
extension=mailparse
// I then restarted apache
> systemctl restart httpd
But looking at my phpinfo output I cannot see mailparse listed.
What do I need to do next?
NOTE: I'm not sure I've actually "compiled PHP with mailparse" and I'm not sure how to apply "using the --enable-mailparse configure option".
Thanks
Abe
so I ended up on https://github.com/php-mime-mail-parser/php-mime-mail-parser/blob/master/README.md that talks about using sudo apt install php-cli php-mailparse for Ubuntu systems, which after a little more effort I found that yum install php-cli php-mailparse was the equivalent for centos (and then restarting apache). This worked.
yum install php-cli php-mailparse
systemctl restart httpd
I have installed php7.4 via RHEL8's Default Stream using dnf.
I want to install the php's ssh2 module.
How do I install Pyrus (Pear2 Package Manager) on RHEL8 with php7.4?
When I tried: php pyrus.phar
I got the error message in command prompt: Could not open input file: pyrus.phar
I used:
updatedb
locate pyrus
Got nothing
So, what is the issue here?
Best Regards
Thayalan
I wanted to install php's ssh2 extension via Pyrus but I was having trouble with Pyrus. Therefore, I tried it without Pyrus. I preferred yum or dnf installation throughout. But, it was not possible for some. The following are how I have installed ssh2:
yum install make gcc php-devel php-pear
libssh2 package (ssh2 package needs it) installed by downloading the file https://libssh2.org/download/libssh2-1.10.0.tar.gz into an appropriate folder.
Then, I entered the following commands:
tar -zxvf libssh2-1.10.0.tar.gz
cd libssh2-1.10.0
./configure
make
make install
ssh2 package installed by downloading the file https://pecl.php.net/get/ssh2-1.3.1.tgz into an appropriate folder.
Then, I entered the following commands:
tar -zxvf ssh2-1.3.1.tgz
cd ssh2-1.3.1
phpize
./configure
make
make test
make install
Then I entered the following entry into /etc/php.ini: extension=ssh2.so
After that, I restarted php by: systemctl restart php-fpm
And now, php's ssh2 extension has been successfully installed.
I have a web-based PHP script named portail, so I want to make it functional on Ubuntu.
I installed Xampp 5.6 , Firebird 2.5 under Ubuntu, then I uncommented the library:
"extension=php_pdo_firebird.dll"
and I made the specific configuration for php5 and firebird
(https://mapopa.blogspot.com/2009/04/php5-and-firebird-pdo-on-ubuntu-hardy.html),
but he always shows me the following message
could not find driver localhost/portail
Screenshot:
You should install the required php extension if not already installed by default installation process. Php extensions are binaries which help php do extra things which can not without them. For example there is another well-known php extension called X-Debug which helps php developers debug their code.
First of all check that you have this php_pdo_firebird extension installed (or not), using Ubuntu CLI (Command-Line Interface):
installed system-wide by default:
php -m | grep -i pdo-firebird
installed using your package manager:
dpkg --get-selections | grep -i php-pdo-firebird
If none of the above returned a result, then you do not have that extension installed. you should install it using your preferred package manager:
sudo apt-get update -y
sudo apt-get install -y php-pdo-firebird
Try this
php -v
apt-get install -y php<your php version>-interbase
I am trying to enable LDAP for PHP5.6 on Ubuntu 16.04. I have tried the following steps
- sudo apt-get install php5-ldap
- sudo enmod ldap
- sudo php5enmod ldap
but still I am unable to get my ldap related functions working with PHP
you need to restart your apache (systemctl restart apache2). Apache has its very own single php-process running*. The php-configuration is only reload if apache restarts this process. You can check your active configuration with phpinfo
* this is very simplified and depends on the apache MPM-Module you are using.
sudo apt-get install php-ldap
/etc/init.d/apache2 restart
#baig772 answered their own question but they didn't post it as an answer.
latest ubunutu php-ldap was not working I tried installing apt-get install php7.0-ldap which is not working, then I download deb https://debian.pkgs.org/sid/debian-main-amd64/php7.2-ldap_7.2.4-1+b2_amd64.deb.html
wget http://ftp.br.debian.org/debian/pool/main/p/php-defaults/php-common_49_all.deb
wget http://ftp.us.debian.org/debian/pool/main/p/php7.0/php7.0-ldap_7.0.29-1+b2_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/u/ucf/ucf_3.0038_all.deb
then..
apt install ./php7.2-common_7.2.4-1+b2_amd64.deb
apt install ./php7.2-ldap_7.2.4-1+b2_amd64.deb
...
once it is installed confirmed by running the
apt-cache pkgnames | grep ldap | grep php
php-symfony-ldap
php7.2-ldap
php-net-ldap2
php-net-ldap3
check php enabled modules
:/usr/lib/php/7.2# php -m
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
it does not have ldap module..
so copied .so files
:/usr/local/etc/php# cp /usr/lib/php/20170718/ldap.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/
enable apache ldap " a2enmod ldap"
php-m
now it has ldap module enabled.
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
json
ldap
libxml
mbstring
restart apache and checked in info.php.
/etc/init.d/apache2 stop
/etc/init.d/apache2 start
I don't have a oracle database installed in my system. But i want to connect to the remote system. Do i just need to install oci8 extension library or i need to install both instantclient and the oci8 extension?
If I remember correctly, OCI8 extension wouldn't even compile without Instant Client; if you install using PECL, it asks you for Instant Client path. Moreover, from my experience, you'll also need Instant Client SDK in addition to Basic, unpack them to one directory, and make some symlinks before running PECL command:
sudo ln -s libclntsh.so.* libclntsh.so
sudo ln -s libocci.so.* libocci.so
Don't forget to enable the config later:
echo "; configuration for php oci8 module" | sudo tee /etc/php5/conf.d/oci8.ini
echo extension=oci8.so | sudo tee -a /etc/php5/conf.d/oci8.ini
Taken from this post (in Russian), also installed OCI8 myself recently on Debian 7.