LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Configuring AcceptPathInfo in CenOS 5.3 (https://www.linuxquestions.org/questions/linux-server-73/configuring-acceptpathinfo-in-cenos-5-3-a-734428/)

xshad0wfx 06-20-2009 01:27 PM

Configuring AcceptPathInfo in CenOS 5.3
 
Hi im having trouble finding installation instructions on how to configure/enable/install AcceptPathInfo for apache on a linux distro. Assuming that my default path for my html directory is /var/www/html how would i go about setting up AcceptPathInfo for apache?

jhcaiced 06-21-2009 07:13 AM

Hi,
The AcceptPathInfo directive is part of ApacheCore so you don't need
to install anything else to get it to work.

In CentOS-5, the apache configuration goes into the file
/etc/httpd/conf/httpd.conf in that file you should locate
the section
<Directory /var/www/html>

Inside that section, add the line
AcceptPathInfo On

- Then, restart your apache process and you should be able to use the feature.

xshad0wfx 06-21-2009 10:43 AM

thanks it worked =)

Caesonia 06-23-2009 06:46 PM

Quote:

Originally Posted by jhcaiced (Post 3581239)
Hi,
The AcceptPathInfo directive is part of ApacheCore so you don't need
to install anything else to get it to work.

In CentOS-5, the apache configuration goes into the file
/etc/httpd/conf/httpd.conf in that file you should locate
the section
<Directory /var/www/html>

Inside that section, add the line
AcceptPathInfo On

- Then, restart your apache process and you should be able to use the feature.


Hi, I was reading your post, and I am still a bit confused. I have several virtual servers, and if I understand correctly, I can set AcceptPathInfo individuals for each one using the syntax above.

I have duly set it to On.

Unfortunately, it does NOT seem to be working. For example, once enabled, I should be able to use the php server variable $_SERVER['PATH_INFO']. I never see that variable enabled in the phpinfo file, nor do I seem to be able to echo that variable from a script and get the path, which I should.

Is there another way to verify that the directive is working? I have noticed several complaints on the web about Apache 2 having a bug in this regard with AcceptPathInfo.

Ta bunches.

jhcaiced 06-23-2009 09:56 PM

Hi,
I have do some additional tests and can confirm that the directive
AcceptPathInfo works fine in CentOS-5.3 (httpd-2.2.3-22.el5.centos.1)
the directive can be put in the <Directory> section of a
configuration file or an .htaccess file in the directory.

I also used a small script in PHP to print the $_SERVER["PATH_INFO"]
variable.

Best regards,

Caesonia 06-24-2009 02:22 PM

Quote:

Originally Posted by jhcaiced (Post 3584054)
Hi,
I have do some additional tests and can confirm that the directive
AcceptPathInfo works fine in CentOS-5.3 (httpd-2.2.3-22.el5.centos.1)
the directive can be put in the <Directory> section of a
configuration file or an .htaccess file in the directory.

I also used a small script in PHP to print the $_SERVER["PATH_INFO"]
variable.

Best regards,

Well, would you mid sharing how you tested it? Because so far, it doesn' tseem towrk for me on any of my servers, even when I do what I am supposed to.

My code to test is thus:
php?>

$path = $_SERVER['PATH_INFO'];
echo $path;

?>

I also did a test to see if it were true or not. It failed.

So, it would be really helpful if you would share your code test, or whatever else is going on.

Ta bunches.


All times are GMT -5. The time now is 04:19 AM.