Page 1 of 1

PostPosted: Thu Jun 07, 2007 11:49 am
by roginald
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.

PostPosted: Thu Jun 07, 2007 1:55 pm
by shannah

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


PostPosted: Thu Jun 07, 2007 7:22 pm
by roginald
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.

PostPosted: Thu Jun 07, 2007 8:01 pm
by shannah

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

Best regards

Steve