# How to install php7.2 on Rocky linux 9

**URL:** <https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644>\
**Category:** Rocky Linux Help & Support\
**Created:** [July 19, 2022, 4:42am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644 "2022-07-19T04:42:46Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![RockyUsers](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RockyUsers](https://forums.rockylinux.org/u/RockyUsers)\
**Post date:** [July 19, 2022, 4:42am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/1 "2022-07-19T04:42:46Z")

</div>

dnf list php  
only 8.0

i need 7.2;  
I use compilation to install PHP, but OpenSSL3 version is not supported, and some other plug-in versions are not supported. My system is aarch64

---

<div class="post-metadata">

**Author:** ![PREngineer](https://avatars.discourse-cdn.com/v4/letter/p/a587f6/32.png) [@PREngineer](https://forums.rockylinux.org/u/PREngineer)\
**Post date:** [July 19, 2022, 6:31am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/2 "2022-07-19T06:31:08Z")

</div>

Maybe you can try the REMI repository packages? Not sure. It is an idea to check out though.

---

<div class="post-metadata">

**Author:** ![RockyUsers](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RockyUsers](https://forums.rockylinux.org/u/RockyUsers)\
**Post date:** [July 19, 2022, 6:43am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/3 "2022-07-19T06:43:25Z")

</div>

I try the Remi repo, only x86\_ 64 no aarch64

---

<div class="post-metadata">

**Author:** ![PREngineer](https://avatars.discourse-cdn.com/v4/letter/p/a587f6/32.png) [@PREngineer](https://forums.rockylinux.org/u/PREngineer)\
**Post date:** [July 19, 2022, 6:44am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/4 "2022-07-19T06:44:24Z")

</div>

Sorry, I missed the aarch64 part.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [July 19, 2022, 7:55am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/5 "2022-07-19T07:55:36Z")

</div>

Old versions of openssl are known to be weak, vulnerable and not worth the effort to fix; the latest versions of openssl _are_ the fix. Software that depends on vulnerable components can turn out to have security vulnerabilities too. Therefore, you have to weight all the effort to find old PHP and cope with risks _versus_ the effort to port your service to run on new PHP. Both hurt.

---

<div class="post-metadata">

**Author:** ![remi](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/remi/32/1425_2.png) [@remi](https://forums.rockylinux.org/u/remi)\
**Post date:** [July 19, 2022, 8:03am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/6 "2022-07-19T08:03:20Z")

</div>

None of the versions \< 8.1 are compatible with OpenSSL 3 which is the default on EL-9.

My repository provides backports of the compatibility changes for 7.4 and 8.0 (and only for x86\_64)

Notice that all version \<= 7.3 have reached their end of life.  
[https://www.php.net/eol.php](https://www.php.net/eol.php)

So I recommend you use a supported version.  
(of course you can try rebuilding .src.rpm from my repository, but only of 7.4+)

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [July 19, 2022, 7:39pm UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/7 "2022-07-19T19:39:41Z")

</div>

> [@RockyUsers](#):
>
> I use compilation to install PHP

I don’t understand what this means?

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [July 19, 2022, 9:09pm UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/8 "2022-07-19T21:09:13Z")

</div>

Tries to get PHP installed by compiling/building it (from sources or srpm?), I’d guess.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [July 19, 2022, 10:34pm UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/9 "2022-07-19T22:34:05Z")

</div>

If that’s the case, I don’t think the op would want an rpm version of php clashing with the compiled version.

---

<div class="post-metadata">

**Author:** ![RockyUsers](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RockyUsers](https://forums.rockylinux.org/u/RockyUsers)\
**Post date:** [July 19, 2022, 11:09pm UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/10 "2022-07-19T23:09:19Z")

</div>

sry

> Compile PHP

i use php source  
openssl3 is not support

i compile openssl 1.1.1k tips aarch64 is not support

---

<div class="post-metadata">

**Author:** ![remi](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/remi/32/1425_2.png) [@remi](https://forums.rockylinux.org/u/remi)\
**Post date:** [July 22, 2022, 12:27pm UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/11 "2022-07-22T12:27:20Z")

</div>

Definitively, don’t try this…

If you really need 7.2, use EL-8

---

<div class="post-metadata">

**Author:** ![RockyUsers](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RockyUsers](https://forums.rockylinux.org/u/RockyUsers)\
**Post date:** [July 22, 2022, 3:02pm UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/12 "2022-07-22T15:02:22Z")

</div>

i download all el8 rpm,  
dnf -y install php\*.rpm it,s work

---

<div class="post-metadata">

**Author:** ![remi](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/remi/32/1425_2.png) [@remi](https://forums.rockylinux.org/u/remi)\
**Post date:** [July 28, 2022, 5:52am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/13 "2022-07-28T05:52:02Z")

</div>

Side note: “remi” now have aarch64 (only EL-9, only 7.4 to 8.1 as module)  
See [aarch64 repository for EL9 · Issue #214 · remicollet/remirepo · GitHub](https://github.com/remicollet/remirepo/issues/214)

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:44am UTC](https://forums.rockylinux.org/t/how-to-install-php7-2-on-rocky-linux-9/6644/14 "2023-08-25T03:44:08Z")

</div>

Closed on August 25, 2023, 3:44am UTC


