[ apache24 (PHP 7) ] Web Server

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [ apache24 (PHP 7) ][ 2.4.51.1 ] Web Server

Post by sanctimon »

I have gotten slightly further with this in the meantime.

I was able to find php v7.4 in

Code: Select all

/usr/local/apache24/sys/bin/
However, I am trying to run the cron.php job with Nextcloud (OKM edition) and when I run:

Code: Select all

sudo -u www-data /usr/local/apache24/sys/bin/php -f /mnt/md0/application/Nextcloud_okm/bin/nextcloud/cron.php
I get

Code: Select all

Error: Class 'PDO' not found in /mnt/md0/application/Nextcloud_okm/bin/nextcloud/lib/private/DB/Connection.php:103
It follows that adding the same line to crontab will also not work. Any ideas?
User avatar
outkastm
Gold Member
Posts: 1459
Joined: 29 Dec 2020, 23:52

Re: [ apache24 (PHP 7) ][ 2.4.51.1 ] Web Server

Post by outkastm »

install the latest Nextcloud_okm app (23.0.0.1) and run

Code: Select all

sudo -u www-data Nextcloud_okm cron.php
for cron use

Code: Select all

*/5 * * * * www-data /usr/local/bin/Nextcloud_okm cron.php
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [ apache24 (PHP 7) ][ 2.4.51.1 ] Web Server

Post by sanctimon »

That's what I did at first, but it would complain that Nextcloud 23 cannot use php 7.1, which is apparently what comes as standard on TOS and does not get replaced, even when you install other versions. (I am a bit lost as to how these PATHs are set up on TOS and there is very little information/documentation to go around.

I got around this by running:

Code: Select all

cp /mnt/md0/appdata/MOD_CONFIG/Nextcloud_okm/php.ini /usr/local/apache24/sys/etc/php.ini

Code: Select all

crontab -u www-data -e
setting:

Code: Select all

*/5  *  *  *  * /usr/local/apache24/sys/bin/php -f /usr/local/Nextcloud_okm/bin/nextcloud/cron.php
and then changing the setting from within Nextcloud from Ajax to cron.

I had to copy the php.ini file from within the Nextcloud folder, as the php command was trying to find a php.ini here:

Code: Select all

/usr/local/apache24/sys/etc/
but there were no php.ini files there.
User avatar
sanctimon
Posts: 98
Joined: 14 Nov 2021, 06:57

Re: [ apache24 (PHP 7) ][ 2.4.51.1 ] Web Server

Post by sanctimon »

Code: Select all

/usr/local/apache24/sys/bin/php -i  | grep 'Configuration File'
previously returned:

Code: Select all

Configuration File (php.ini) Path => /usr/local/apache24/sys/etc
Loaded Configuration File => [none]
which is why I copied Nextcloud's php.ini into that location.
User avatar
outkastm
Gold Member
Posts: 1459
Joined: 29 Dec 2020, 23:52

Re: [ apache24 (PHP 7) ][ 2.4.51.1 ] Web Server

Post by outkastm »

You don't have to copy any php.ini
Every app i made and which depend on apache, have his own php.ini located at /mnt/appdata/MOD_CONFIG/modulename
As example, the php.ini used by Nextcloud_okm is located at /mnt/appdata/MOD_CONFIG/Nextcloud_okm.

My apache module contains php 7.4 and if you want you can also install php8

Every app can be configured to used whatever version of PHP you want, from the available ones, and these are not interfering with the php version from TOS

I made these app to be as easy as possible to be configured by each user
User avatar
outkastm
Gold Member
Posts: 1459
Joined: 29 Dec 2020, 23:52

Re: [ apache24 (PHP 7) ][ 2.4.51.1 ] Web Server

Post by outkastm »

sanctimon wrote: 07 Dec 2021, 05:15 That's what I did at first, but it would complain that Nextcloud 23 cannot use php 7.1, which is apparently what comes as standard on TOS and does not get replaced, even when you install other versions. (I am a bit lost as to how these PATHs are set up on TOS and there is very little information/documentation to go around.

I got around this by running:

Code: Select all

cp /mnt/md0/appdata/MOD_CONFIG/Nextcloud_okm/php.ini /usr/local/apache24/sys/etc/php.ini

Code: Select all

crontab -u www-data -e
setting:

Code: Select all

*/5  *  *  *  * /usr/local/apache24/sys/bin/php -f /usr/local/Nextcloud_okm/bin/nextcloud/cron.php
and then changing the setting from within Nextcloud from Ajax to cron.

I had to copy the php.ini file from within the Nextcloud folder, as the php command was trying to find a php.ini here:

Code: Select all

/usr/local/apache24/sys/etc/
but there were no php.ini files there.
Don't mess up the apps by manually copying files from nextcloud to apache and so on. Everything is needed is included in the apps itself. Nextcloud_okm has nothing to do with the php version from TOS.
User avatar
outkastm
Gold Member
Posts: 1459
Joined: 29 Dec 2020, 23:52

Re: [ apache24 (PHP 7) ][ 2.4.51.2 ] Web Server

Post by outkastm »

up to 2.4.51.2
User avatar
outkastm
Gold Member
Posts: 1459
Joined: 29 Dec 2020, 23:52

Re: [ apache24 (PHP 7) ][ 2.4.53.0 ] Web Server

Post by outkastm »

up to 2.4.53.0
User avatar
Daywalker
Posts: 35
Joined: 19 Mar 2021, 19:07
France

Re: [ apache24 (PHP 7) ][ 2.4.53.0 ] Web Server

Post by Daywalker »

@outkastm

Hi,

Please update package for TOS5
F5-422
User avatar
outkastm
Gold Member
Posts: 1459
Joined: 29 Dec 2020, 23:52

Re: [ apache24 (PHP 7) ][ 2.4.54.0 ] Web Server

Post by outkastm »

up to 2.4.54.0 and added TOS5 version
Post Reply

Return to “Developer Discussion Room”