Solved how to install php74?

PHP7.4 has been EOL for almost half a year now and hence has been removed from ports.
So in short: you don't install PHP 7.4 anymore; use any of the 8.X releases.
 
bsd.default-versions.mk contains :
PHP_DEFAULT?= 8.1
I suggest don't put anything php related in make.conf and you will have the default php8.1
 
I mean, you *could* revert the commit that removed php74 on your local ports-tree and try to build all required packages. I've done this once to salvage an old horde installation shortly after php74 was removed; but due to dependencies moving on and above what php74 supports, there's no guarantee that builds of php74 or modules will succeed. Or better say: after half a year of everthing moving on, most of them *will* fail to build and need manual intervention *if* they could be build at all.
 
bagas: Thank you.

This is also pertinent to our use-case. Quite a few apps still rely on php74, one egregious example being owncloud. Some business-critical Wordpress plugins also rely on it.

For sysadmins this is a case of bad security, but for some users it is a case of desperate business situation, where they would rather jump to Linux.

The choice they made was, rather than using Ubuntu or Debian, install php74 in a FreeBSD 13.1 jail on a 13.2 host and closely monitor the php74 third-party audits, until they move to php8x.

mkjail create -v 13.1-RELEASE -j site -f default
 
Quite a few apps still rely on php74, one egregious example being owncloud.

Maybe switch to Nextcloud? That's where all the original owncloud devs are and where you will get everything (and more) that owncloud charges money for...


But yes, there's still some (mainly dead) software out there that still has no support for PHP8+. But for most of them I highly doubt there ever will be, so it would be wise to just pull the plug at one point and migrate to an actively developed alternative.
E.g. Horde is said to "soon" merge the work of php8 compatible forks upstream, but so far nothing happened and I consider Horde being dead and gone. Still haven't found the time to evaluate an alternative though...
There are some 'pear-horde-*' packages that are being build with php8+, but last time I tried this was still the old codebase that blows up left and right when running with php8+ and there are essential parts missing, so those packages won't give you a working Horde groupware installation.
 
sko:

Maybe switch to Nextcloud? That's where all the original owncloud devs are and where you will get everything (and more) that owncloud charges money for...

We recently tested the latest version of nexcloud and owncloud (on a Linux box, using Docker).

To our use-case, owncloud outperformed nexcloud by a significant margin.

Using a 13.1-RELEASE jail seems to temporarily solve the issue for us, while keeping the host server safe.
 
I got the same issue today (14.0-RELEASE), the solution was to install the older openssl version (111< 3x):

pkg install openssl111

Download the latest final php74 src (php 7.4.33) from php.net and compile/install it.
This was the bare minimum for me, to install a working mod_php74 for an old CMS on apache24:

fetch https://www.php.net/distributions/php-7.4.33.tar.gz
tar -xvf php-7.4.33.tar.gz
cd php-7.4.33
./configure --prefix=/tmp/makeinstall --with-apxs2=/usr/local/sbin/apxs --with-libdir=lib64 --with-openssl --with-curl --with-mysqli --
with-pdo-mysql --enable-gd --with-curl --enable-mbstring
gmake
gmake install clean


Needed to comment out "mod_php" (which one is for php8) in httpd.conf, and leave only mod_php74 to load...
#LoadModule php_module libexec/apache24/libphp.so
LoadModule php7_module libexec/apache24/libphp7.so
 
Back
Top