links not parsing properly

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

links not parsing properly

Post by Joeydood »

http://presonus.com/faq/index.php%60action=show&cat=14

links are not parsing properly. when you change the '%60' to a '?' then the links work.

i've looked all over for a typo in the config.php and index.php files and couldn't find anything. any help would be appreciated.
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

couldn't edit my original post

Post by Joeydood »

here's the proper link to follow as an example. sorry, i couldn't edit my original post so i replied.

http://presonus.com/faq/index.php?action=show&cat=14
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: links not parsing properly

Post by matteo »

Hi,
Joeydood wrote:http://presonus.com/faq/index.php%60action=show&cat=14

links are not parsing properly. when you change the '%60' to a '?' then the links work.

i've looked all over for a typo in the config.php and index.php files and couldn't find anything. any help would be appreciated.
using %60 instead of ? breaks the search part of your URL being this far from the URL specs.
Have you changed anything in the original PMF code that could be considered as the reason for this unrequested url encoding?

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

Post by Joeydood »

matteo, thanks for replying so quickly!

i have made no changes to the pmf code. although i'm not the only cook in the kitchen as one would say, however, i just talked with the only other person in the company who could have made any changes to the FAQ site and he has not touched it in weeks.

any clues to where this value is stored? if i can get to it i can correct it and it will be fixed. i assume the links are parsed from a global variable somewhere???

i'm not familiar with the layout of your FAQ templates so i really am at a loss on where to look. i did however check config.php and constants.php to see if there was something i could correct before posting here.

any help is appreciated.
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
you need to take a look at [PATH_TO_PMFINSTALL]/index.php, e.g.:

Code: Select all

...
} else {
    $links_template_vars = array(
                "faqHome" => $_SERVER['PHP_SELF'],
				"msgSearch" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=search">'.$PMF_LANG['msgAdvancedSearch'].'</a>',
				"msgAddContent" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=add">'.$PMF_LANG["msgAddContent"].'</a>',
				"msgQuestion" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=ask">'.$PMF_LANG["msgQuestion"].'</a>',
				"msgOpenQuestions" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=open">'.$PMF_LANG["msgOpenQuestions"].'</a>',
				"msgHelp" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=help">'.$PMF_LANG["msgHelp"].'</a>',
				"msgContact" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=contact">'.$PMF_LANG["msgContact"].'</a>',
                "allCategories" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=show">'.$PMF_LANG["msgShowAllCategories"].'</a>',
				"backToHome" => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'">'.$PMF_LANG["msgHome"].'</a>',
				"writeSendAdress" => $_SERVER['PHP_SELF']."?".$sids."action=search",
                'showSitemap' => '<a href="'.$_SERVER['PHP_SELF'].'?'.$sids.'action=sitemap">'.$PMF_LANG['msgSitemap'].'</a>');
}
...
as you can see the ? has been replaced, looking at the HTML source of your site, with `, that is to say the same as this thread.
Really strange, 'cause looking at your HTTP headers, your server is quite different from that of the other thread.
Did your perform any encoding conversion on the PMF pages?

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

Post by Joeydood »

no pmf coding was done.

how do i fix this?
and to a lesser degree, how did this happen??? if nobody (yeah right!) touched it, how does it change on its own???
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

Post by Joeydood »

what's really weird is that on my machine i get a ? replaced by a %60.
on another user's machine the ? is replaced with a '.

so wassup with that? heck i dunno!
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
Joeydood wrote:if nobody (yeah right!) touched it, how does it change on its own???
that's a good question: please look at the index.php file for any changes regarding the question mark. As written in the other thread I currently have no idea about what is causing the issue so we need to discover it with some attempts, hoping to get closer to the reason on each attempt.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
Joeydood wrote:what's really weird is that on my machine i get a ? replaced by a %60.
on another user's machine the ? is replaced with a '.
did you open the file with some editor different from "Notepad"? Are you talking about files on your server or on a local installation on your desktop.
In any case, first, update PMF to 1.6.8 and then we'll try to understand the reason of this encode "scrambling".

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
cweeks
Posts: 3
Joined: Mon Dec 18, 2006 6:41 pm

Missing Question Marks

Post by cweeks »

I am experiencing this problem as well. No one has touched the code in in a while. However, my website is hosted on Yahoo and was wondering if anyone else's site is as well. Often times they change configurations without notifications to the users. I have had no response from them at this time.

Also note that this is not only in the URL string but it is in all of the content that is governed by phpMyFAQ.

Thanks,
Chris
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

Post by Joeydood »

is it possible...

that a spider came across any install scripts and attempted to execute them in a non-interactive manner causing partial install completion which would in turn rewrite files?

just a thought...

i'll look at index.php in the interrim.
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Missing Question Marks

Post by matteo »

Hi Chris,
cweeks wrote:Also note that this is not only in the URL string but it is in all of the content that is governed by phpMyFAQ.
could you send me a PM with the URL of your faq server? I can remotely check if your hoster has made changes on the encoding setting of your server.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
Joeydood wrote:is it possible...

that a spider came across any install scripts and attempted to execute them in a non-interactive manner causing partial install completion which would in turn rewrite files?
a web crawler cannot modify any file on your server while an internal crawler such as a script with grep/awk should access to the files in read mode and never with write access. I hope you're wrong 'cause you'll be in an unsafe box in that case...

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

Post by Joeydood »

is this perhaps a server parsing issue?
if there are isp-level changes, php parsing could be effected. i'll give them a call to find out...
Joeydood
Posts: 43
Joined: Wed Nov 15, 2006 4:18 pm

Post by Joeydood »

and what to look for and where in the index.php file?
Post Reply