Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7869181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:14:12+00:00 2026-06-03T01:14:12+00:00

I read some other related questions and thought this was the best answer: set_include_path(get_include_path().PATH_SEPARATOR./path/to/program/root);

  • 0

I read some other related questions and thought this was the best answer:

set_include_path(get_include_path().PATH_SEPARATOR."/path/to/program/root");

However, I can’t get it to the right directory and the error messages aren’t helpful enough, so I’m lost. My user area directory (shared host) looks like this:

/home/linweb09/b/example.com-1050560306/user    # <-- this is my root

I was trying to re-organise my program so that all of the model files go in this directory:

{root}/program_name/library/

The web-root folder is this:

{root}/htdocs/

So I changed all of my includes to look like this:

set_include_path(get_include_path().PATH_SEPARATOR
                 ."/home/linweb09/b/example.com-1050360506/user");
require_once "/program_name/library/some_module.php";

The index has to load this include to work, to authenticate the user:

/htdocs/admin/authenticate.php
# index.php
set_include_path(get_include_path().PATH_SEPARATOR
                 ."/home/linweb09/b/example.com-1050360506/user");
require_once "/htdocs/admin/authenticate.php";

And I run into these errors:

[warn] mod_fcgid: stderr: PHP Fatal error:
require_once() [function.require]: Failed opening required ‘/htdocs/admin/authenticate.php’
(include_path=’.:/usr/share/pear:/usr/share/php:/home/linweb09/b/example.com-1050360506/user’)
in /home/linweb09/b/example.com-1050360506/user/htdocs/admin/index.php on line 3

[warn] mod_fcgid: stderr: PHP Warning:
require_once(/htdocs/admin/authenticate.php) [function.require-once]: failed to open stream:
No such file or directory in
/home/linweb09/b/example.com-1050360506/user/htdocs/admin/index.php
on line 3

But it is in the correct location and the error says no such file or directory, so I’m not sure how I’m supposed to configure this.

I also tried these and I got the same errors:

set_include_path(get_include_path().PATH_SEPARATOR."/user");
set_include_path(get_include_path().PATH_SEPARATOR."/");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:14:13+00:00Added an answer on June 3, 2026 at 1:14 am

    Try removing the leading slash. /htdocs/admin/authenticate.php implies that you are working from root /. If you want it to search the include path, you need to use relative paths:

    require_once "program_name/library/some_module.php";
    require_once "htdocs/admin/authenticate.php";
    

    Incidentally, you would only need to set the include path once per script – you dont need the set_include_path() line for every include, just once at the top of the script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read some of the other related questions ( Pattern for wrapping an Asynchronous
I read some of the discussion in this question and thought to myself that
I read all the questions related to this topic, and they all give reasons
I hope this is not a duplicate, I've read a number of related questions
I've read a few related questions regarding this topic however none of them are
Disclaimer: I did check other questions that seemed related, but this one is much
Yes i have been through the other questions that are related to this, but
GLib/GIO offer some great ways to print messages, read files and do some other
i read some wisdom like this : Programmers are encouraged to be careful when
I have read some posts about this topic and the answers are comet, reverse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.