0

I have a LAMP/WAMP application that runs successfully on nine different machines. A windows PC and multiple centos5, centos6, and centos7 linux servers. They all share a common source tree.

I just installed ubuntu 20.04 on a new machine. When I try to run this application it fails because PHP won't allow relative include(), require(), etc. paths. This is PHP 7.3.24.

This function call and others like it work everywhere else but fail on ubuntu:

include("../include/app_fns.php");

When I recode this with full paths it seems to work, but there are 114 files and 129 instances of these kinds of relative paths I would have to edit. I can do that, but the full path isn't the same on all the machines where this app is installed, so the code would no longer be compatible will all machines. That's unacceptable.

There has to be some way to tell PHP to act like it does everywhere else. I've tried include_path() changes. The changes show up in phpinfo, but they seem to be ignored and the errors persist. Any suggestions? I really want this to work on ubuntu, but I'll have to install centos7 on this machine if I can't solve this problem.

popnowlin
  • 15
  • 4

0 Answers0