Page 1 of 1

Website on LAN connected browser "incomplete", lacking CSS?

PostPosted: 10. August 2020 19:14
by WorstCases
Hello folks.

In the absence of a better known terminology: My testsite shows "incomplete" on machines connected to the XAMPP-server. Is assume, this must be some permissions issue, where the LAN machine can not access certain files?

XAMPP runs on Linux(Ubuntu) as a guest on a Win8.1 host trough VirtualBox.
Network connection between both machines seems to work just fine otherwise.

Without further writing: Please see the attached picture.
Image
https://addpics.com/i/vf5-5-8b3f.jpg
Any ideas?

PS: Don't know, why the picture does not show properly. Did add it like this:
Code: Select all
[img]https://addpics.com/i/vf5-5-8b3f.jpg[/img]

Re: Website on LAN connected browser "incomplete", lacking C

PostPosted: 11. August 2020 08:38
by Nobbie
Its not a rights issue, its wrong configuration. When installing WordPress (what you should have said here!), you provided "localhost" as servername. WordPress builds CSS Links with that Hostname. But localhost is invalid for another PC in your LAN, as it does not point to the Xampp PC (only if you run the browser on the Xampp machine).

You should have provided the LAN IP of the Xampp PC instead. You can delete and install again, or try to fix it and edit wp-config.php and replace "localhot" in the Server URL by the LAN IP (192.168.110.10 or similar).

Re: Website on LAN connected browser "incomplete", lacking C

PostPosted: 11. August 2020 10:43
by WorstCases
Nobbie wrote:Its not a rights issue, its wrong configuration. When installing WordPress (what you should have said here!), you provided "localhost" as servername. WordPress builds CSS Links with that Hostname. But localhost is invalid for another PC in your LAN, as it does not point to the Xampp PC (only if you run the browser on the Xampp machine).[...]

That's very clear. Thank you, and Yes, I should have mentioned that Wordpress in installed.

Nobbie wrote:[...] You can [...]try to fix it and edit wp-config.php and replace "localhot" in the Server URL by the LAN IP (192.168.110.10 or similar).

I could not find such setting in the wp-config.php. I however did find a setting in the database "wp-options", and did replace "localhost" with the IP-Address in:
"siteurl" and "home".

This is working. I don't even recall that WP (during the installation) did ask for a Server-URL.

Two questions remain:
1st: Is changing the database-value an OK approach, or is this potentially causing other issues?
2nd: How would one set this up, if the machine with the XAMPP installation is using DHCP and therefor different IP-Addresses on a regular basis?

Re: Website on LAN connected browser "incomplete", lacking C

PostPosted: 11. August 2020 11:48
by Altrea
WorstCases wrote:1st: Is changing the database-value an OK approach, or is this potentially causing other issues?

Please google for "Wordpress server migration" and you will find many toturials about what to do if you want to run wordpress on a different url

WorstCases wrote:2nd: How would one set this up, if the machine with the XAMPP installation is using DHCP and therefor different IP-Addresses on a regular basis?

Servers should not change their IP address.
But if that is the case, you will commonly map the changing IP adress somehow, by a domain name, or host name or DynDNS. And that static piece of information is the setting wordpress needs to know.

Re: Website on LAN connected browser "incomplete", lacking C

PostPosted: 11. August 2020 15:23
by Nobbie
WorstCases wrote:Two questions remain:


Actually, this is not a WordPress Forum and as you see, my basic WordPress knowledge already seems to be out of date (the siteurl setting obviously has been shifted from wp-config.php to the database, i did not know that). This is a Xampp Forum and we only have very basic knowledge about third party products. You should go for a WordPress Forum or WordPress Support for deeper questions.

Re: Website on LAN connected browser "incomplete", lacking C

PostPosted: 11. August 2020 18:28
by WorstCases
Nobbie wrote:Actually, this is not a WordPress Forum and as you see, my basic WordPress knowledge already seems to be out of date [...]


Yes. Still: You pointing to the "outdated" info did help me to find the current info and with that I could solve my issue.
Thank you!

Since two software products (XAMPP/Wordpress) are working close together, for me as a "not so professional" in this scenario it was difficult to determine where the issue was. At the end it was Wordpress, but from my perspective it could have been an XAMPP/Apache issue in regards to permissions.

At the end I appreciate the support, and am somewhat happy that I did post the issue here, because as far as I see it, chances are good that the XAMPP folks have basic knowledge in regards to CMS, rather than the CMS crowd having knowledge about XAMPP configuration.

Re: Website on LAN connected browser "incomplete", lacking C

PostPosted: 11. August 2020 18:43
by Altrea
WorstCases wrote:as far as I see it, chances are good that the XAMPP folks have basic knowledge in regards to CMS, rather than the CMS crowd having knowledge about XAMPP configuration.

That is a wrong conclusion. There are hundred of thousant of webapplications available all of them with their own requirements, behaviors and issues. XAMPP can just be the base of all of them. We cannot know all of these. So if you have problems with one of them the first spot to ask is the support channel of the specific software itself. The chances to find the answer there is much much higher than the other way around.

If you have electronic problems with your car you wouldn't ask the metal former factory which build its chassis for help, would you? :D