Incorrect Paths (Mac OS X)

Q: Date/Time this occurred (Provide your time zone also)
**A:13 Feb 2021 10:44a (GMT-5)

Q: DevKinsta Version
**A:Version 1.0.1 (1.0.1.1173)

Q: OS Version
**A:Mac OS X (Catalina) 10.15.7

Q: Docker Desktop Version
**A:3.1.0

Q: Were any error codes or messages observed? If so, what were they?
**A:None

Q: Detailed Description of the Problem
**A:
In my wp-config.php (e.g. DevKinsta/public/sitename/wp-config.php) - I have a php statement - require ‘…/debug.php’ (pointing to the debug.php file in the public folder above)
My site fails - since it can’t find the debug.php
However if I use
require ‘/www/kinsta/public/debug.php’ - it works just fine

I have seen other failures in my php code when I am doing
include ‘vendor/autoload.php’; which has caused all kinds of debuggin issues

Can we get some clarity on what’s assumptions we should be making - but it seems like the “document root” of the site is not getting set as expected.

[2021-01-19 10:07:58.820] [info] Using devkinsta-updates for auto update
[2021-01-19 10:09:47.826] [info] Checking for update
[2021-01-19 10:09:47.835] [info] Generated new staging user ID: dd84b44f-db96-5226-a788-e7a17c3072fa
[2021-01-19 10:09:48.251] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).
[2021-01-31 16:12:00.755] [info] Using devkinsta-updates for auto update
[2021-01-31 16:12:05.904] [info] Checking for update
[2021-01-31 16:12:06.147] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).
[2021-02-03 14:08:06.379] [info] Using devkinsta-updates for auto update
[2021-02-03 14:08:12.461] [info] Checking for update
[2021-02-03 14:08:12.791] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).
[2021-02-04 10:35:35.636] [info] Using devkinsta-updates for auto update
[2021-02-04 10:35:41.556] [info] Checking for update
[2021-02-04 10:35:41.942] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).
[2021-02-11 09:57:39.662] [info] Using devkinsta-updates for auto update
[2021-02-11 09:57:44.686] [info] Checking for update
[2021-02-11 09:57:44.988] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).
[2021-02-11 09:58:34.289] [info] Checking for update
[2021-02-11 09:58:34.418] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).
[2021-02-11 10:00:40.261] [info] Using devkinsta-updates for auto update
[2021-02-11 10:00:45.301] [info] Checking for update
[2021-02-11 10:00:45.547] [info] Update for version 1.0.1 is not available (latest version: 1.0.1, downgrade is disallowed).

Hi Tom,

I’m not able to duplicate this on Windows. I did the same here, I set up a file in my /DevKinsta/public/ directory as test.php and then included it in my /DevKinsta/public/testingsite/wp-config.php as:


However, for me, it worked. It echoed what I had typed.

I’ll ask one of my colleagues running MacOS if they can try to duplicate the behavior on their end and will get back to you.

Hi @onebigidea . Sorry for the wait. I’ve tested on MacOS and it appears to work for me as well. Could you tell us a bit more about where the code is being inserted within your wp-config.php file? Not sure if it was a typo but I noticed you had an extra period . in your require. Could that be it?

Interesting - I have no issues with recreating the bug. Attached are my wp-config and debug files (as .txt instead of .php)
debug.php should be located at /www/kinsta/public/debug.php
Each has a permissions as -rw-r–r-- and www-data:www-data

if you change the require in the wp-config.php to a absolute path - it works fine (breaks with relative path)

debug.txt (367 Bytes) wp-config.txt (2.7 KB)

Just as an interesting observation - if I
echo getcwd(); in wp-config.php
I get " /www/kinsta/public/unboxed/wp-admin"
I am going to check WPEngine to see what the value is there (but I have a guess)

Just an aside - checking on WPEngine - the document root is/should be the Wordpress directory - the same one as wp-config.php - NOT wp-admin

I tested this on a new site and came up with the following:

Here’s what I have:

And within the file itself I have: <?php echo getcwd(); ?>.

It all appeared normal for me on a brand new site. Is the issue appearing on a brand new site or on an existing site? Do you have any configurations that could be changing its path?

Yep - my apologies - it appears to be something my local setup.

If I add getcwd() to index.php in my document root - the value is correct. I am going to do some more debugging to track down the issue.

Once I track it down - I’ll share here in case someone else has similar issues.

1 Like

HI @onebigidea . I’ll be closing this thread here but if you still experience issues, please feel free to create a new post. Thanks again!