Jump to content
Sign in to follow this  

Legacy code base include issue

Recommended Posts

Posted (edited)

Hi y'all.

I just inherited a legacy system that is in mid-rebuild but needs to be tended until it can be completely phased out and have run into an issue I can't remember how to deal with. The file system is as such:


In the 'm' directory I have many files that use require_once as so:

require_once "m/another_file.php";

The problem is that none of them have a $_SERVER['DOCUMENT_ROOT'] or even a __DIR__ to start the path, so I'm blowing up with errors. I know this code works as it's currently in production, but I can't remember for the life of me what php.ini or .htaccess setting needs to be set to make it viable. My coworker swears he didn't have to do any magic to make it work on his system. Anybody old enough to remember?

Edited by maxxd

Share this post

Link to post
Share on other sites

Apparently the php.ini included in the repo was incorrect and the include_path had to be updated.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.