./configure --prefix /opt/php7 --with-curl --enable-exif --enable-ftp --enable-gd --with-gettext --enable-mbstring --with-mysqli --enable-mysqlnd --with-openssl --enable-phpdbg-webhelper --enable-sockets --enable-sysvsem --enable-sysvshm -with-zlib --with-apxs2 --with-mysql-sock
urpmi apache-devel
tar xfz php-7.4.16.tar.gz
As root: $ mkdir -m 755 /opt/php7
./configure --prefix /opt/php7 --with-config-file-scan-dir=/etc/php.d --with-curl --enable-exif --enable-ftp --enable-gd --with-gettext --enable-mbstring --with-mysqli --enable-mysqlnd --with-openssl --enable-phpdbg-webhelper --enable-sockets --enable-sysvsem --enable-sysvshm -with-zlib --with-apxs2 --with-mysql-sock --with-pear
$ urpmq --list | grep -i xml2 | grep -i devel
lib64tinyxml2-devel
lib64tinyxml2-devel
lib64xml2-devel
lib64xml2-devel
$ urpmi lib64xml2-devel
make
make install
cp libs/libphp7.so /opt/php7/lib/php/extensions/libphp7.so
mkdir -m 775 /var/lib/php; chown apache:apache /var/lib/php
cd /opt/php7/lib; ln -s /etc/php.ini .
ln -s /opt/php7/lib/php/extensions/libphp7.so /usr/lib64/httpd/modules/mod_php.so
include_path = ".:/usr/lib64/php/:/usr/share/pear/:/usr/share/php/:/opt/php7:/opt/php7/lib/php:/opt/php7/include/php"
extension_dir = "/usr/lib64/php/extensions:/opt/php7/lib/php/extensions"
LoadModule php7_module modules/mod_php.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php index.phtml
<IfModule !mod_php.c>
to
<IfModule !mod_php7.c>
$ make install
Installing PHP SAPI module: apache2handler
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp7.la /usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install install libphp7.la /usr/lib64/httpd/modules/
libtool: install: install .libs/libphp7.so /usr/lib64/httpd/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /usr/lib64/httpd/modules/libphp7.la
libtool: warning: remember to run 'libtool --finish /home/moi/MPI/PHP-7/php-7.4.16/libs'
chmod 755 /usr/lib64/httpd/modules/libphp7.so
apxs:Error: Activation failed for custom /etc/httpd/conf/httpd.conf file..
apxs:Error: At least one `LoadModule' directive already has to exist..
make: *** [Makefile:156 : install-sapi] Erreur 1
LoadModule php7_module modules/mod_php.so
# php -v
bash: php : commande introuvable
# php7 -v
bash: php7 : commande introuvable
# make install
/bin/sh /home/moi/MPI/PHP-7/php-7.4.16/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /home/moi/MPI/PHP-7/php-7.4.16/modules
Installing PHP SAPI module: apache2handler
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp7.la /usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install install libphp7.la /usr/lib64/httpd/modules/
libtool: install: install .libs/libphp7.so /usr/lib64/httpd/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /usr/lib64/httpd/modules/libphp7.la
libtool: warning: remember to run 'libtool --finish /home/moi/MPI/PHP-7/php-7.4.16/libs'
chmod 755 /usr/lib64/httpd/modules/libphp7.so
[activating module `php7' in /etc/httpd/conf/httpd.conf]
Installing shared extensions: /opt/php7/lib/php/extensions/no-debug-non-zts-20190902/
Installing PHP CLI binary: /opt/php7/bin/
Installing PHP CLI man page: /opt/php7/php/man/man1/
Installing phpdbg binary: /opt/php7/bin/
Installing phpdbg man page: /opt/php7/php/man/man1/
Installing PHP CGI binary: /opt/php7/bin/
Installing PHP CGI man page: /opt/php7/php/man/man1/
Installing build environment: /opt/php7/lib/php/build/
Installing header files: /opt/php7/include/php/
Installing helper programs: /opt/php7/bin/
program: phpize
program: php-config
Installing man pages: /opt/php7/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /opt/php7/lib/php/
[PEAR] Archive_Tar - already installed: 1.4.9
[PEAR] Console_Getopt - already installed: 1.4.3
[PEAR] Structures_Graph- already installed: 1.1.1
[PEAR] XML_Util - already installed: 1.4.5
[PEAR] PEAR - already installed: 1.10.12
Warning! a PEAR user config file already exists from a previous PEAR installation at '/root/.pearrc'. You may probably want to remove it.
Wrote PEAR system config file at: /opt/php7/etc/pear.conf
You may want to add: /opt/php7/lib/php to your php.ini include_path
/home/moi/MPI/PHP-7/php-7.4.16/build/shtool install -c ext/phar/phar.phar /opt/php7/bin/phar.phar
ln -s -f phar.phar /opt/php7/bin/phar
Installing PDO headers: /opt/php7/include/php/ext/pdo/
Cled wrote:3) Unfortunately, PHP still doesn't work:
- Code: Select all
# php -v
bash: php : commande introuvable
# php7 -v
bash: php7 : commande introuvable
could not find driver
Fatal error: Uncaught Error: Call to a member function setAttribute() on null in /var/www/html/my-website/public/index.php:43 Stack trace: #0 /var/www/html/my-website/vendor/pimple/pimple/src/Pimple/Container.php(118): {closure}() #1 /var/www/html/my-website/public/controllers/PageController.php(6): Pimple\Container->offsetGet() #2 /var/www/html/my-website/public/index.php(107): require_once('/var/www/html/m...') #3 {main} thrown in /var/www/html/my-website/public/index.php on line 43
filip wrote:@rtl19
Yeah. RPI are really nice. I'll try to create some docs for install and use.
cd /var/www/html/nextcloud
php updater/updater.phar
extcloud Updater - version: v20.0.0beta4-11-g68fa0d4
Current version is 20.0.10.
Update to Nextcloud 20.0.11 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-20.0.11.zip
Open changelog ↗
Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done
Start update? [y/N] y
Info: Gracefully stopping the updater via Ctrl-C is not possible - PCNTL extension is not loaded.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[ ] Extracting ...PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found
-sh-5.1$ php updater/updater.phar
Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4
Current version is 20.0.10.
Update to Nextcloud 20.0.11 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-20.0.11.zip
Open changelog ↗
Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done
Start update? [y/N] y
Info: Gracefully stopping the updater via Ctrl-C is not possible - PCNTL extension is not loaded.
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done
Update of code successful.
Should the "occ upgrade" command be executed? [Y/n] y
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:72
Stack trace:
#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1449): OC\DB\Connection->connect()
#1 /var/www/html/....
./configure --prefix /opt/php7 --with-config-file-scan-dir=/etc/php.d --with-curl --enable-exif --enable-ftp --enable-gd --with-gettext --enable-mbstring --with-mysqli --enable-mysqlnd --with-openssl --enable-phpdbg-webhelper --enable-sockets --enable-sysvsem --enable-sysvshm -with-zlib --with-apxs2 --with-mysql-sock --with-pear --with-zip --with-pdo-mysql
./occ upgrade
Should the "occ upgrade" command be executed? [Y/n]
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\Redis not available for distributed cache (Is the matching PHP module installed and enabled?)
Keep maintenance mode active? [y/N] y
Maintenance mode kept active
Update successful
Maintenance mode is kept active
Resetting log level
systemctl restart httpd.service
./occ maintenance:mode --off
artee wrote:Okay, I managed to fix things. It was quite a journey, finding out things that I had no knowledge of before, and no real interest of learning to be honest...
I then undid all modifications, and used urpmi to install php8 once again, plus all other packages that were deinstalled when I deinstalled it.
Return to The magician suggests...
Users browsing this forum: No registered users and 1 guest