I've recently been trying to upload a new web-site (not to replace this, sorry); but when I transferred it from my local development server to my hosting company, it didn't work. This is due to an Apache directive not being set, and erroring if I try and set it.
So, I thought I'd drop a line to my hosting company to see if they could help me. This is the e-mail history (old to newest, their answers in italic):
I seem unable to set this directive in an .htaccess file:
AcceptPathInfo On
If I set it, an Internal Server Error (500) is thrown. I do not seem
to have an error_log, so I am unable to see why this isn't working. I
require this for a PHP script.
Thanks,
Thank you for contacting us.
While we do not want to further bother you, we would like to request
that you provide us more info about the code/directive that you require
in your PHP script. Please let us know what it is for to enable us to
verify if it is supported in our system.
Thank you very much for your assistance on this regard.
If you have any further questions please do not hesitate to contact us.
Hi,
Out of interest, I noticed that the variable 'PATH_INFO' is available when using PHP4, but when I've forced to PHP5, it doesn't work.
I've put an example at: http://www.aligrant.com/test/index.php/example/
$_SERVER['SCRIPT_NAME'] gives me "/test/index.php/example/" and PATH_INFO is not set, so is blank.
I am expecting this result:
Script: /test/index.php
Path Info: /example/
As the actual script is index.php, and the remainder is further information for the script.
According to this:
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server
This can be controlled with this:
http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo
But, I've tried setting the "AcceptPathInfo" directive to On in the .htaccess file, but I then get an Internal Server Error. As I do not have access to the error log, I cannot see why this is causing an error.
Thanks,
Thank you for contacting us.
This is with regards to your query. I would like you to please refer on
this manual and hopefully this will help. I would just like you to be
reminded that scripting would no longer be a part of our support.
http://faq.1and1.com/scripting_languages_supported/php/5.html
http://faq.1and1.com/search/q.php?query=php&x=0&y=0
If you have any further questions please do not hesitate to contact us.
Dear Sirs,
I am not asking for support on how to write a PHP script, this I'm already quite capable of. I am asking why an Apache directive (AcceptPathInfo) is causing Apache to throw error 500. I do not appear to have access to the error_log, so I am unable to ascertain the issue. This error will be thrown whether PHP is involved or not.
Regards,
Thank you for contacting us.
I tried to check your account and you have here a shared Professional
account in which the error log is non accessible. You can only access
the error log if you have a dedicated account.
If you have any further questions please do not hesitate to contact us.
Yes, would you be able to tell me why I am unable to set the AcceptPathInfo directive in an .htaccess file?
Thanks,
Thank you for contacting us.
While the PHP developers have done their utmost to ensure compatibility,
we cannot
guarantee that PHP 4 scripts will function 100% correctly under PHP 5.
Please note that in contrast to PHP 4, the default for the variable
RegisterGlobals
is "off".
By default Apache uses PHP 4 for .php extension. If you don't want to
rename all your
scripts to .php5 you can do the following:
Create a .htaccess file and place the following line AddType x-mapp-php5
.php in it.
This will tell Apache to use PHP 5 instead of PHP 4 for the extension
.php in the
directory the .htaccess is placed and all sub-directories under it.
If you have any further questions please do not hesitate to contact us.
Thank you for your response, but it's really not the PHP I'm having a problem with. It's an Apache directive.
Ignoring all mentions of PHP, as this is a problem whether it's PHP or not. Do you know why I cannot set the "AcceptPathInfo" Apache Directive in an .htaccess file?
Please read this for further information:
http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo