twohoursonelife / OneLifeWeb

Web services used by the game server and client of OneLife, now seperate from the monolith repository.
https://twohoursonelife.com
Other
3 stars 2 forks source link

Photo Server link #3

Closed connorhsm closed 1 year ago

connorhsm commented 2 years ago

This is driving me nuts. I need to fix it later.

I moved $photoServerURL from lineageServer/settings.php to config.php

lineageServer/server.php imports settings.php which imports config.php

In config.php, $photoServerURL is now made with string concatenation to avoid setting the main URL in more than one location. Lineage server absolutely will not have this and fails to use the link properly. But if you set the full URL as one string in linageServer/settings.php, no worries. Grr.

Strohtaler commented 2 years ago

I noted in most all settings.php and in config.php that string concatenation is being done using + (plus) operator - in PHP this is only for addition (numbers), string concatenation is done using . (decimal point) like in:
$photoServerURL = "http://" . $mainSiteDomain . "photoServer/server.php";

connorhsm commented 2 years ago

Thank you! Something silly I should have checked!