# where to get php7.1 packages binaries



## proton1234 (Aug 23, 2021)

Is there any reposidtory with php7.1 packages? The lowest version available via pkg is 7.3


----------



## SirDice (Aug 23, 2021)

PHP 7.1 has been end-of-life since December 2019. 






						PHP: Unsupported Branches
					






					www.php.net


----------



## proton1234 (Aug 23, 2021)

SirDice said:


> PHP 7.1 has been end-of-life since December 2019.
> 
> 
> 
> ...


I know but still needed it.


----------



## SirDice (Aug 23, 2021)

proton1234 said:


> I know but still needed it.


Why? It's EoL, that means it's not supported, no security updates, no nothing. Not a good idea to use. Switch to 7.3 or better yet 7.4.






						PHP: Supported Versions
					






					www.php.net


----------



## proton1234 (Aug 23, 2021)

SirDice said:


> Why? It's EoL, that means it's not supported, no security updates, no nothing. Not a good idea to use. Switch to 7.3 or better yet 7.4.


because code which is need to be compiled compatible with older versions only


----------



## SirDice (Aug 24, 2021)

PHP code isn't compiled. PHP is an interpreted language.


----------



## covacat (Aug 24, 2021)

there are extensions that are compiled
maybe his extension(s) wont build or segv on 7.3+

probably will be easier to fix the extension or work around it
relying on an unsupported product sucks


----------



## SirDice (Aug 24, 2021)

covacat said:


> probably will be easier to fix the extension or work around it
> relying on an unsupported product sucks


Fully agree with that.


----------



## eternal_noob (Aug 24, 2021)

proton1234 said:


> because code which is need to be compiled compatible with older versions only


Updating your code so it runs on 7.3 shouldn't be that hard.


----------



## proton1234 (Aug 26, 2021)

eternal_noob said:


> Updating your code so it runs on 7.3 shouldn't be that hard.


It's an old version of a CMS code so it's impossible to me to rework it.


----------



## Vull (Aug 26, 2021)

I don't understand. Do you mean a Content Management System? Does it have any special requirements?

I've migrated all the way from PHP 5 to 7.4 over the past few years. For an upgrade procedure, first set up a test system with the newer PHP version installed. Then, use a development version of the php.ini file (i.e., `cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini` ), restart the web browser, and systematically test and debug all your PHP code.

php.ini-development is set up to display more exception messages than the php.ini-production version, including the .php filenames and line numbers, so you can expediently debug the code as needed. You should add your customizations to both files, or, alternatively, you can just use the development version for production too.

Migrating from 7.1 to 7.4 was relatively quick and easy. All I can recall doing was adding single quotes to a few PHP `define` statements, for example, changing a `define(constantname,true);` statement to `define('constantname',true)`. These particular exceptions were for deprecated syntax problems that wouldn't even show up with the php.ini-production file, but in future versions, those same syntax errors are going to become fatal errors.

The jump from PHP 5 to PHP 7 was much more difficult, but still doable. Trying to avoid upgrading would actually be much harder than just going ahead and taking the plunge. Eventually, relatively minor problems will grow into major malfunctions.


Edited to add: If you still have the old drive where php71 was installed, have a look in the /var/cache/pkg/ directory.


----------



## proton1234 (Aug 27, 2021)

Vull said:


> I don't understand. Do you mean a Content Management System? Does it have any special requirements?
> 
> I've migrated all the way from PHP 5 to 7.4 over the past few years. For an upgrade procedure, first set up a test system with the newer PHP version installed. Then, use a development version of the php.ini file (i.e., `cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini` ), restart the web browser, and systematically test and debug all your PHP code.
> 
> ...


Different versions of my CMS have different PHP version requirements. Using other version than recommended will end up with 500 error etc. Enabling show errors will show errors. But I'm not an PHP coder so for me too much code to debug and edit. My current PHP version is 7.0, newer version of CMS requires php 7.3 but CMS updater from old to new version requires at least php 7.1 to run.

Regarding /var/cache/pkg/ how to install package from there "#pkg add /var/cache/pkg/name.txz" ?


----------



## Vull (Aug 28, 2021)

proton1234 said:


> Regarding /var/cache/pkg/ how to install package from there "#pkg add /var/cache/pkg/name.txz" ?


I wouldn't, but honestly, I've never attempted anything like this. I'd expect it to be more problematic than that. If you use `ls -l` you'll see that about half the files in /var/cache/pkg/ appear to be symbolic links to the other half. I don't know why. I'd probably start by copying the files to another location, rather than attempting to install them right out of the cache. Then you'll need to worry about package dependencies as well.

I'd book up on this well, if I were you, and make backups beforehand. To get a clean duplicate of /var/cache/pkg/:
`cd /var/cache`
`tar -cpf /tmp/pkg.tar pkg`

How did this happen? How did we get into this situation? Did someone inadvertently upgrade the software? If so, you'll probably first need to uninstall the newer versions of both the php packages and their dependencies. Or you might be better off starting over from scratch on a different installation after copying your cache into a separate directory. It's hard to advise without knowing more about the particulars. I don't know how the pkg system might behave when, for example, you might be trying to add a downgraded version when it already has an upgraded version in the cache. I suggest you proceed very cautiously in any case or you might just make things worse.


----------



## SirDice (Aug 30, 2021)

proton1234 said:


> newer version of CMS requires php 7.3 but CMS updater from old to new version requires at least php 7.1 to run.


You do realize that 7.3, 7.4 and even 8.0 meet the "requires _at least_ PHP 7.1 to run"? I feel you're misunderstanding what _minimal_ requirements are.


----------



## proton1234 (Sep 2, 2021)

SirDice said:


> You do realize that 7.3, 7.4 and even 8.0 meet the "requires _at least_ PHP 7.1 to run"? I feel you're misunderstanding what _minimal_ requirements are.


Current old CMS version is compatible with php70 and php71 and running under php70. Updater is a separate module which can be installed into CMS under php70 correctly but if we try to run an update it will throw a certain type of an fatal error in the middle of update process.
Gathering some info about the issue reveal that updater should be run on php71 or higher or this error will persist. That's all.

And if no easy way to get somewhere php71 will be found I have to reinstall the whole CMS.


----------



## SirDice (Sep 2, 2021)

proton1234 said:


> that updater should be run on php71 or higher


So, PHP 7.3 will do then?


----------



## covacat (Sep 2, 2021)

you can probably get them from 


			Index of /FreeBSD:11:amd64/18.7/latest/All
		

they are for freebsd11 but they may work on 12 with a bit of hacking
or install a vm with 11, install apache, sql, copy the cms over in the vm, upgrade it 
install php 7.4 on the real box and copy it back


----------



## proton1234 (Sep 3, 2021)

SirDice said:


> So, PHP 7.3 will do then?


I need to upgrade to php71, then run CMS updater, then shutdown FAMP, then upgrade to php73, then start FAMP again. If i upgrade to php73 before CMS update it won't work so it will impossible to run update process.



covacat said:


> you can probably get them from
> 
> 
> Index of /FreeBSD:11:amd64/18.7/latest/All
> ...


I use 11.4 so I think it should be compatible.


----------

