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
https://forums.phpfreaks.com/topic/79279-path_translated-apache-22-vs-apache-13/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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