Hacked...Upgraded...and broke my server

Status
Not open for further replies.

CPav

Member
Dec 13, 2017
75
3
8
46
HELP NEEDED!!!
I've been a bit silly, I had an extension hacked...still trying to work out how, but in a panic I tried to run an upgrade/Source files from the GUI, then the GUI died.
Parse error: syntax error, unexpected '?' in /var/www/fusionpbx/resources/classes/message.php on line 57
I rebooted the server, still no GUI, calls are working fine, I just cannot login to my server.

I followed the below in an attempt to fix the gui, steps ran successfully but this did nothing for me.
cp -R /var/www/fusionpbx /var/www/fusionpbx-20200327
cd /var/www/fusionpbx
git fetch origin
git reset --hard origin/master
git pull
chown -R www-data:www-data /var/www/fusionpbx

If I try an upgrade via ssh using the below
php /var/www/fusionpbx/core/upgrade/upgrade.php
I receive the error "PHP Parse error: syntax error, unexpected '?' in /var/www/fusionpbx/core/upgrade/upgrade.php on line 179"
Which is the line "echo $obj->schema($format ?? '');" from the below segment of said file

//upgrade schema and/or data_types
if ($upgrade_type == 'schema') {
//get the database schema put it into an array then compare and update the database as needed.
require_once "resources/classes/schema.php";
$obj = new schema;
if (isset($argv[2]) && $argv[2] == 'data_types') {
$obj->data_types = true;
}
echo $obj->schema($format ?? '');
}


Anything else I can try to revive my servers GUI? It's currently running V5.0.1 and I've also tried running the below with same error code as per the Fusion website instruction:

cd /var/www/fusionpbx
git stash
git pull
git checkout 5.1
git branch
php /var/www/fusionpbx/core/upgrade/upgrade.php
 
Last edited:
Status
Not open for further replies.