Advertisement:

Author Topic: Wrong URLs on fresh install  (Read 860 times)

Offline ScarletWavez

  • Newbie
  • *
  • Posts: 6
Wrong URLs on fresh install
« on: January 10, 2018, 12:04:50 PM »
Tried this on three servers using 2.0.14 and 2.0.15, got the exact same result (ByetHost free hosting, OVH shared hosting and a DigitalOcean VPS). I noticed that for some reason, the URL defaults to 127.0.0.1/smf paths for some things like the themes directory and have to be manually fixed using repair_settings.php. No auto-installer or such were used. The repair_settings.php file does give the correct path as the recommendation, however by default it is not set, oddly enough.

Could this be looked into?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: Wrong URLs on fresh install
« Reply #1 on: January 10, 2018, 12:29:47 PM »
PHP version? Specifically, running with opcache?

What usually happens is that it gets it right, tries to save, and ends up resaving from cache.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline ScarletWavez

  • Newbie
  • *
  • Posts: 6
Re: Wrong URLs on fresh install
« Reply #2 on: January 10, 2018, 02:18:39 PM »
Tried it on PHP versions 5.6 and 7.1. Not sure if opcache is enabled (is that an Apache or PHP thing?) on the free or shared host, but I didn't run it on the VPS, as far as I know.

Anyway, thanks for your answer about why this happens. ^^

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: Wrong URLs on fresh install
« Reply #3 on: January 10, 2018, 02:32:51 PM »
It's a PHP thing as of PHP 5.5.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline ScarletWavez

  • Newbie
  • *
  • Posts: 6
Re: Wrong URLs on fresh install
« Reply #4 on: January 11, 2018, 05:00:35 AM »
Yes, OPCache is enabled.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: Wrong URLs on fresh install
« Reply #5 on: January 11, 2018, 05:44:35 AM »
That'd be the problem, even though I added a call to clear the cache back when this first started happening, it doesn't seem to be thorough enough :(
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline shawnb61

  • Support Specialist
  • Full Member
  • *
  • Posts: 661
    • sbulen on GitHub
Re: Wrong URLs on fresh install
« Reply #6 on: January 13, 2018, 01:58:26 PM »
FYI, the opcache fix is in 2.1, but not in 2.0.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: Wrong URLs on fresh install
« Reply #7 on: January 13, 2018, 02:19:16 PM »
Weird because I definitely submitted it for... 2.0.6? That sounds about right in terms of timeframe. Should have made it into SVN, though I didn't put it in the changelog, clearly.

It *was* talked about at the time though and I definitely poked around the installer back then.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.