Jump to content

PATH_TRANSLATED - Apache 2.2 vs. Apache 1.3


lukinagin

Recommended Posts

I'm hoping someone can offer me an explanation for this behavior and a fix if one exists.  I am running a server with Apache 2.2 and PHP 5.2.3 on a Solaris 10 system (UltraSPARC).  PHP is running as an Apache module.  When I bring up a link that contains this code:

 

<html>

<head><title>PHP Test</title></head>

<body>

  <p>If nothing follows this paragraph, PHP is not enabled.</p>

 

  <?php

 

    echo 'PHP Variable Test';

 

        $docroot = $_SERVER['DOCUMENT_ROOT'];

        $filename = $_SERVER['SCRIPT_FILENAME'];

        $pathtrans = $_SERVER['PATH_TRANSLATED'];

        $scriptname = $_SERVER['SCRIPT_NAME'];

 

        echo '<p>Document root= '.$docroot.'</p>';

        echo '<p>Filename= '.$filename.'</p>';

        echo '<p>Path (Pathtrans value) = '.$pathtrans.'</p>';

        echo '<p>Scriptname= '.$scriptname.'</p>';

 

  ?>

 

  <?php phpinfo() ?>

 

</body>

</html>

 

I get no value for the pathtrans variable.  When I run this same script on a system that is running Apache 1.3.39 and PHP 5.2.3, I do get a value for pathtrans.  Both PHP instances use the same php.ini file.

 

Can someone explain why pathtrans is set under A1 but not A2?  What do I need to change to have it set under A2?

 

Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
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.

×
×
  • 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.