It appears to me to be a difference in php's current working directory. The working system has .../project/app/Config as the current directory while the broken system has .../project as the current directory.
One workaround would be to determine the file1.php's current directory and then refer to file.txt with a relative path from there. If I use this in ...
You will need to specify to the maintenance script the path of the LocalSettings.php file. For example:
php maintenance/importImages.php --conf /var/wwwdata/website.org/wiki/LocalSettings.php /tmp/wikiimages .jpg .png .svg
Open the terminal and type:
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.3
php7.3 will be updated automatically when updates become available. Alternatively you can build php7.3 from source in Ubuntu 18.04, but it will not be updated automatically, and it also takes more than an hour to build if you want to test it too.
I have solved the problem by checking for any leftovers of xenial ppa's and removing them. Then I uninstalled libmemcached11 by:
sudo apt-get remove libmemcached11
And than installing libmemcached-dev by:
sudo apt-get install libmemcached-dev
I hope this solution helps somebody..