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 4091478
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:22:19+00:00 2026-05-20T19:22:19+00:00

I have a script called ‘sess-start.php’ which lies in an /include directory within my

  • 0

I have a script called ‘sess-start.php’ which lies in an /include directory within my httpdocs directory.

My site continues to give this error:\

[Fri Mar 25 14:52:24 2011] [error]
[client 12.3.3.3] PHP Fatal error:
require() [function.require]:
Failed opening required
‘/includes/sess-start.php’
(include_path=’.:’) in
/var/www/vhosts/site.com/httpdocs/page.php
on line 4, referer:
https://www.site.com/

even though http://www.site.com/includes DOES exist. What gives!

Edit 1

These are includes/requires which may themselves contain additional require or include statements. Relative paths WILL NOT WORK so please do not suggest such.

My .htaccess file already points all include paths to the site root directory:

php_value include_path
.:/var/www/vhosts/site.com/httpdocs

Edit 2

Not all of my include or required scripts are contained with a single directory so suggesting to simply place the /includes directory in the include_path is negated as well (and in turn also causes problems on a windows machine)

Update

Perhaps some clarification on a real-life example may help to resolve the issue our team is trying to solve for:

On one page, a user may enter a number of options, the following page makes its necessary calculations and based on that will route the customer in a number of potential options, all which lead to require statements for something like a DB entry.

Then, within the db entry (or some other action) if everything goes smoothly, the member may have chosen before to receive an email confirmation based on his/her action. This require statement lies within the 2nd require (db insert) but is in a different directory than the second and thus causing conflict given the first file treats the linking incorrectly.

Hard coding the absolute path or even setting the appropriate include path per page is ‘ok’ but then it disables our team’s ability to hotlink between files with dreamweaver (or any other program that does the same) because it does not recognize a ‘site root’ when running in a test environment.

  • 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-05-20T19:22:20+00:00Added an answer on May 20, 2026 at 7:22 pm

    Your path is preceded by a forward slash (/).

    In a POSIX compliant system, if you have a path that starts with a forward slash, it means that it is an absolute path. The first forward slash represents the root of the filesystem.

    Remove the forward slash from your path and you should then have a path that is relative to page.php.

    EDIT: Since relative paths won’t work, you can use dirname(__FILE__) to get the absolute path of the directory where the current file resides.

    require(dirname(__FILE__) . '/includes/sess-start.php');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two SQL scripts which get called within a loop that accept a
I have script called Script.php and tests for it in Tests/Script.php, but when I
I have a script called api.php on my server. I call it from other
I have a script which contacts a few sources and tell them the IP-address
...with right path. For example. I have script called foo.js. I'd like to insert
I have this script called test.sh: #!/bin/bash STR = Hello World echo $STR when
I have a python script called mythicalPythonBindings.py. It outputs something like Establishing database connection
I have a script that runs on the command line, called by a crontab.
anyone have script or procedures to install SQL Server 2008 Express, set up the
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example),

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.