php5 Mcrypt Refusing to be installed for Ubuntu - php

I've been trying to get MCRYPT to install for the past hour - To no avail
Reply :
php5-mcrypt: Depends: phpapi-20090626
Php version :PHP Version 5.4.6-2~lucid+1
Ubuntu 10.04
NGINX web server

Seems like there are two things that made me unable to install MCRYPT
1) no support for this version of php
2) MYCRYPT has a conflict with SlimFramework , which I use

Related

installing Mcrypt php extension fails on Ubuntu and Xampp

I installed Xampp on Ubuntu 16 to work with Laravel.
I ran my Laravel code and got this error : Mcrypt PHP extension required.
After that I tried to install Mcrypt on PHP.
I have done these :
sudo apt-get install mcrypt
sudo phpenmod mcrypt
I have also done this : Link
I also restart the all services from Xampp after every change but I still get error on Laravel.
Any idea ?
My PHP version is 7.0.22 and Ubuntu version is 16.04.1 .
Thank you .
Edit 1
I did this and I still see the error.
After trying to many things. I just got rid of this shit by installing both version on my computer.
First I installed php 7.1.19 version.
Secondly I installed php 7.2.15 version
Now I am working perfectly with my project.

How to install php5.5 on ubuntu 16.0.04

I am new to Ubuntu, using version 16.0.04. I am trying to install php5.5. after installation it show php5.6 when running the command php -v.
Help me to install php5.5 on Ubuntu 16.0.04
I want to run symfony framework, In PHP7.0 it get error.
Your post is not clear.
Read From this post :
https://askubuntu.com/questions/849808/installing-php5-5-on-ubuntu-16-with-apache2
The PHP 5.5 have been removed from ppa:ondrej/php, the lowest version is php5.6. Note that there are differences between php5.5 and php5.6, so you need to test your code. There is a major difference with object serialisation.

How to install http_pecl on PHP 5.x?

I am trying to install pecl_http on Ubuntu 14.04, however it reports to require PHP 7.
$ sudo pecl install pecl_http
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
No valid packages found
install failed
$
Similarly on Debian:
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
I can't find changelog any information that pecl_http is not backward compatible with PHP 5.x.
I tried with PHP 7.0 and it installed successfully, but is there anything I can do to install it with PHP 5.x?
You'll need to find out what version of pecl_http doesn't require the current version of PHP, and then specifically install that one. According to the documentation:
"Package[-version/state][.tar]" : queries your default channel's server
(pear.php.net) and downloads the newest package with
the preferred quality/state (stable).
To retrieve Package version 1.1, use "Package-1.1," to retrieve
Package state beta, use "Package-beta." To retrieve an uncompressed
file, append .tar (make sure there is no file by the same name first)
And according to the changelog, pecl_http 3.0 is the first PHP 7 compatible version, so maybe try the previous.
Final answer: you'd be looking for sudo pecl install pecl_http-2.5.5
This question has an accepted answer, but I will add my 2 cents to the subject:
Based on your PHP version:
for PHP 7 use 'pecl install oci8'
for PHP 5.2 to 5.6 use 'pecl install oci8-2.0.12'
for PHP 4.3.9 to 5.1 use 'pecl install oci8-1.4.10'
OCI8 2.0.12 is the final release for PHP 5.6.x
OCI8 2.1.x is only valid for PHP 7
Installing OCI8 for PHP 5.6.31:
[root#server bin]# ./pecl install oci8-2.0.12
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading oci8-2.0.12.tar ...
Starting to download oci8-2.0.12.tar (1,615,360 bytes)
....
11 source files, building
running: phpize
Configuring for:
...
Expected output for PHP 5.6.31 and OCI8 2.0.12
This is the easiest way to install OCI8 support.

Problems installing PHP 5.4.11 and MySQL 5.6.10 on CentOS 6.3

I'm attempting to install PHP 5.4.11 and MySQL 5.6.10 onto a CentOS 6.3 box.
I've successfully installed PHP 5.4.11 via the remi repository for yum. I've also successfully installed MySQL 5.6.10 using the community server rpm's on the MySQL downloads page.
They both work fine independently, but when attempting to install php-mysql from the remi repository, a dependency of mysql-libs is pulled in which is at version 5.5.30, and going ahead with the install produces an array of errors like the following:
file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.5.30-1.el6.remi.x86_64 conflicts with file from package MySQL-server-5.6.10-1.el6.x86_64
At this point, I'm out of my depth with regards to getting this working. Can anyone suggest what I need to do to get my PHP installation working with MySQL?
rpm --nodeps --force
just override

Install libssh2-php on PHP 5.4.9 (x64)

I have a problem with the update on php 5.4.9 (i install it with the ppa "ppa:ondrej/php5")
Now i have the problem that i can't install libssh2-php (which is required on my project)
I found some .deb files, but it's only for 32-bit systems.
So when i'm trying to install libssh2-php i have a collision with "libssh2-php:i386" and i have the following dependiesmessage:
ucf:i386 libc6:i386 (>= 2.4) libssh2-1:i386 (>= 1.0) and phpapi-20090626+lfs:i386
System: Ubuntu Server 12.04 LTS x64 | PHP 5.4.9
I also got a warning on running "php -v"
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/ssh2.so' - /usr/lib/php5/20100525/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0
The problem is/was that the libssh2 is not aviable for PHP5.4.x AND a x64 system.
I have the same problem trying to use ondrej's ppa for ubuntu 10.04 LTS. It seams that he didn't include the sssh extension.
Apt-get tries to install the version from default package which runs into conflict (depends phpapi-20090626+lfs) with current installed version, isn't it?
Only my backup php cli script needs this extension to run. After trying to solve dependencies witout success, I switched to a shell_exec('ssh ...#...') solution as workaround.
I am only a developer with advanced admin knowledge, no apt-get or linux packaging admin professional. There maybe other solution to fix this via packaging management or maybe building the needed version from source?
EDIT:
There will be another nicer solution :-) you can use pecl to install / build the extension, here is what i have done:
$ sudo pecl install ssh2
Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed
$ sudo pecl install channel://pecl.php.net/ssh2-0.12
downloading ssh2-0.12.tgz ...
Starting to download ssh2-0.12.tgz (26,223 bytes)
[...]
Build process completed successfully
Installing '/usr/lib/php5/20100525+lfs/ssh2.so'
install ok: channel://pecl.php.net/ssh2-0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=ssh2.so" to php.ini
Afterwards I add extension=/usr/lib/php5/20100525+lfs/ssh2.so to php config.
Just do:
sudo aptitude purge php5-suhosin
It's described in detail here: bugs.debian.org

Categories