FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Use PATH_INFO style URLs with url sessions turned on/off not working properly
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11847] Fri, 18 July 2003 17:47 Go to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
Hi all,
My forum is on a server with Apache 1.3.27 and PHP 4.32 gzip enabled and I'm having terrible trouble getting the path_info to work flawlessly.

I followed the steps of creating a new template with the path_info template set and everything kind of works okay on the site. However, there seems to be some sort of problem from time to time where I will click on the reply button or new thread (these in particular) and either an error page will come up saying such and such page doesn't exist or I'll get a botched up page of my sites index page. I currently have it in a subdomain as well, but it didn't work particularly well when I had it somewhere else.

What I find confusing is that sometimes it works and sometimes it doesn't so that I can't reliably leave it on and hope for the best.

Any ideas?

Rob
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11849 is a reply to message #11847] Fri, 18 July 2003 21:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Can you consistently replicate the problem on certain pages or are there specific urls (include in your reply) that cause this problem? The PATH_INFO code is very sensetive to parameter order, if not passed correct it won't show the pages.

FUDforum Core Developer
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11850 is a reply to message #11847] Fri, 18 July 2003 21:53 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
Hi protoss,
I've quickly setup path_info on the site http://bbclone.topfunwebsites.com

e.g.
on the page http://bbclone.topfunwebsites.com/index.php/t/139/3/
when I click reply, it tries to go to this page:
http://www.topfunwebsites.com/index.php/r/th_id/139/338/0/3/

and doesn't, it goes to a non CSS version of my front page.

Clicking new topic doesn't seem to cause a problem.

I've just checked and it seems to be on every reply that its doing it wrong.

I've just tried it with admin and normal member registrations and there's absolutely no difference.

Any suggestions?
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11852 is a reply to message #11847] Fri, 18 July 2003 22:06 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
More problems seem to occur in the profile when you try to go try to go back to default after being in the path_info template. It takes the change, but it sends you to a non-existent page.

Rob
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11853 is a reply to message #11850] Fri, 18 July 2003 22:13 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I went to the page you've showed and checked the reply link. In my case (anon user) I get a link to:
http://bbclone.topfunwebsites.com/index.php/r/reply_to/338/0/
When clicked, it takes me to the reply form.

I took the opportunity to browse to a few other forums on your site and still was unable to find the faulty links. Are you using >1 active path_info theme?

Quote:


More problems seem to occur in the profile when you try to go try to go back to default after being in the path_info template. It takes the change, but it sends you to a non-existent page.


What do you mean going back to the default?


FUDforum Core Developer
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11854 is a reply to message #11847] Fri, 18 July 2003 22:22 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
I'm really confused Confused

I tried the link that you gave me and it works just fine. I tried going to my site logged out and going to the same thread and replying and guess what?, it gives me the http://bbclone.topfunwebsites.com/index.php/r/th_id/139/338//0/0/ and still doesn't work.

AHH!!! Spotted it! In the "small" reply buttons that are available, the http://bbclone.topfunwebsites.com/index.php/r/reply_to/340/0/ is what appears and that works fine.

However, the "post reply" buttons at the top and bottom do not work at all. They give the link at the top.

Rob
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11856 is a reply to message #11854] Fri, 18 July 2003 23:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm... while I definately see the problem on your forum the 'big' reply link works fine on my test forum using path_info. Quite frankly I am at odds

I analyzed with ethereal the request that are sent and got a very weird situation:

1) GET /index.php/r/th_id/226/792//0/0/ HTTP/1.1
2) HTTP/1.1 302 Found
Location: http://www.topfunwebsites.com/index.php/r/th_id/226/792/0/0/

Now as you can see the problem lies in the fact that the subdomain is lost in the redirect resulting in a rather bogus page, which is what you end up seeing. I suspect the culprit of the 'bogus' redirect is Apache, which tries to eliminate the //. But in the process loses the sub-domain.
I've confirmed this behaviour by chaning
http://bbclone.topfunwebsites.com/index.php/r/th_id/226/792//0/0/
to:
http://bbclone.topfunwebsites.com/index.php/r/th_id/226/792/0/0/0/
which works.

It appears I need to avoid usage of // since it stubmles on an apache bug. Which version of Apache server are you using?


FUDforum Core Developer
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11858 is a reply to message #11847] Fri, 18 July 2003 23:40 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
1.3.27 as I said in my first post.

Rob
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11861 is a reply to message #11858] Fri, 18 July 2003 23:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, unless you have some Apache miscofiguration, let me congratulate you on finding Apache webserver bug. Feel free to report it to the Apache developers. Meanwhile it looks like I'll need to modify path_info templates not to use // to avoid this sort of a problem.

FUDforum Core Developer
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11862 is a reply to message #11847] Fri, 18 July 2003 23:55 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
I'm not sure if I should feel happy or not for finding an Apache webserver bug, but I don't feel overly confident on submitting it. What should I send to my hosts forum to see if they can figure out if there is an Apache misconfiguration?

Rob
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #11863 is a reply to message #11862] Sat, 19 July 2003 00:28 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Just show them the page which results in a bogus redirect and if they claim it is your fault, demonstrate the faulty redirect using telnet or give them a log of a packet tracing utility such as ethereal.

FUDforum Core Developer
Apache 1.3.28 [message #11864 is a reply to message #11847] Sat, 19 July 2003 00:33 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
Apache 1.3.28
Just to let you know that the new Apache version is out Apache 1.3.28

See here for security changes, new additions and fixed bugs:

http://www.apache.org/dist/httpd/Announcement.html

Let me know if there is anything in this, that would affect what I may have just found.

Rob
(off to bed)
Re: Apache 1.3.28 [message #11865 is a reply to message #11864] Sat, 19 July 2003 00:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This could potentially be the result of the mod_rewrite bug that is supposedly fixed. But you would only be affected if you were using mod_rewrite.

FUDforum Core Developer
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #12331 is a reply to message #11847] Mon, 04 August 2003 22:11 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
I mentioned the bug to a knowledgable friend and he pointed me to this: http://bugs.php.net/bug.php?id=23610

Oh and I've upgraded to 2.5.2 and I'm still getting problems when a guest tries to register etc with path_info turned on etcetc.

Rob
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #12334 is a reply to message #12331] Mon, 04 August 2003 23:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The bug you've mentioned has nothing to do with your problem. The error occurs on apache level before it even reaches PHP.

FUDforum Core Developer
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #12335 is a reply to message #12334] Tue, 05 August 2003 00:26 Go to previous messageGo to next message
jrobbio is currently offline  jrobbio   United Kingdom
Messages: 32
Registered: June 2003
Karma: 0
Member
prottoss wrote on Tue, 05 August 2003 00:40

The bug you've mentioned has nothing to do with your problem. The error occurs on apache level before it even reaches PHP.


Okay just checking Embarassed
Re: Use PATH_INFO style URLs with url sessions turned on/off not working properly [message #12336 is a reply to message #12335] Tue, 05 August 2003 00:41 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
jrobbio wrote on Mon, 04 August 2003 20:26

prottoss wrote on Tue, 05 August 2003 00:40

The bug you've mentioned has nothing to do with your problem. The error occurs on apache level before it even reaches PHP.


Okay just checking Embarassed


Like I said before the problem is quite simple, although the solution probably is not. The problem is that the apache looses the host when it resolves a url with multiple //. Solving that problem would make the bug go away.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: a another bug when your are in flat view
Next Topic: Very long urls when using path_info on fud 2.5.2
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 20:01:49 GMT 2024

Total time taken to generate the page: 0.02127 seconds