Open_basedir issue

Something isn’t making sense to me, hoping someone can help…

Strugling to migrate any Wordpress website to my server and get it to work. I susspect it’s a PHP problem but it doesn’t seem to affect any WP site already on the server.

Trying to load a site and get “PHP Warning: file_exists(): open_basedir restriction in effect” in the error log.

I’ve been through all the php.ini files I can find on the whole server and none of them have any restrictions (they’re all set to “open_basedir= none”)

info.php (like the one on a staging subdomain I set up: http://justgivehimahug.com/info.php) shows a restricion on the row “open_basedir” but that’s not what’s in the .ini file.

PHP 8.1.30 - phpinfo() shows the same restriction but that site works fine (it’s been installed on the server for a few years already)

Also, when upgrading the server, I get problems when PHP is upgrading each version:

“php.ini: A new version (/usr/lib/php/8.1/php.ini-production.cli) of configuration file /ect/php/8.1/cli/php.ini is available, but the version installed currently has been locally modified.”

At this point, I get option, mostlty they involve comparing/inspecting the versions but option 1 allows me to overwrite the modified file (1. install the package maintainer’s version"

I chose option 1 and no difference, I run apt upgrade again and when it gets to upgrading PHP, I come across the same “…version installed currently has been locally modified” issue.

Any help would be appreciated.

Check the paths of any named files very carefully. I’ve usually found that there’s a reference to the old location that’s getting picked up. Check for eg in .user.ini and .htaccess.
For eg if you moved a site from
/home/user/web/domain.com/public_html/here.php on the old server to
/home/user2/web/domain.com/public_html/here.php on the new server, you’ll get this error. (ie. different user name changes the path)

Thanks bud, though these sorts of things were the first things I checked.