"The php definitely seems to be 7.x although the php script didn't work and neither did the php -v (or php --version)"
would concern me ... ie, worry!
PHP really has two parts ... the php used by the web service and the php-cli used by anything command line. It's significant due to cron job for Moodle which should be using php-cli. If the cron job/task of Moodle isn't running as it should, expect troubles.
Same is true of the CLI only scripts in moodlecode/admin/cli/ and what you attempted to use ... the 'reset_password.php' script.
Encourage you to ssh into server and su to root or sudo -s to root, then issue:
which php [ENTER]
That command tells you what 'php' it will use when using cli in cron for example: /usr/bin/php blah/reset/of/cron/command.
If it shows /usr/bin/php (might show more), test if it's PHP-CLI by using full path to it then a -v for version.
Example from a CentOS 7 box: Linux server 3.10.0-957.21.3.el7.x86_64
[root@server ~]# which php
Then issue -v using the path you see:
[root@server ~]# /usr/bin/php -v
PHP 7.1.30 (cli) (built: Jun 2 2019 08:03:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.30, Copyright (c) 1999-2018, by Zend Technologies
See the PHP 7.1.30 (cli) above? 'cli indicates command line - which is good and working the way it should work.
On your server, run the cron job for moodle manually.
[root@server cli]# php cron.php
Does it execute? IF not, your server will have issues.
On CentOS 7 one has to use a 3rd party repo ... not CentOS 7's base/updates/etc to get higher versions of PHP installed.
On servers I admin I use webtactic for such. webtactic has php versions above that of CentOS's
[root@sos cli]# yum list php71*
will show (clips below):
Installed Packages and all the php extensions installed ... including:
php71w-cli.x86_64 7.1.30-1.w7 @webtatic
You probably need to talk to the server OS admin person about repos and php-cli for your server.