E
E
Evgeny Elizarov2013-10-29 10:50:08
linux
Evgeny Elizarov, 2013-10-29 10:50:08

How to put an old version of php on a new server (CentOS)

They raised the server, installed php (fresh 5.4.21), the developers said - we are welcome to 5.3.x, did yum downgrade php, is not going to roll back (as I understand it, because there are no packages with old versions of php - the server is new). How to be? I'm not very good friends with CentOS, googling hasn't helped yet.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
K
KEKSOV, 2013-10-29
@KEKSOV

It is always possible to build from source . Believe me, it's not difficult at all. Everything looks like this:

  1. Download sources: cd /usr && wget us2.php.net/get/php-5.3.27.tar.gz/from/de1.php.net/mirror && tar -xzf php-5.3.27.tar.gz && cd php-5.3.27
  2. Configure modules ./configure --help
  3. Assemble make
  4. Rewrite make install in the right places
  5. Set up web server configs

M
Masterme, 2013-10-29
@Masterme

Hello.
The problem is general, it concerns not only php, but any language in principle. In production, a certain version of the interpreter may be needed, and not because of the qualifications of programmers, but for various reasons, most often it is either legacy or different versions in the repositories of development machines and production. Therefore, the optimal way out is to compile from source both on production and on a development machine. Rubyists understood this immediately, and they have a wonderful rvm. For php, the most similar is phpfarm . Nothing supernatural, just convenient automation of manual operations. You may have to fiddle around with dependencies like *-devel, because these errors are only visible when compiling php.

I
Ilya Evseev, 2013-10-31
@IlyaEvseev

There are a couple of external repositories with old PHP for CentOS:
- www.webtatic.com/packages/php54/
- kb.solarvps.com/centos/how-to-install-apache-and-php-5-3-on-centos- 6/
Both are found on Google with "centos 6 php 5.3"

N
Nastradamus, 2013-10-29
@Nastradamus

In Ubuntu Server, there are special PPAs for this. True, then if you need to return the latest version, you will have to mess around with resolving dependency conflicts a little.

W
wartur, 2013-10-29
@wartur

Recently a similar problem was solved. A friend suggests:
for CentOs 5.7
, you need to disable the left repositories, remove php 5.4 and all its components.
then yum search php
if there is php5.3 in the list, then manually specify the version yum install php53

T
truekenny, 2013-10-29
@truekenny

You can not do a downgrade, but for developers - this .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question