I'm currently trying to install PHP Tidy on a CentOS 7 server (I'm running PHP Version 5.4.16 if that helps as well), but am having problems with the install.
I've been running (as per the documentation)
yum install php-tidy
but get the following error:
No package php-tidy available.
Error: Nothing to do
I've found someone having the same problem here, and the answer is listed as
When I installed via CentOS tidy.x86_64 and php-tidy.x86_64 were installed but Red Hat could not find the php-tidy.x86_64 rpm and I had to add the EPEL repository, then I managed to install php-tidy.x86_64 and it worked
...but I'm not sure what to make of that.
I've also found via the official Tidy documentation:
On Redhat-ish linux, you must install both libtidy and libtidy-devel (PHP 5.x):
sudo yum install libtidy libtidy-devel
...however I also get the same "No package..." error.
My only lead is that it doesn't appear that any of the documentation has to do with CentOS 7 (I believe they use CentOS 6 or 5, or an older version of PHP) and some of the suggestions are that some systems require yum install php5-tidy instead. So hence my original question on if Tidy is supported on CentOS 7, or if there is something else I might be doing incorrectly.
Use the webtatic repo ... PHP 5.6 on CentOS/RHEL 7.1 and 6.7 via Yum
https://webtatic.com/packages/php56/
php56w-tidy
Related
sorry if there is a duplicate question for this but I'm trying to set this up for hours now and it just doesn't work.
I have a Debian 11 server with "KeyHelp" installed on it (little brother of plesk). It comes with PHP 7.4 but provides a simple Dashboard where you can install other PHP versions. I installed PHP 8.1 and tried to install the mongodb extension via PECL.
After "pecl install mongodb" I added "extension=mongodb.so" and after that didn't show up the extension on the phpinfo page, I double checked if the extension is really in the extension folder of php, where it was.
Turns out that I installed the extension for PHP 7.4 and not for PHP 8.1. Finally I tried to force PECL to install it for PHP 8.1 but it says "phpize8.1 command not found". I found no way to install phpize8.1, can somebody help me out with that?
Thanks in advance!
I am using Ubuntu 20.04
I have PHP 8.1 version. You have to install modules of PHP
sudo apt install php8.1-mongodb
List the modules
php -m
It's not exactly Debian. I hope it helps you.
If you run command:
sudo apt install php-dev
System will install automatically the correct version of php{x}-dev for your distribution, and all it's dependencies, included PECL.
another way is try to run:
/usr/bin/phpize
If this command works, you need to add phpize to your PATH:
PATH=$PATH\:/usr/bin; export PATH
In this way phpize will work in future.
My current setup of Webmin/Virtualmin has PHP 5.6 and 7.2. More and more composer packages have a requirement of PHP 7.4. I don't want to have 7.4 as the default PHP, I have sites on the server that need 5.6 (I know, not great but it's the way it is), so I'm trying to get 7.4 installed in the same structure as 7.2, in the /opt/rh folder.
The version of Linux is "CentOS Linux release 7.8.2003 (Core)"
I've tried to do this about 5 times and failed each time, there is just no information (that I can find) out there to say how to do this. Any help would be massively appreciated.
If you need to keep default version of PHP, make sure to install PHP 7.4 from [remi-safe] repos.
Install Remi Release repo and clear cache:
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm && yum clean all
Install PHP 7.4 packages:
yum -y install php74-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd}
It's clearly described in our documentation page on how to install different versions of PHP for Virtualmin.
You can have couple version of php running in the same time.
Check this
Multiple PHP Version on Centos
I have several headaches on installing phpMyAdmin on Centos 6.8
I have php 5.5 installed from webtatic repo. Mysql 5.6 installed as well.
When I install phpMyAdmin by
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# yum --enablerepo=remi,remi-test install phpMyAdmin
I got these errors:
In fact, I had another trial before, I had php 5.4 installed from Remi repo and facing similar problem when installing phpmyadmin, see another post
I am relatively new to Linux server stuff. I have several questions and hopefully someone could help me out.
At this point, what the yum has done? it leave me big hole which I don't know how to proceed from here. it seems yum has removed some my php5.5 modules without getting replacement installed. those php module being removed are needed by my Magento site. And I don't know if phpmyadmin has been installed or not.
I don't know what/who cause the problem, or is it because my php was installed from webtatic repo, so I can NOT use Remi repo to install any package that related to php such as phpmyadmin? if so, why yum has no process to prevent the problem? if it is not, why yum or Remi repo leave such situation to user like this is not their business? Anyway, in my another try, both php5.4 and phpmyadmin are installed from Remi repo...
From phpMyAdmin web, I know that its 4.7 version can work with php 5.5 or later + Mysql 5.5 or later. However, I find only version 4.0 available for Centos 6 in Remi repo by command:
yum list phpMy*
My current installation is php 5.5.38 + Mysql 5.6. Can I install phpmyadmin 4.7 and how (under Centos 6.8)? I proceeded with installation even I found only 4.0 available as I attempted to upgrade to 4.7 after installation.
First of all, How can I save my installation (including php and mysql) and get phpmyadmin (better to be 4.7) installed properly from here. so I don't have to rebuild the system....Honestly, even rebuild the system again, I still have no idea about the right way to get right phpmyadmin installed without error.
Note: I have to stick with php either 5.4 or 5.5 as my Magento site is 1.8
Any help and explanation will be greatly appreciated. thank you in advance.
Supplement: Ok, by googling, the 3rd question seems found its answer from here.
It seems I was installing phpMyAdmin 4.7....But why the error since php 5.5 is officially supported by phpMyAdmin 4.7? is the webtatic repo or the Remi repo too bad? leaving such dependency hole... How to address such issue from here?
Do you tried this?
sudo yum install epel-release
sudo yum install phpmyadmin
(https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-a-centos-6-4-vps)
I can't use the yum at all!
is there any php5.5 rpm file can be download to fit the the centos 6.5?
I can't use yum, so the php extension such as php55w-xml php55w-mcrypt php55w-gd php55w-devel php55w-mysql php55w-mbstring also should be downloaded in the form of rpm file.
Where can I find these rpm files?
Should I use rpmbuild to build these?
For CentOS 6, PHP 5.3.3 is the latest version of PHP available through the official CentOS package repository. Keep in mind, even though PHP 5.3.3 was released July 22, 2010, the official CentOS 6 PHP package was updated November 24, 2013. Why? Critical bug fixes are backported. See this question for more information: "Why are outdated packages installed by yum on CentOS? (specifically PHP 5.1) How to fix?"
If you'd like to use a more recent version of PHP, Les RPM de Remi offers CentOS PHP packages via a repository that you can add to the yum package manager. To add it as a yum repository, follow the site's instructions.
Note: Questions of this variety are probably better suited for Server Fault.
What is the best way to get PHP 5.3 up and running on CentOS 5.4.
My machine says I have PHP 5.3 installed but running into an issue with my script that says
Fatal error: Class 'PDO' not found in /var/www/html/lib/rb.php on line 45
It fails trying to new up a PDO class in the RedbeanPHP 3.0 lib.
How can I fix this missing PDO problem?
I tried to follow these instructions:
from http://www.computingunplugged.com/issues/issue201102/00002619002
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# THIS LINE FAILED FOR ME
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-6.ius.el5.noarch.rpm
yum erase php php-pear php-mysql php-cli php-common
yum install php53u php53u-pear php53u-cli php53u-common php53u-gd
yum install php53u-mbstring php53u-mcrypt php53u-mysql php53u-soap
yum install php53u-xml php53u-xmlrpc php53u-bcmath
UPDATE
Someone removed their answer. It was good. I'm putting it back in with exact steps.
First I had to yum install php53u-devel
To quote "
You need the PDO extension. Usually the best way to install extensions is via PECL.
Before you can install any PECL extensions you need to install the php5-dev package
sudo pecl install pdo
sudo pecl install pdo_mysql
You then need add the following to the end of your php.ini file(s). Depending on which version of PHP you installed they’ll be /etc/php5/apache2/php.ini, /etc/php5/cgi/php.ini and /etc/php/cli/php.ini.
extension=pdo.so
extension=pdo_mysql.so
"
Now I get a mysql_query_missing when trying to run sudo pecl install pdo_mysql
and not sure how to get past this.
You'll have to install the php-pdo package as well.
Edit: Maybe this helps as well: How do I enable PDO using CentOS?
I have been successfully able to install PHP-5.3 on CentOS 5.4 Linux. I needed this to be able to successfully install and run Drupal 7 - which also worked out for me. Here are the details:
This is a copy of the answer I wrote up in ServerFault: https://serverfault.com/a/392168/29205
(...for my question: https://serverfault.com/questions/391772/php-xml-install-complains-of-dependency-php-common-but-this-is-already-installed/392168#392168 )
The solution is based on the accepted answer in:
https://serverfault.com/questions/391839/how-to-force-centos-yum-to-use-a-later-version-of-a-package-dependency-already-i
In summary: move to php5.3.
Reason: support for php5.2 as been removed owing to security issues as explained in that other question's accepted answer. This removal causes mismatch of the versions of the dependencies and therefore the error seen.
Background
I wanted to run Drupal 7 on a CentOS 5.4 machine. So I needed 5.3 version of PHP.
Here are the full working steps to upgrade to PHP 5.3 with working repositories as of May 24 2012 ( I provide comments preceded by # - you don't need these, just for your info)
# Comment: sites like http://www.computingunplugged.com/issues/issue201102/00002619001
# provide a good start for remedying the problem whereby we need 5.3 on CentOS 5.4 to run Drupal 7. But although their packages worked at the time, the links are now outdated, and updates to these are below.
# comment: (as of May 2012 - the following work, the reason for failures was use of 1) older packages no longer on the server and 2) change of address of one of the servers to dl.fedoraproject.org/pub/epel (credit to: http://osdir.com/ml/centos/2012-03/msg00057.html )
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm
yum erase php php-pear php-mysql php-cli php-common
yum install php53u php53u-pear php53u-cli php53u-common php53u-gd
yum install php53u-mbstring php53u-mcrypt php53u-mysql php53u-soap
yum install php53u-xml php53u-xmlrpc php53u-bcmath
# After doing the above, php -v shows 5.3.x But on attempting to install Drupal 7 you may get complaint of something "Your PHP installation is too old 5.1.6 Drupal requires at least PHP 5.2.4. See the system requirements page for more information." and php.info shows the same
# The remedy is to simply restart your apache server
service httpd restart
# credit to following for suggesting service httpd restart :-
# https://serverfault.com/a/207806/29205
# https://serverfault.com/questions/207762/centos-updating-php-via-yum-doesnt-change-the-version-apache-uses
# Drupal 7 install on CentOS 5.4 worked after applying the above steps
# If your MySQL server is not running (check by ps -ef | grep mysql ) then you can run:
/etc/init.d/mysqld
# ...to start it, and to make sure it starts when the machine is restarted or cold booted:
chkconfig mysqld on