Page 1 of 2
how do I get .osp to work
Posted: Wed Jul 02, 2003 4:13 am
by adneg
I finally got thing working php,mysql and apache. unzipped my website which was designed by a website design company and now I am haveing a problem.
The index.php runs this:
<?php header("Location:
http://fletcher.co.uk/site/site.php/hom ... newsession"); ?>
i added this to my http.conf
AddType application/x-httpd-php .php .osp
and still no joy.
I had this working under an earlier version.
Posted: Wed Jul 02, 2003 4:44 am
by cactus
Place a space between the the word "Location" and the : as below:
Code: Select all
<?php header("Location : http://fletcher.co.uk/site/site.php/hom ... newsession"); ?>
Also, did you restart Apache after adding the new file extension ?
Regards,
Posted: Wed Jul 02, 2003 4:51 am
by adneg
I placed a space where you said and that gives me the error the document has no data.
Yes I did stop and start apache.
I am running apache 2.0.44 and php 4.2.3
Posted: Wed Jul 02, 2003 4:58 am
by cactus
I'm a little confused with your header loaction, you seem to be mixing paths and params in the URL, is "/home/index.osp?newsession" a parameter to "site.php" ?
Regards,
Posted: Wed Jul 02, 2003 5:11 am
by adneg
I asked the developer the same question and this was the reply
http://www.fletcher.co.uk/site/site.php
is the script
/home/index.osp?newsession
is the query string - which is a bit unusual, so i can see why
you're puzzled...
If this mean anything to you, I have difficulty understanding the query and why they did it like this.
What I do know is that the php code is being read.
Posted: Wed Jul 02, 2003 5:49 am
by []InTeR[]
cactus wrote:Place a space between the the word "Location" and the : as below:
Code: Select all
<?php header("Location : http://fletcher.co.uk/site/site.php/hom ... newsession"); ?>
There should be no space at all....
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html wrote:14.30 Location
The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.
Location = "Location" ":" absoluteURI
An example is:
Location:
http://www.w3.org/pub/WWW/People.html
Note: The Content-Location header field (section 14.14) differs
from Location in that the Content-Location identifies the original
location of the entity enclosed in the request. It is therefore
possible for a response to contain header fields for both Location
and Content-Location. Also see section 13.10 for cache
requirements of some methods.
Posted: Wed Jul 02, 2003 6:00 am
by cactus
[]InTeR[] wrote:There should be no space at all....
In some older versions of PHP the interpretaion of the "Location" directive was flawed and didn't follow the RFC. Later versions are compliant.
To the OP, what does $_SERVER['REQUEST_URI'] contain, echo this out if you can.
Regards,
Posted: Wed Jul 02, 2003 11:28 am
by adneg
space or no space still have the same problem.
the requested URL /site/site.php/home/index.osp was not found on this server
$_SERVER['REQUEST_URI'] do not understand?
Posted: Wed Jul 02, 2003 12:39 pm
by cactus
The format of the query string isn't too much of an issue, but how its being parsed in "site.php" could be the problem.
Can you post the code of "site.php" and any error messages you are recieving.
Regards,
Posted: Wed Jul 02, 2003 4:57 pm
by phice
In the httpd.conf, do:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .osp
One for each extention.
Posted: Wed Jul 02, 2003 5:13 pm
by volka
you're sure the path is correct?
Posted: Wed Jul 02, 2003 9:41 pm
by phice
volka wrote:you're sure the path is correct?
That's also a good question, because even
http://fletcher.co.uk/ isn't working for me.
Posted: Thu Jul 03, 2003 2:21 am
by cactus
phice wrote:volka wrote:you're sure the path is correct?
That's also a good question, because even
http://fletcher.co.uk/ isn't working for me.
I was able to access that yesterday but now it throws a 404. Have you changed/deleted any files from this domain ?
Regards,
Posted: Thu Jul 03, 2003 5:03 am
by m3mn0n
That path is so wrong.
How can anything.php/home/index/whatever.html work? ever?
Isn't that impossible? I can understand anything.php?path=/home/index/whatever.html but the first way just seems wrong.
Posted: Thu Jul 03, 2003 6:41 am
by volka
if
anything.php is a directory it's handled as usual, no problem here.
It might be a bit confusing but even if anything.php is a script it might be working. Place a script called
anything.phpCode: Select all
<?php
echo $_SERVER['REQUEST_URI'];
?>
in your document root and call and request it as http://<your-server>/anything.php/what/ever/you/like
(only tested with apache/php-module)