Port Problems

A place for users and developers of the Xataface to discuss and receive support.

Postby roginald » Thu Jun 07, 2007 11:49 am

This isn't a question, more like a statement with a 'Hope this won't break anything' attached. So I have Dataface installed on an OS X server with PHP 5/MySQL5/Apache 1.3-ish. The issue I was having was that every time I would submit a form from within the Database framwework, the port # 16080 was being appended to the url, so I would end up with:

http://www.mysite:16080?index.php?-action=view&-table=mytable

The bad thing was, that in Safari, if I then submitted another form, that port would then be appended again, causing something like:

http://www.mysite:16080:16080?index.php?-action=view&-table=mytable

Which would of course be appended to all of the links on the page, causing them not to work. The problem had something to do with virtual hosts and the fact that (I think) each time you click a link inside Dataface, you redirect to the index page for further internal instruction.

Anyway, to the point. I managed to 'fix' this within Dataface by changing the following line in the 'config.inc.php' file:

if ( !($protocol == 'https' and $port == 443 ) and !($protocol == 'http' and $port == 80) ){
$_SERVER['HOST_URI'] .= ':'.$port;
}


to:

if ( !($protocol == 'https' and $port == 443 ) and !($protocol == 'http' and $port == 80) ){
$_SERVER['HOST_URI'];
}


Not sure if this will help anyone, or if it's a safe thing to do. Just thought I'd put it out there, since it took me a bit to figure it out.
roginald
 
Posts: 24
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Jun 07, 2007 1:55 pm

Hi Roland,

Thanks so much for posting this.Ê I have scratched my head many-a-time working out port issues.Ê This may be something of a bug in dataface...

Can you create a how-to document on this in the how-to section of the site? ... basically repeating what you said in this post here?

Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby roginald » Thu Jun 07, 2007 7:22 pm

Hi Steve,

Posted the how-to. Also will post additional info here.

It turns out that you can also remove this problem by turning off performance caching in Apache. Also, you could of course remove the whole 'if' statement altogether, but again I'm not sure what that might end up affecting in the long run in Dataface.
roginald
 
Posts: 24
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Jun 07, 2007 8:01 pm

Thanks for posting that, Roland.Ê I have published it and added a category for bug fixes and workarounds.

Best regards

Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 24 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved