"Bad Request"

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

"Bad Request"

Post by anthony.abraira »

I have looked around the forums to see if anybody else is experiencing this issue. But frightenly came up with zero results. I hope there is a way around this little issue.

When I go to the "File" tab and I try to expand one of the folders that I created, to see their contents I get a "BAD REQUEST"

I spoke to my hosting company and this is what they had to say:
Unfortunately brackets [] and | will not work with the Mosso server. If
it ever did work it should not have based on our system setup. I
apologize for the inconvenience.

If you continue to have issues or have any further questions, please
join us in live chat or respond to this email and one of our support
specialists will be more than happy to assist you.
Apparently the pipes in the path such as:

http://threesisters-inn.com/phpwcms.php ... &klapp=2|1

cause an error....help! :cry:
"The trick is living without an answer."
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Looks like that maybe comes from "include/inc_lib/files.private-functions.inc.php":

Code: Select all

		if($count_result = mysql_query($count_sql, $dbcon)) {
			if($count_row = mysql_fetch_row($count_result)) {
				$count = '<img src="img/sp1.gif" width="2" height="1">'.
						 '<a href="'.$zieldatei."&klapp=".$row["f_id"].
						 "|".$klapp_status.'">'.on_off($klapp_status, $dirname, 0)."</a>";
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Post by anthony.abraira »

So can I just go in there and replace the pipe with any symbol that I want to use or what? Not sure I follow :oops:

Code: Select all

if($count_result = mysql_query($count_sql, $dbcon)) { 
         if($count_row = mysql_fetch_row($count_result)) { 
            $count = '<img src="img/sp1.gif" width="2" height="1">'. 
                   '<a href="'.$zieldatei."&klapp=".$row["f_id"]. 
                   "|".$klapp_status.'">'.on_off($klapp_status, $dirname, 0)."</a>";
"The trick is living without an answer."
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

What symbol do i replace it with?

Post by anthony.abraira »

Alright just messing around with the code...i found that if i use the # sign...the error goes away but it also takes the function out of the button. The quesion I have is what symbol can be used to replace the |

Hope we're close to a solution...otherwise I am screwed like the prom queen. :shock:
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Can somebody kill it?

Post by anthony.abraira »

Can somebody just officially shoot this idea down for me? And is anybody else just going through this with their servers, or am I dealing with a bad server setup?

Does anybody else use Mosso?

:?: :?: :?: :?:
Peace

aa
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

have never this Problem on any Server - but if you change this in the Code above, it will not work, you must also change the Code where the Function for expand/contract is done. It's on serval Places in if I remember right in admin.functions.inc.php.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I would change the hosting company. I have never heard of such "non-supported" chars. Ask your provider why they do not support these and limiting your hosting account.

But I will check to send url as urlencoded in coming releases.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Hosting Company: Mosso

Post by anthony.abraira »

:shock: :shock: :shock: :shock:
According to them it has to do with their Load Balancing Software. According to their admins, they haven't been able to work around the problem.

Leaving Mosso, isn't really an option. They are the best deal out there...considering migrating to Mambo...but dreading the new learning curve.

:( :( :( :(
"The trick is living without an answer."
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Would you please try if this is working:

Create a new file pipe.php with following content, put it on your webserver and open it by launching pipe.php in a web browser - click the link and maybe you will see some text...

Code: Select all

<?php

if(isset($_GET['text'])) {
	echo 'The result: '.htmlentities($_GET['text']).'<hr>';
}

echo '<a href="pipe.php?text='.rawurlencode('This is a bracket [] and should be supported and pipes | too.').'">Klick Me</a>';

?>
Send me your result, please.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Results of test

Post by anthony.abraira »

Alright I did as you said and got this page that said "Klick Me." I clicked it and this was the result:
The result: This is a bracket [] and should be supported and pipes | too.
Klick Me
The path after clicking said:

http://twingravity.com/pipe.php?text=Th ... 0%7C%20too.

Awaiting further feedback :?: [/code]
"The trick is living without an answer."
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Ok - then it will help to urlencode the GET values. I will do so for next release. Is a bit more work I think - but maybe it will go faster.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

An ETA?

Post by anthony.abraira »

Any idea on when that could be expected?
"The trick is living without an answer."
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Test release 1.2.8 with all patches available here:
http://www.phpwcms.de/forum/viewtopic.php?p=69745#69745

Hope it solves your problem.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Some fixed some not...

Post by anthony.abraira »

Alright the update does fix some of the problems, but I think there are still a few that are still pending. The following still don't work:

1. Actve & Public buttons still use |
2. Trash icon uses |

Thanks for tackling this issue. 8) [/list]
"The trick is living without an answer."
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

That's correct - but all pipes are urlencoded now. So your problem shouldn't exist anymore as the pipe.php has shown. When it's still a problem then this is not really in my hand because it's no forbidden char and the way I have realized it now is absolutely correct.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Locked