View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000287 | Composr | core | public | 2011-10-03 04:13 | 2020-03-22 22:10 |
Reporter | pdg2011 | Assigned To | Chris Graham | ||
Severity | Major-bug | ||||
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0000287: Error after SSL/TLS (HTTPS) Configuration from an https site | ||||
Description | I got this error twice on two separate installations of Composr 7.1.5. What I did was to configure my site name under rebranding as https://nameofmysite.com/portal and turning on https authentication under Configuration->Security and after turning on SSL/TLS (HTTPS) Configuration under Security menu. the error below shows: PHP WARNING [2] parse_url(https:///nameofmysite.com/portal) [<a href='http://www.php.net/manual/en/function.parse-url.php'>function.parse-url.php</a>]: Unable to parse URL in sources/site.php on line 701 (version: 7.1.5, PHP version: 5.2.17, URL: /portal/cms/index.php?page=cms&keep_fatalistic=1) and the stack trace is: File '/home/mysite/var/portal/sources/failure.php' Line '674' Function 'get_html_trace' Args File '/home/mysite/var/portal/sources/global2.php' Line '969' Function '_fatal_exit' Args 'PHP WARNING [2] parse_url(https:///nameofmysite.com/portal) [<a href=\'http://www.php.net/manual/en/function.parse-url.php\'>function.parse-url.php</a>]: Unable to parse URL in sources/site.php on line 701' File '/home/mysite/var/portal/sources/failure.php' Line '214' Function 'fatal_exit' Args 'PHP WARNING [2] parse_url(https:///nameofmysite.com/portal) [<a href=\'http://www.php.net/manual/en/function.parse-url.php\'>function.parse-url.php</a>]: Unable to parse URL in sources/site.php on line 701' File '/home/mysite/var/portal/sources/global2.php' Line '843' Function '_Composr_error_handler' Args 'warning' 2 'parse_url(https:///nameofmysite.com/portal) [<a href=\'http://www.php.net/manual/en/function.parse-url.php\'>function.parse-url.php</a>]: Unable to parse URL' 'sources/site.php' 701 Function 'Composr_error_handler' Args ... File '/home/mysite/var/portal/sources/site.php' Line '701' Function 'parse_url' Args 'https:///nameofmysite.com/portal' File '/home/mysite/var/portal/cms/index.php' Line '50' Function 'do_site' Args Looking over the error messages I noticed that the get_base_url() function seems to be returning 'https:///nameofmysite.com/portal' hence the three slashes. BTW, my site has web-server level based https redirection activated so I'm not sure if this has an effect here as I've read over the help pages of Composr that SSL for Composr is page-based and is not meant to be used for this kind of network as mentioned in http://compo.sr/docs/tut_security.htm | ||||
Tags | No tags attached. | ||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
In sources/global2.php change... substr($base_url,strlen('http://')) to preg_replace('#^\w*://#','',$base_url) -- This bug has happened because you've configured a base URL (when installing, not when debranding) that is https://, but you've also turned on SSL pages and it's making the false assumption it has to convert an http:// URL into an https:// URL. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-03-22 22:10 | Chris Graham | Category | ssl => core |