Issues with Loading Site

Started by cryptodan, March 20, 2019, 02:20:10 PM

Previous topic - Next topic

cryptodan

I just installed SMF freshly onto a test instance, and the following happens:

http://127.0.0.1/forums/Themes/core/images/smflogo.gif is the correct path however the following path is being listed

http://127.0.0.1/smf/Themes/core/images/smflogo.gif in the index.php vi http://localhost/forums so where is it getting the smf from?




Illori


cryptodan

Why did I have to do that on a fresh install?

lurkalot

Quote from: cryptodan on March 20, 2019, 02:35:48 PM
Why did I have to do that on a fresh install?

Dunno,  ???  But just to check I've done a fresh local install and it's fine for me. 

cryptodan

But I appreciate the fast advice and fix.  You are awesome

Arantor

Quote from: cryptodan on March 20, 2019, 02:35:48 PM
Why did I have to do that on a fresh install?

Because the installer has a bug where it ends up saving the wrong settings. It will work cleanly on most local installers because the likes of WampServer don't install ZendOpcache which will be in production servers.

I did fix this years ago but for reasons it ended up getting removed from the installer build.

lurkalot

Quote from: Arantor on March 20, 2019, 02:51:25 PM
Quote from: cryptodan on March 20, 2019, 02:35:48 PM
Why did I have to do that on a fresh install?

Because the installer has a bug where it ends up saving the wrong settings. It will work cleanly on most local installers because the likes of WampServer don't install ZendOpcache which will be in production servers.

I did fix this years ago but for reasons it ended up getting removed from the installer build.

Ooh thanks for that info.  I'm using XAMPP, so that must mean it has ZendOpcache enabled as standard.

Arantor

No, the issue is when opcache is enabled. It is disabled by default on all of the development environments, including XAMPP.

The issue is that Settings.php gets cached, it's subsequently written during installation and for reasons ends up re-saving the cached version. Since XAMPP etc don't cache it, it doesn't save the wrong data but if opcache is enabled, it will save the wrong data.

lurkalot

Quote from: Arantor on March 20, 2019, 04:12:30 PM
No, the issue is when opcache is enabled. It is disabled by default on all of the development environments, including XAMPP.

The issue is that Settings.php gets cached, it's subsequently written during installation and for reasons ends up re-saving the cached version. Since XAMPP etc don't cache it, it doesn't save the wrong data but if opcache is enabled, it will save the wrong data.

That makes sense now.  I did read some older info about this on XAMPP and noticed people were asking how to enable it, then thought Oh, perhaps it's enabled by default in the newer versions.  So basically I got this all completely AAF.

Thanks for putting me straight, and teaching me something. ;)

Advertisement: