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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:19:36+00:00 2026-06-16T11:19:36+00:00

So people complained about how PHP Scripts using DOCUMENT_ROOT break when Apache is being

  • 0

So people complained about how PHP Scripts using DOCUMENT_ROOT break when Apache is being run with VirtualDocumentRoot and mod_vhost_alias since DOCUMENT_ROOT doesn’t get set properly. Apache evidentally fixed this sometime ago and the brief notes are here:
http://svn.apache.org/viewvc?view=revision&revision=1132494

Sadly, there isn’t enough detail explaining how to actually override the DocumentRoot on a per-request basis. I’m guessing it must be done with mod_rewrite somehow but I’m not certain. Does anyone know how to do this?

  • 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-16T11:19:37+00:00Added an answer on June 16, 2026 at 11:19 am

    Well, evidentally, I wasn’t quite asking the right question. Here’s some information I got directly from Stephan on the Apache2 Bugzilla list:

    Stephan said:

    The bug report was about VirtualDocumentRoot and this now sets
    DOCUMENT_ROOT correctly. Therefore the issue is resolved.

    And I pushed back to clarify:

    Maybe I missed something but I’m pretty certain I tested
    $_SERVER[‘DOCUMENT_ROOT’] in php and it wasn’t matching the value set
    by VirtualDocumentRoot. You’re saying it should match now?

    And he replied:

    Yes, in 2.4.x. It is very unlikely that the fix will ever be ported to
    2.2.x because it requires infrastructure that is only present in 2.4.

    So I ran apache2 -v and discovered I’m not running 2.4.x. Apache2 -v shows this:

    Server version: Apache/2.2.16 (Debian)
    Server built:   Nov 30 2012 08:33:45
    

    And if you notice the Server was built at the end of November this year when I used aptitude -install apache2. I don’t know if apt-get would have pulled apache 2.4 instead. This is very lame. 2.4.3 stable was released in August. I don’t know why aptitude pulled 2.2 but this really created a nightmare for me.

    So in reality, the question I asked was moot. Everything should have worked fine, except that aptitude installed an outdated apache2 and I didn’t realize what was going on. There is no bug anymore.

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

Sidebar

Related Questions

I know people complain usually about scripts not working, but here is a case
I'm using Java to run simple scripts written in JavaScript using the default Rhino
People always talk about how objects created without the new keyword are destroyed when
People are starting to complain about my website speed, that it is slow. I
The more I read about frameworks, the more people seem to complain that they're
For some time now, a few people who have been using my application has
I understand that a lot of people here complain about strcpy, but I haven't
Ok I admit I always see people griping about IE (Internet Explorer xx) and
I hear all this stuff about bazaar being slower than git. I haven't used
People familiar with Homographies will know that you have to normalize it dividing by

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.