We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Port usage bug | Forum

Juan
Juan Mar 17 '14

When you use alternative ports and hosts you won't be able to use some features because of redirections issues, I tracked the bug from smarty to this function and there is the bug and the solution:


In the file ow_core/requests.php

(LINE 209)

 

        return $requestUrlArray['scheme'] . '://' . $requestUrlArray['host'] . ( empty($requestUrlArray['path']) ? '' : $requestUrlArray['path'] ) .

        ( empty($requestUrlArray['port']) ? '' : ':' . (int) $requestUrlArray['port'] ) . '?' . http_build_query($currentParams) . ( $anchor === null ? '' : '#' . trim($anchor) );

 

The port is after the path (WTF?)

SOLUTION, Replace with:

        return $requestUrlArray['scheme'] . '://' . $requestUrlArray['host'] . ( empty($requestUrlArray['port']) ? '' : ':' . (int) $requestUrlArray['port'] ) . ( empty($requestUrlArray['path']) ? '' : $requestUrlArray['path'] ) . '?' . http_build_query($currentParams) . ( $anchor === null ? '' : '#' . trim($anchor) );

 

I hope to help, nice project.

The Forum post is edited by Juan Mar 17 '14
ross Team
ross Mar 19 '14
Thanks for sharing.