🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #232611

php -v pokazuje 5.6 a phpinfo 8.2

#232611
From: Jivanmukta
Date: Fri, 21 Apr 2023 16:46
30 lines
1825 bytes
Mam na moim Ubuntu 22 dwie wersje php: 5.6 i 8.2. Przełączam się między 
nimi skryptami:

set-php5.sh:

stop apache2ctl stop
sudo a2dismod php8.2
sudo a2enmod php5.6
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --set phar /usr/bin/phar5.6
sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.6
sudo update-alternatives --set phpize /usr/bin/phpize5.6
sudo update-alternatives --set php-config /usr/bin/php-config5.6
sudo apache2ctl start

set-php8.sh:

sudo apache2ctl stop
sudo a2dismod php5.6
sudo a2enmod php8.2
sudo update-alternatives --set php /usr/bin/php8.2
sudo update-alternatives --set phar /usr/bin/phar8.2
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.2
sudo update-alternatives --set phpize /usr/bin/phpize8.2
sudo update-alternatives --set php-config /usr/bin/php-config8.2
sudo apache2ctl start

Problem jest taki:
przy wybranym php 8.2 po wywołaniu set-php5.sh polecenie php -v pokazuje 
mi 5.6 a phpinfo nadal 8.2. Dlaczego i co z tym zrobić?
Technical Details
Message-ID: <u1uek9$1n26o$2@portraits.wsisiz.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.2a01:110f:1532:2300:a30:98ef:31c4:438d!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.2a01:110f:1532:2300:a30:98ef:31c4:438d!not-for-mail
From: Jivanmukta <jivanmukta@poczta.onet.pl>
Newsgroups: pl.comp.lang.php
Subject: php -v pokazuje 5.6 a phpinfo 8.2
Date: Fri, 21 Apr 2023 18:46:01 +0200
Organization: http://www.wit.edu.pl
Message-ID: <u1uek9$1n26o$2@portraits.wsisiz.edu.pl>
Mime-Version: 1.0
Injection-Date: Fri, 21 Apr 2023 16:46:01 -0000 (UTC)
Injection-Info: portraits.wsisiz.edu.pl; posting-host="2a01:110f:1532:2300:a30:98ef:31c4:438d"; logging-data="1804504"; mail-complaints-to="abuse@wsisiz.edu.pl"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit