Don't know if there's an existing topic I'm better off merging this into, but...
I've been following the instructions in
Web/README.md and setting up a TM mirror on a CentOS system. There are some kinks to iron out; I'm still learning as I go.
A few observations & questions:• From
Web/README.md:
This [lib/tm.conf] file needs to be readable by the web server but should not be served by the web server. Configure Apache to ensure this.
How do I do this exactly? I tried something in httpd.conf, and I believe I even restarted httpd; no luck.
• Updates on the updates page are still sorted by date, but in a different order within: the two CZE II603 entries from 2019-06-24 are swapped, as are the two WV WV817 entries from 2019-04-21. Appears deterministic on each site; reloading does not change it. On each server, one pair of entries is kept in CSV order, and the other swapped.
Not a deal-breaker by any means, just something odd I noticed.• Forum links: lib/tmheader.php links to "/forum", while index.php links to "
http://forum.travelmapping.net"
• From devel/tools.php contains a hard link to "
http://travelmapping.net/wptedit/", rather than a link relative to the
DocumentRoot directory.
• graphs/index.php is broken -- below the "Filter by graph type" dropdown, I get:
\n"; mysqli_report(MYSQLI_REPORT_STRICT); try { $tmdb = new mysqli($tmdbhost, $tmdbuser, $tmdbpasswd, $tmdbname); } catch ( Exception $e ) { //echoecho "
Failed to connect to database ".$tmdbname." on ".$tmdbhost." Please try again later.
"; exit; } $result = $tmdb->query("SELECT * FROM graphs ORDER BY descr, format"); $counter = 0; $prevRow; while ($counter < $result->num_rows) { // get three entries: collapsed, simple, then traveled for each $crow = $result->fetch_assoc(); $srow = $result->fetch_assoc(); $trow = $result->fetch_assoc(); $counter += 3; if ($crow == NULL || $srow == NULL || $trow == NULL) { // should produce some kind of error message continue; } // build table row (was: class=collapsed) echo "\n"; echo "\n"; echo "\n"; } $values = array(); $descr = array(); $result = $tmdb->query("SELECT * FROM graphTypes"); while ($row = $result->fetch_array()) { array_push($values, $row[0]); array_push($descr, $row[1]); } ?>
I'm still too new to sql & php, and how to configure it for TM, to know what's going on here.
• Other than that, the DB seems to be working. I was able to query a few of the tables, and what I saw made sense. stat.php, user/index.php, user/mapview.php, user/region.php, and user/system.php all look good.
• README.md does not cover what we need to do to get leaflet working. I was flying blind but tried to fly fast, and didn't do much research.
Initially, none of the maps worked. Then, just to make sure I have everything in place, I copied the /leaflet/ directory from noreaster. I don't know if there's anything specific to Jim's instance of leaflet I shouldn't be copying, any keys/tokens or anything (nothing immediately obvious from the contents); Jim, let me know if I shouldn't be doing that! FWIW, this isn't a public server; it's only visible to a few whitelisted IPs.
In any case, where's the proper place to find these files for someone setting up an instance of a TM server?After copying /leaflet/, I got the aforementioned maps to work. Those in the HB still don't. Additionally copying the /leaflet-1.5.1/ directory didn't help.
Not sure what's going on here; my first thought is that it may be related to the recent
Leaflet version upgrade, and maybe some changes to the production server haven't made it back to the Web repo yet. I'll nose around lab2 & noreaster, have a look at various .php & .js files, and see if any filesizes differ...
• Ingesting the .sql file took a bit over an hour on my machine. I don't understand why; my CPU use meters were all barely above 0% during the process. If disk access were the bottleneck here, it should have only taken ~20s to read the file... Jim, is this also your experience?
It rather dwarfs the time spent running the siteupdate progam itself. I wonder whether playing around with
these values here would have an effect on performance...