v.01
!Friendica Support
#friendica Q&A @Tutorial
How does the setting:'php_path' =>
, definable in the /config/local.config.php
or by the console via /bin/console config
work exactly?
The setting 'php_path' => '/usr/bin/php'
, that actually also shows up in the crontab -e
file doesn't exist as an existing folder structure and/or file, at least on this standard ubuntu server installation, but was the original setting of this instance when we ported it from a friendica beta hosting service over here to a single IP VPS server with a single domain. And till now with that setting this instance ran quite well.
Where does /usr/bin/php actually point to, by whom is ist accessed (www-data?) and is there a way to change the reference it points to (if it is actually a reference inside friendica)?
On this server, in the case of the installed friendica versions 2024.xx we set this to:'php_path' => '/etc/php/8.1/fpm/'
and for now the display in the admin panel looks quite right:PHP version 8.1.31 php.ini /**/8.1/fpm/php.ini
reasons for this "help to understand" request
This server is being setup to host different sub/domains, including different and older friendica instances (3.4.3/2019.12/2021.01/2021.04). The idea is at least to be able eventually to evolve them step by step to the actual stable or old stable versions of friendica. To achieve that this tutorial was used to be able to manage different php versions on the same VPS. The references for the php versions were taken from this github page.
There for the way the php version used for the different friendica versions is crucial to make things work in the first place.
Tobias
•This is entirely up to your operation system configuration. You can usually install multiple versions of (in this case PHP) alongside on the server that are called on
/usr/bin/phpX.YZ
(assuming/usr/bin
being the place on your OS for executeables), but "the main" version should also be available at/usr/bin/php
so that stuff that does not care for the exact version finds something.The path
/etc/php/8.1/fpm
looks like pointing to the configuration files of PHP-FPM 8.1 but not to an executeable. That it looks quite right might be, that the default version that PHP links to at your system is currently version 8.1.On Debian this is managed by the Alternatives systems.
utopiArte
•Thx for that hinting clarifying answer @Tobias.
I just started to search again for the
/usr/bin/
directory and it pooped up, it didn't before because I was searching for/usr/bin/php
. In general as of now I didn't get how this ubuntu server really works as als -l
search from the root directory only gives asnap
directory as an entry and searching into that is kinda dead end.Listing
/usr/bin/
I got the following directories displayed:(/php itself is a reference thats why it didn't show up)
So I tried to go to
... show more/etc/alternatives/php
, but againphp
is a reference so/etc/alternatives/
is the actually directory to go to. Listing that one gives the following listThx for that hinting clarifying answer @Tobias.
I just started to search again for the
/usr/bin/
directory and it pooped up, it didn't before because I was searching for/usr/bin/php
. In general as of now I didn't get how this ubuntu server really works as als -l
search from the root directory only gives asnap
directory as an entry and searching into that is kinda dead end.Listing
/usr/bin/
I got the following directories displayed:(/php itself is a reference thats why it didn't show up)
So I tried to go to
/etc/alternatives/php
, but againphp
is a reference so/etc/alternatives/
is the actually directory to go to. Listing that one gives the following list of php directories.What I wonder now is if it actually was necessary to install php-fpm versions or if I just could have installed php versions and get things going by pointing the
local.config.php
file to:/usr/bin/phpx.yz
as I guess you stated already.Also, maybe php-fpm works better in ubuntu debian?
@TupambAdminOrg [2024.03]
editing details for v.01
doesn't exist as an existing folder structure and/or file, at least on this standard ubuntu server installation, but was the original setting of this instance when we ported it from a friendica beta hosting service over here to a single IP VPS server with a single domain. And till now with that setting this instance ran quite well.]Where does /usr/bin/php actually point to,
Tobias
•@utopiArte while Ubuntu is Debian based and as such also uses the alternatives system, there are some differences (e.g. the snap packages you saw) - please read up the Ubuntu documentation for setting up a web server.
Regarding the differences of php and php-fpm see e.g. here. It depends on how you set up the server which package you need.
utopiArte
•Ultimately I got this setting donated "as is", a virgin ubuntu 2022.04lts @Tobias, and with @HankG's tutorial for ubuntu I simply set it up and went on, as my general interest isn't hosting or knowing anything of all "this stuff" but to "live" decentralized social web and create content in any case. At the same time, as selfhosting your own data to own your own data is the only way to be in charge of yourself, "all this stuff" comes later on, so in any case my goal is to live "learning by doing" and documenting it if possible so others can do the same like right here and now.
Thanks for the link, I will check it out to go on with understanding bit by bit what there is to know.
Actually apparently right now the server offers me to:
... show moreUltimately I got this setting donated "as is", a virgin ubuntu 2022.04lts @Tobias, and with @HankG's tutorial for ubuntu I simply set it up and went on, as my general interest isn't hosting or knowing anything of all "this stuff" but to "live" decentralized social web and create content in any case. At the same time, as selfhosting your own data to own your own data is the only way to be in charge of yourself, "all this stuff" comes later on, so in any case my goal is to live "learning by doing" and documenting it if possible so others can do the same like right here and now.
Thanks for the link, I will check it out to go on with understanding bit by bit what there is to know.
Actually apparently right now the server offers me to:
So I wonder if this is because it is/was updating to php 8.3, probably so, and at the same time if it is convenient to do so because as for I read friendica itself is working on being able to manage the different versions of php. Actually using the -fpm setup skips most likely the dependency on those ubuntu changes.
👍
Tobias
•utopiArte
•> APD package tree
A quick search was a littel bit confusing, lots of APD's out there, I guess that means:
APT package dependency tree ?
In other words, there is no reference registered in APT of the instalation for these packages (anymore).
Gone have to dig into that a little bit more.
@Tobias
Tobias
•utopiArte
•Check if the installed php versions where actualy activated:
a2enmod phpX.X
Replace “X.X” with the version number of the old PHP module you want to disable. For example, to disable PHP 7.2, you would run:sudo a2dismod php7.2
Next, enable the new PHP module by running the following command:
sudo a2enmod phpX.X
Replace “X.X” with the version number of the new PHP module you want to enable. For example, to enable PHP 7.4, you would run:
sudo a2enmod php7.4
Finally, restart the Apache server to apply the changes:
sudo service apache2 restart
utopiArte
•Notes about Alternatives systems:
M.Scheriau
•php
on the commandline, you can then usewhich php
on the same commandline to find out, which is the path used pointing to your PHP executable.It then does not matter, if that is a symlink or how often it is redirected, you can simply use the result of the
which
command.utopiArte
•@M.Scheriau
When I enter in the console I just get a new blank line:
root@VPShosting:~#
php
Same happens if I enter than
root@VPShosting:~#
which php
The same is true for doing this inside the friendica folder.
Does that just mean that "I don't get a working PHP with simply calling php on the commandline" or should I worry?
Again, this is most likely related to the -fpm install and I'll have to dig into that.
Tobias
•php-cli
package installed on your system? It is the package that makes PHP available on the command line. This is needed for the background process of Friendica. https://packages.ubuntu.com/search?keywords=php-cliutopiArte
•Tobias wrote:
Apparently yes @Tobias.
CLI wrote:
btw, right now the instance(s) are working fine, so no worries, even more if you have time costrains.
Im working around this to get it in my head and right now I'm more like in a floating state of mind letting the information settle down. Once that "worst part" is over I most likely will bother with pimping up very very old instances, like 3.4.3 old instances, so you better hide somewhere and put this account into some temporary ignore and cool down mode.
😀
utopiArte
•@M.Scheriau
Just now the command:
root@VPShosting:~#
which php
resulted in:
root@VPShosting:~#
php -v
That's actually a little bit unexpected as the last setting set, if I remember well, was the one referenced in one of the comments bellow from two days ago adjusting default to 8.4:
rootname@VPShosting:~#
update-alternatives --set php /usr/bin/php8.4
Maybe some settings were changed while installing the castopod instances, a installation that ultimately worked well suddenly and I actually attributed to the fact that 8.4 was activated.
In other words .. still digging into this and working on the best settings for each instance and software and which default version would be best.
utopiArte
•rootname@VPShosting:~#
ls -l /etc/apache2/mods-enabled/
utopiArte
•apparently changes in alternatives do not change the php version to php8.3
ls -l /etc/apache2/sites/avilable
displayes:root@VPShosting:~#
a2enmod php7.2.conf php7.2.load php8.1.conf php8.1.load php8.3.conf php8.3.load
didn't work
print results
ERROR: Module php7.2.conf does not exist!
Considering dependency mpm_prefork for php7.2:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.2:
Enabling module php7.2.
ERROR: Module php8.1.conf does not exist!
Considering dependency mpm_prefork for php8.1:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork
apparently changes in alternatives do not change the php version to php8.3
ls -l /etc/apache2/sites/avilable
displayes:root@VPShosting:~#
a2enmod php7.2.conf php7.2.load php8.1.conf php8.1.load php8.3.conf php8.3.load
didn't work
print results
ERROR: Module php7.2.conf does not exist!
Considering dependency mpm_prefork for php7.2:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.2:
Enabling module php7.2.
ERROR: Module php8.1.conf does not exist!
Considering dependency mpm_prefork for php8.1:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.1:
Module php8.1 already enabled
ERROR: Module php8.3.conf does not exist!
Considering dependency mpm_prefork for php8.3:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.3:
Enabling module php8.3.
To activate the new configuration, you need to run:
systemctl restart apache2
root@VPShosting:/etc/apache2/mods-enabled#
ls -l
root@VPShosting:~#
systemctl restart apache2
root@tupambae:/etc/apache2/mods-enabled#
a2dismod php7.2.conf php7.2.load php8.3.conf php8.3.load
print
ERROR: Module php7.2.conf does not exist!Module php7.2 disabled.
ERROR: Module php8.3.conf does not exist!
Module php8.3 disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
root@tupambae:/etc/apache2/mods-enabled#
systemctl restart apache2
Tobias
•@utopiArte the Apache 2 module is not affected by the PHP version that you call on the CLI. That CLI executable points to the PHP executeable of your (alternatives) choice. So
php --version
should give you different versions depending on the version you selected with the alternatives system.The PHP version used by Apache2 or as fpm is set in the Apache2 configuration files.
utopiArte
•A brief and very fast tutorial on debian ubuntu 20.04lts php and php-fpm.
Once more or less worked thru the text's here, listening to this should help assimiliating the whole story.
One of the take aways from this right now is that phpX.Y-fpm [=> -fpm] has nothing to do with the extra ppa to integrate more php versions but is at least part of ubuntu. A recheck if it's part of debian itself is still on Dodo's list, as well how to handle this on a standard debian server as ppa is a ubuntu thing (?), because most likely there is a pure debian way to achieve the same.
utopiArte
•intermezzo:
Summing up right now:
On ubuntu in the case of friendica the php version the instance can or will use can be set by the conf file in:
/etc/apache2/sites-available/friendicaDomain.com.conf
or the specific friendica config file:
/var/www/friendicafolder/config/local.config.php
.In any case it's probably important to not manipulate both options but one or the other.
Could be important to have in mind what happens when the server software itself get's update or the friendica instance is updated.
In other words, one thing is if the reference goes to the general php setting of the server:
'php_path' => '/usr/bin/php'
When the server updates, the installed friendica version will have to be able to work with that newer php version.
(¿what about the recent ubuntu php update mentioned above by the ubuntu server, where exactly takes that APT check place, would an uninstall of "outdated versions" affect the general setting of different sites and php versions?)
If the friendica version get
... show moreintermezzo:
Summing up right now:
On ubuntu in the case of friendica the php version the instance can or will use can be set by the conf file in:
/etc/apache2/sites-available/friendicaDomain.com.conf
or the specific friendica config file:
/var/www/friendicafolder/config/local.config.php
.In any case it's probably important to not manipulate both options but one or the other.
Could be important to have in mind what happens when the server software itself get's update or the friendica instance is updated.
In other words, one thing is if the reference goes to the general php setting of the server:
'php_path' => '/usr/bin/php'
When the server updates, the installed friendica version will have to be able to work with that newer php version.
(¿what about the recent ubuntu php update mentioned above by the ubuntu server, where exactly takes that APT check place, would an uninstall of "outdated versions" affect the general setting of different sites and php versions?)
If the friendica version get's updated but the server is stuck on an older not supported php version, there would probably occur issues too.
So one one hand there is to consider where the definition of the php path and version will be placed, on the other if the version itself should be hardcoded or left to the updates. If problems show up, in general terms the bug research does have to look the other way around, what php version is activated and where is that setting defined?
utopiArte
•add-apt-repository ppa:ondrej/php
Maybe the need for the ppa is only about the latest newest php versions and not the actual and older ones?
🤔
utopiArte
•A video that explains, apparently on pure debian, that -fpm -> FastCGI actually externalizes the PHP processes from the apache server and also sums up how to set it up correctly.
So on one hand there is installing different PHP versions, in that regard the -fpm PPA
ppa:ondrej/php
adds access to newer PHP versions that are still in development branch and than there is the fact that php-fpm itself at the same time is a specific independent version of PHP that separates the PHP handling and processes from the apache server and gives more options to tweak and speed up the PHP processes.utopiArte
•fpm = FastCGI Process Manager (FPM)
https://www.php.net/manual/en/install.fpm.configuration.php
This setting might address (somehow part of) the tweaking settings "editing php.ini" of friendica and at the same time the specific needs we'll have for example for castopod as we want to host a subdomain of that software for video and audio publications in the fediVerse and there for will need quite high values in terms of MB's, especially for videos.
... show moreAlso, is th
fpm = FastCGI Process Manager (FPM)
https://www.php.net/manual/en/install.fpm.configuration.php
This setting might address (somehow part of) the tweaking settings "editing php.ini" of friendica and at the same time the specific needs we'll have for example for castopod as we want to host a subdomain of that software for video and audio publications in the fediVerse and there for will need quite high values in terms of MB's, especially for videos.
Also, is there a way to define different values for different sites in the same php version configuration file?
(most likely)
specific IP or ¡domain! setting?
(for example for a video hosting site setting?)
That list goes on and on so we'll have to search first for what we want to do before checking into it in any case.
EDITion | EN
2023-11-22 06:43:38
utopiArte
•The digitalocean tutorial used inicially displayed two entries as variation of the standard entry in a sitedomain.registry.conf file robably only the second is/was neccessary fior the correct setup of php, this has to be checked again, for the friendica sites and the castopod site.
Entry that actually (probably) isn't about the php setting:
Entry that affects the php entry:
TupambAdminOrg [2024.03]
•To
PHP
, toPHP-fpm
or both .. that's the question!Trying to visualize the whole setup and questions regarding PHP to figure out what options are best.
Given the fact that more than one php version is installed, it is precise to tell the server what php version to use:
Does
update-alternatives
fix this setting for the server in general when ever there is no specific option mentioned in the domain.com.conf file or does this setting over-ride/over-rule settings indomain.com.conf
and/orlocal.config.php
?(it probably does not over-rule specific settings)
The friendica instalation help page states:
... show moreTo
PHP
, toPHP-fpm
or both .. that's the question!Trying to visualize the whole setup and questions regarding PHP to figure out what options are best.
Given the fact that more than one php version is installed, it is precise to tell the server what php version to use:
Does
update-alternatives
fix this setting for the server in general when ever there is no specific option mentioned in the domain.com.conf file or does this setting over-ride/over-rule settings indomain.com.conf
and/orlocal.config.php
?(it probably does not over-rule specific settings)
The friendica instalation help page states:
Can different settings in different places like:
/etc/alternatives/
/etc/apache2/sites-enabled/domain.com.conf
/var/www/domainfolder/bin/console config
and/or
crontab -e
create conflicts, slow down the server, become kind a fall back option or even create vulnerabilities?
maybe[li] slow down the server
probably[li] become kind a fall back option
perhaps[li] create vulnerabilities
most likely
Can there actually be no standard setting in place at all as default php?
(probably not)
Is it possible to not define the php version in domain.com.conf and instead define it in:
/var/www/domainfolder/config/local.config.php
as
'php_path' => '/usr/bin/php.8.2/fpm'
as the php handler and in the case of the cron job call/define:
/usr/bin/php.8.2/fpm
instead of
/usr/bin/php
for the
/var/www/domainfolder/bin/worker.php
to use?Tobias
•@TupambAdminOrg [2024.03] you need two PHP's - or better say two ways to call it. The one that is called by the webserver directly (this is either php-fpm or the mod_php in case of Apache2 servers) and the other one in the terminal PHP that is called by the background job. Both should have the same version.
The one in the Friendica config is the client version for the background jobs. That will be used for the long running background processes. In the web server config files you define the one used by the foreground processes.
TupambAdminOrg [2024.03]
•v.01
!Friendica Support
#friendicaPHP-fpm Q&A @Tutorial
deadlink
DIY standard procedures - best practice
Open a minimalistic text editor of your choice (e.g. mousepad/kate) to store basic and important information of your interaction with the CLI (console).Backup the commands and copy/paste notes of the basic results as well as information of your search and queries.
checking the existing settings before any modification
rootname@VPShosting:~# sudophp -v
rootname@VPShosting:~# sudo
php --version
rootname@VPShosting:~# sudo
v.01
!Friendica Support
#friendicaPHP-fpm Q&A @Tutorial
deadlink
DIY standard procedures - best practice
Open a minimalistic text editor of your choice (e.g. mousepad/kate) to store basic and important information of your interaction with the CLI (console).Backup the commands and copy/paste notes of the basic results as well as information of your search and queries.
checking the existing settings before any modification
rootname@VPShosting:~# sudophp -v
rootname@VPShosting:~# sudo
php --version
rootname@VPShosting:~# sudo
php
rootname@VPShosting:~# sudo
which php
rootname@VPShosting:~# sudo
ls -l /usr/bin/
rootname@VPShosting:~# sudo
ls -l /etc/alternatives/
system up to date check
rootname@VPShosting:~# sudo
apt get update
rootname@VPShosting:~# sudo
apt get upgrade
eventually
rootname@VPShosting:~# sudo
apt get dist-upgrade
adding PHP-fpm PPA to the system
if you havent already added php-fpm PPA to your systemadd PPA's as sources to the system
add the PHP-fpm PPA to the system
rootname@VPShosting:~# sudo
install software-properties-common
rootname@VPShosting:~# sudo
add-apt-repository ppa:ondrej/php
standard instalation of specific php modules for friendica using PHP-fpm
This list is from the install tutorial in progress:Install and/or move friendica 2023.05 to ubuntu 22.04 LTS VPS server
rootname@VPShosting:~# sudo
sudo apt install php php-fpm libapache2-mod-php php-common php-gmp php-curl php-intl php-mbstring php-xmlrpc php-mysql php-gd php-imagick php-xml php-cli php-zip php-sqlite3
Changes in friendica over time
php specific mentions in changelog of the friendica github repo over time
Version 2024.03 (2024-03-21)Improved PHP 8.2 compatibility
[MrPetovan] Friendica Addons
advancedcontentfilter
Updated dependency for PHP8.2 compatibility
[MrPetovan]Version 2023.12 (2023-12-24)
Friendica Core
Raised minimal PHP version to 7.4
Version 2022.12 (2022-12-20)
Improved the PHP 8.1 compatibility
[MrPetovan]Version 2022.02 (2022-02-06)
Friendica Core
Bumped the minimal version of PHP to 7.3
Friendica Addons
securemail
Updated dependencies to enhance the PHP8 support
[MrPetovan]Version 2021.07 (2021-07-04)
Friendica Core
Enhanced the support of PHP8 [nupplaphil, MrPetovan]
Version 2021.04 (2021-04-26)
Friendica Core
Enhanced the PHP8 compatibility [annando, nupplaphil, realkinetix]
Version 2021.01 (2021-01-04)
Friendica Core
Enhanced PHP8 compatibility
[annando]Version 2018.09 (2018-09-23)
Friendica Core:
Enhancements to the PHP7.2 compatibility [annando, miqrogroove, MrPetovan]
Friendica Addons:
Directory:
Enhancements of the PHP7 compatibility
[MrPetovan]Version 2018.05 (2018-06-01)
Friendica Core:
Enhancements to the PHP7.2 compatibility [Alkarex, MrPetovan, Quix0r]
Fixed wrong version of a dependency preventing the usage of PHP 5.6
[MrPetovan]Version 3.5.4 (2017-10-16)
Friendica Core:
Update the DB handling for support of PHP 7.1
[annando]Version 3.5.2 (2017-06-06)
Friendica Core:
Improved php7 support
[annando]Version 3.5.1 (2017-03-12)
Friendica Core:
Work on PHP7 compatibility
[ddorian1]Version 3.3
System stuff
no more apc support due problems with PHP 5.5
Specific installation instruction for:
friendica 3.4.3
friendica 3.4.3 and Addons:Instalation Instructions Requirements:
Apache with mod-rewrite enabled and "Options All" so you can use a
local .htaccess file PHP 5.2+. The later the better. PHP 5.3 is required for communications
with the Diaspora network and improved security. PHP *command line* access with register_argc_argv set to true in the
php.ini file - (cli,) curl, gd (with at least jpeg support), mysql, mbstring, mcrypt,
and openssl extensions ?
- Mysql 5.x ?
relevant changelog entries 3.4.3 to 3.6 -
https://github.com/friendica/friendica/blob/3.4.3/CHANGELOGVersion 3.5.4 (2017-10-16)
Friendica Core:
Update the DB handling for support of PHP 7.1
[annando]Version 3.5.2 (2017-06-06)
Friendica Core:
Improved php7 support
[annando]Version 3.5.1 (2017-03-12)
Friendica Core:
Work on PHP7 compatibility
[ddorian1]Version 3.3
System stuff
no more apc support due problems with PHP 5.5
friendica 2019.12
Github tree 2019.12Requirements
Apache with mod-rewrite enabled and "Options All" so you can use a local .htaccess file
PHP 7+ (PHP 7.1+ is recommended for performance and official support)
PHP command line access with register_argc_argv set to true in the php.ini file
Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions
The POSIX module of PHP needs to be activated (e.g. RHEL, CentOS have disabled it)
some form of email server or email gateway such that PHP mail() works
MySQL 5.6+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.)
relevant changelog entries 2019.12
https://github.com/friendica/friendica/blob/2019.12/CHANGELOG]Version 2018.09 (2018-09-23)Friendica Core:Enhancements to the PHP7.2 compatibility [annando, miqrogroove, MrPetovan]
2021.01 | apparently no changes to 2019.12
Github tree 2021.01Requirements
Apache with mod-rewrite enabled and "Options All" so you can use a local .htaccess file
PHP 7+ (PHP 7.1+ is recommended for performance and official support)
PHP command line access with register_argc_argv set to true in the php.ini file
Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions
The POSIX module of PHP needs to be activated (e.g. RHEL, CentOS have disabled it)
some form of email server or email gateway such that PHP mail() works
MySQL 5.6+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.)
PHP 7.1+
Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions
relevant changelog entries 2021.01
https://github.com/friendica/friendica/blob/2021.01/CHANGELOG]Version 2021.01 (2021-01-04)Friendica Core
Enhanced PHP8 compatibility [annando]
2021.04 | apparently no changes to 2021.01
Github tree 2021.04Requirements
Apache with mod-rewrite enabled and "Options All" so you can use a local .htaccess file
PHP 7+ (PHP 7.1+ is recommended for performance and official support)
PHP command line access with register_argc_argv set to true in the php.ini file
Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions
The POSIX module of PHP needs to be activated (e.g. RHEL, CentOS have disabled it)
some form of email server or email gateway such that PHP mail() works
MySQL 5.6+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.)
relevant changelog entries 2021.04
https://github.com/friendica/friendica/blob/2021.04/CHANGELOGVersion 2021.04 (2021-04-26)
Friendica Core
Enhanced the PHP8 compatibility [annando, nupplaphil, realkinetix]
2023.05
Github tree 2023.05Requirements
Apache with mod-rewrite enabled and "Options All" so you can use a local .htaccess file
PHP 7.3+ (PHP8 is not fully supported yet)
PHP command line access with register_argc_argv set to true in the php.ini file
Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip and OpenSSL extensions
The POSIX module of PHP needs to be activated (e.g. RHEL, CentOS have disabled it)
Some form of email server or email gateway such that PHP mail() works. If you cannot set up your own email server, you can use the phpmailer addon and use a remote SMTP server.
relevant changelog entries 2023.05
https://github.com/friendica/friendica/blob/2023.05/CHANGELOGVersion 2022.02 (2022-02-06)
Friendica Core
Bumped the minimal version of PHP to 7.3
Friendica Addons
securemail
Updated dependencies to enhance the PHP8 support
[MrPetovan]Version 2021.07 (2021-07-04)
Friendica Core
Enhanced the support of PHP8 [nupplaphil, MrPetovan]
2024.12
Github tree 2023.05Requirements
Apache with mod_rewrite enabled and "AllowOverride All" so you can use a local .htaccess file
PHP 7.4+
PHP command line access with register_argc_argv set to true in the php.ini file
Curl, GD, GMP, PDO, mbstring, MySQLi, xml, zip, IntlChar, IDN and OpenSSL extensions
The POSIX module of PHP needs to be activated (e.g. RHEL, CentOS have disabled it)
Some form of email server or email gateway such that PHP mail() works. If you cannot set up your own email server, you can use the phpmailer addon and use a remote SMTP server.
MySQL with support of InnoDB and Barracuda (we suggest a MariaDB server as all development is done using these, but alternatives like MySQL or Percona Server etc. might work as well)
relevant changelog entries 2024.12
https://github.com/friendica/friendica/blob/2024.012/CHANGELOGVersion 2024.03 (2024-03-21)
Improved PHP 8.2 compatibility
[MrPetovan] Friendica Addons
advancedcontentfilter
Updated dependency for PHP8.2 compatibility
[MrPetovan]Version 2023.12 (2023-12-24)
Friendica Core
Raised minimal PHP version to 7.4
Version 2022.12 (2022-12-20)
Improved the PHP 8.1 compatibility [MrPetovan]
The following are adapted lists of modules for older versions of friendica so they can run in a PHP-fpm setup.
php-fpm version php8.1
all avilabel modules:Use the following command to search available PHP 8 modules in the package repository.
sudo apt-cache search php8*
Adjustet modules list for a PHP8.1-fpm instalation for friendica 2023.05 to friendica 2024.12 using version php8.1 (as of writing):
basic modules to work with and run properly php8.1-fpm
libapache2-mod-php -> to run PHP scripts on apache, necessary for -fpm?libapache2-mod-fcgid -> unclear if necessary for -fpm
php8.1 -> standard PHP
php8.1-fpm -> standard PHP-spm module
php8.1-mysql -> Allows PHP to interact with MySQL databases
php8.1-cgi -> run PHP scripts without apache PHP module
php8.1-cli -> run PHP scripts from the command line
rootname@VPShosting:~# sudo
apt install libapache2-mod-php8.1 php8.1 php8.1-fpm php8.1-cgi php8.1-cli php8.1-mysql
specific additional modules to run friendica with php8.1-fpm
php8.1-common ->php8.1-curl -> URL transfer in PHP applications
php8.1-gd -> image processing
php8.1-imagick ->
php8.1-intl ->
php8.1-mbstring -> support for UTF-8 text formats
php8.1-sqlite3 ->
php8.1-xml -> XML support
php8.1-xmlrpc ->
php8.1-zip -> ZIP file support
rootname@VPShosting:~# sudo
apt install php8.1-common php8.1-curl php8.1-gd php8.1-intl php8.1-zip php8.1-xml php8.1-xmlrpc php8.1-imagick php8.1-mbstring php8.1-sqlite3
some more optional basic modules for php8.1-fpm:
php8.1-phpdbg ->hp8.1-imap ->
imagemagick ->
php8.1-mcrypt ->
php8.1-json ->
rootname@VPShosting:~# sudo
apt install php8.1-phpdbg php8.1-imap imagemagick php8.1-mcrypt php8.1-json
activate php8.1-fpm
enable php8.1restart the apache server to initialize the changes
rootname@VPShosting:~# sudo
a2enconf php8.1-fpm
]rootname@VPShosting:~# sudo
systemctl restart apache2
php7.Xy specific notes
php-imagick = [-imagick] is php-version specific present since php7.4-imagick.before it's moste likely necessary to install imagemagick(?)
2019.12 mentions the module "hash" ?
OpenSSL extensions ?
List of php7.Xy-fpm specific modules not mentioned in the install instructions
rootname@VPShosting:~# sudoapt install php7.2-fpm
List of modules mentioned in the github and/or the friendica ubuntu server install instructions
rootname@VPShosting:~# sudoapt install libapache2-mod-php7.2 php7.2 php7.2-common php-gmp php7.2-intl php7.2-mbstring php-xmlrpc php7.2-gd php7.2-mysql php7.2-zip php7.2-curl php7.2-xml php7.2-cli php7.2-sqlite3
List of php7.Xy-fpm modules not mentioned in the install instructions but present in newer versions of friendica (?)
Adjustet modules list for a PHP-fpm instalation for earliest friendica versions running from php7.Xy forward or somehow already installed (/):rootname@VPShosting:~# sudo
apt install phpmyadmin imagemagick
very old friendica versions using php5.6
modules list for a PHP-fpm instalation for earliest friendica versions running php5.6.Notes php5.6-fpm
The following modules do not exist in php5.6 as specific version modul: php-imagickSpecific installtion instruction for friendica 3.4.3 and Addons
Instalation Instructions Requirements:
Apache with mod-rewrite enabled and "Options All" so you can use a
local .htaccess file PHP 5.2+. The later the better. PHP 5.3 is required for communications
with the Diaspora network and improved security. PHP *command line* access with register_argc_argv set to true in the
php.ini file - (cli,) curl, gd (with at least jpeg support), mysql, mbstring, mcrypt,
and openssl extensions ?
- Mysql 5.x ?
complete list of php5.6-fpm modules
php5.6 php5.6-common php5.6-gd php5.6-mysql php5.6-imap phpmyadmin php5.6-cli php5.6-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt imagemagick libruby libapache2-mod-python php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl memcached php-memcache php-imagick php-gettext php5.6-zip php5.6-mbstring php5.6-opcache php5.6-json php5.6-ldap php5.6-soap php5.6-bz2 php5.6-bcmath php5.6-xml php5.6-dev php5.6-fpm php5.6-phpdbg php-apcu dh-php php5.6-readline pkg-php-tools shtool xml2
list of modules extracted from the list above that don't have a php5.6 prefix
phpmyadmin libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt imagemagick libruby libapache2-mod-python memcached php-memcache php-imagick php-gettext php-apcu dh-php pkg-php-tools shtool xml2
List of php5.6-fpm specific modules not mentioned in the install instructions
rootname@VPShosting:~# sudoapt install php5.6-fpm
List of php5.6-fpm modules mentioned in the github and/or the friendica ubuntu server install instructions
rootname@VPShosting:~# sudoapt install php5.6-cli php5.6-curl php5.6-gd php5.6-mysql php5.6-mbstring mcrypt
List of php5.6-fpm modules not mentioned in the install instructions but present in newer versions of friendica (?)
rootname@VPShosting:~# sudoapt install php5.6 php5.6-common php5.6-sqlite3 php5.6-imap php5.6-intl php5.6-xml php5.6-zip php5.6-json php5.6-xmlrpc
standard information of platform specific settings in phpX.Yz.ini of phpX.Yz-fpm
changes in platform specific settings in phpX.Yz.ini of phpX.Yz-fpm
standard information of platform specific settings in platform specific files
changes in platform specific settings in platform specific files
standard settings in configuration files of domains
check the existing settings after the modification
rootname@VPShosting:~# sudophp -v
rootname@VPShosting:~# sudo
php --version
rootname@VPShosting:~# sudo
php
rootname@VPShosting:~# sudo
which php
rootname@VPShosting:~# sudo
ls -l /usr/bin/
rootname@VPShosting:~# sudo
ls -l /etc/alternatives/
deadlink
EDITion | EN
2023-11-22 06:19:48
utopiArte
•Looks like it's starting to work out!
First publication of the #castoPod subdomain hosted on this very VPS server. This answer contains actually a direct link to a video snippet created on the instance and hosted on the instance. The setup is a littel weird, more like have way to the final goal, but with some work arounds usefull, including for the hosting of videos.
Looks like it's starting to work out!
First publication of the #castoPod subdomain hosted on this very VPS server. This answer contains actually a direct link to a video snippet created on the instance and hosted on the instance. The setup is a littel weird, more like have way to the final goal, but with some work arounds usefull, including for the hosting of videos.
utopiArte
2025-03-17 19:15:49