error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

A category for tips and tricks or off-topic things
Post Reply
fchiodin
Posts: 9
Joined: Tue Oct 01, 2013 10:16 pm

error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by fchiodin » Mon Mar 23, 2020 3:29 pm

Hi,
upgrade the system ubunt to 18.04, the problem is the start admin page, contain the php, and the index page contail the code:

1) { $selectinvt = 0; $strto = 1; $upto = $NUMINV; } else { $selectinvt = 1; $strto = 1; $upto = 1; } } echo '
"; if ($selectinvt == 0) { echo "$lgPOWERPLANT"; } else { echo "${'INVNAME'.$selectinvt}"; } echo "

where is the problem?

thank
Francesco

jeanmarc
Posts: 2022
Joined: Thu Aug 29, 2013 7:16 am

Re: error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by jeanmarc » Mon Mar 23, 2020 4:04 pm

My guess is that php dosen't run :lol:
systemctl status php-fpm

fchiodin
Posts: 9
Joined: Tue Oct 01, 2013 10:16 pm

Re: error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by fchiodin » Mon Mar 23, 2020 5:18 pm

jeanmarc wrote:
Mon Mar 23, 2020 4:04 pm
My guess is that php dosen't run :lol:
systemctl status php-fpm

thanks, very veru much.

php is already installed, eg apt install php-fpm

command result:
root@francesco-desktop:/var/www/html/config# systemctl status php7.2-fpm
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-03-23 17:13:54 CET; 3s ago
Docs: man:php-fpm7.2(8)
Main PID: 6605 (php-fpm7.2)
Status: "Ready to handle connections"
Tasks: 3 (limit: 2092)
CGroup: /system.slice/php7.2-fpm.service
├─6605 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
├─6606 php-fpm: pool www
└─6607 php-fpm: pool www

the admin page view the login and the plain code:

"; } elseif (!file_exists('../config/.htpasswd') && !isset($_SERVER["PHP_AUTH_USER"]) && !empty($_POST['login']) && !empty($_POST['newpwd'])) { $pw_file = '../config/.htpasswd'; $login = trim($_POST['login']); $newpwd = trim($_POST['newpwd']); $password = crypt($newpwd, base64_encode($newpwd)); $pw_line = "$login:$password\n"; $pf = fopen($pw_file, "w"); fwrite($pf, $pw_line); fclose($pf); $doc_dir = dirname(dirname(__FILE__)); $acc_file = '../config/.htaccess'; $af = fopen($acc_file, "w"); $new_acc = "AuthUserFile $doc_dir/config/.htpasswd\n"; $new_acc .= "AuthGroupFile /dev/null\n"; $new_acc .= "AuthName \"123solar Password Protected Area\"\n"; $new_acc .= "AuthType Basic\n"; $new_acc .= "require valid-user\n"; fwrite($af, $new_acc); fclose($af); echo "
Password is saved for the $login user, don't forget it

fchiodin
Posts: 9
Joined: Tue Oct 01, 2013 10:16 pm

Re: error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by fchiodin » Mon Mar 23, 2020 5:21 pm

jeanmarc wrote:
Mon Mar 23, 2020 4:04 pm
My guess is that php dosen't run :lol:
systemctl status php-fpm
the php version is
root@francesco-desktop:/var/www/html/config# php -v
PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies

fchiodin
Posts: 9
Joined: Tue Oct 01, 2013 10:16 pm

Re: error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by fchiodin » Mon Mar 23, 2020 6:35 pm

jeanmarc wrote:
Mon Mar 23, 2020 4:04 pm
My guess is that php dosen't run :lol:
systemctl status php-fpm
Resolved thanks, incorrect configuration module php 7.2

Bye Francesco

jeanmarc
Posts: 2022
Joined: Thu Aug 29, 2013 7:16 am

Re: error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by jeanmarc » Mon Mar 23, 2020 6:38 pm

So you have a misconfiguration with your web server as it can't interpret php.
Make a new test.php

Code: Select all

<?php
phpinfo();
?>
Edit: All ok then :D

fchiodin
Posts: 9
Joined: Tue Oct 01, 2013 10:16 pm

Re: error upgrade 1.6 to 1.8 ubuntu lts 16->18.04

Post by fchiodin » Mon Mar 23, 2020 6:40 pm

jeanmarc wrote:
Mon Mar 23, 2020 6:38 pm
So you have a misconfiguration with your web server as it can't interpret php.
Make a new test.php

Code: Select all

<?php
phpinfo();
?>
ok thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest