11<?php
2+ //ini_set("session.gc_maxlifetime", 86400);
3+ // set this in php ini
24// $Id$
35define('__ROOT__', dirname(__FILE__). "/");
46require_once(__ROOT__."vendor/autoload.php");
@@ -10,28 +12,28 @@ require_once(__ROOT__."lib/phpwee-php-minifier/phpwee.php");
1012$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://";
1113$out_root = "/srv/www/htdocs/map/out";
1214// tmpdir for backend_make
13- $out_root_tmp = "/home/nas /twmapcache/tmp/out";
14- $out_html_root = "/map/ out";
15+ $out_root_tmp = "/home/happyman /twmapcache/tmp/out";
16+ $out_html_root = "/out";
1517$site_url = $protocol . "map.happyman.idv.tw";
16- $site_html_root = "/twmap ";
18+ $site_html_root = "/gen ";
1719// 30 for SuSE, 33 for Ububtu
18- define('WWWRUN_UID', 33 );
20+ define('WWWRUN_UID', 1001 );
1921
2022// 放一版的圖資目錄
2123$stbpath = 'http://make.happyman.idv.tw/~happyman/stb';
2224// 放從 TMS 的圖磚
2325// 放3版 1x1 的圖檔
24- $tilecachepath = "/mnt /twmapcache/cache";
26+ $tilecachepath = "/home/happyman /twmapcache/cache";
2527
2628// 不重要
2729//if (!file_exists($tilepath."/16")) {
2830// die("image dir not ready");
2931//}
30- $tmppath = "/home/nas /twmapcache/tmp";
31- $diskfullchk = "/home/nas /";
32+ $tmppath = "/home/happyman /twmapcache/tmp";
33+ $diskfullchk = "/home/happyman/map /";
3234$twmap_gen_version = trim(file_get_contents(__ROOT__."VERSION"));
33- $TWMAP3_html_root = "/~happyman/twmap3 ";
34- $TWMAP3URL = "/~happyman/twmap3 /index.php";
35+ $TWMAP3_html_root = "/map ";
36+ $TWMAP3URL = "/map /index.php";
3537$BETA = 0; // beta for debug output
3638$ERROROUT = "ajax";
3739
@@ -55,41 +57,21 @@ $pixels['A3R'] = array("x"=>2984, "y"=>2110);
5557$fuzzy = 20;
5658
5759/* DB 設定寫在這裡 */
58- $db_host = 'localhost ';
59- $db_user = "twmap ";
60- $db_pass = "password ";
61- $db_name = "twmap ";
60+ $db_host = '';
61+ $db_user = "";
62+ $db_pass = "";
63+ $db_name = "";
6264$db_port = '5432';
63- $db_dsn = sprintf("postgres9://%s:%s@%s:%s/%s?persist ",$db_user,$db_pass,$db_host,$db_port,$db_name);
65+ $db_dsn = sprintf("postgres9://%s:%s@%s:%s/%s",$db_user,$db_pass,$db_host,$db_port,$db_name);
6466$gdal_dsn = sprintf("PG:dbname='%s' user='%s' password='%s' host='%s' port='%s'",$db_name,$db_user,$db_pass,$db_host,$db_port);
6567
6668
67- // 需要申請一把 xuite / facebook 的 api key
68- // api.xuite.net
6969require_once(__ROOT__."lib/twmapdb.inc.php");
7070/* login */
7171if (php_sapi_name() != "cli") {
72-
7372 require_once(__ROOT__."lib/xuite.php");
74- require_once __ROOT__."lib/Hybrid/Hybrid/thirdparty/Facebook/base_facebook.php";
75- require_once __ROOT__."lib/Hybrid/Hybrid/thirdparty/Facebook/facebook.php";
76-
77- //require_once(__ROOT__."lib/openid.php");
78- // move to config-hybridauth.php
7973 $fb_appid = '';
80- $facebook = new Facebook(array(
81- 'appId' => $fb_appid,
82- // here
83- 'secret' => '',
84- // 'cookie' => false,
85- ));
86- // here
87- $xuite = new xuiteAuth(array(
88- 'api_key' => '',
89- 'secret' => ''));
90-
9174 /* template */
92- //require_once(__ROOT__."lib/twmapdb.inc.php");
9375 $smarty = new Smarty();
9476 // composer autoload require_once(__ROOT__."lib/smarty/Smarty.class.php");
9577 require_once(__ROOT__."lib/smarty-out-jsmin.inc.php");
@@ -105,10 +87,6 @@ if (php_sapi_name() != "cli") {
10587 $smarty->assign('twmap3_html_root',$TWMAP3_html_root);
10688
10789}
108- else {
109- // special include for CLI
110- //
111- }
11290require_once __ROOT__."lib/ape/ApeAbstractConnection.php";
11391require_once __ROOT__."lib/ape/ApeClient.php";
11492require_once __ROOT__."lib/ape/ApeCurlConnection.php";
@@ -120,16 +98,14 @@ require_once __ROOT__."lib/ape/ApeResponse.php";
12098
12199#
122100
123- ini_set("session.gc_maxlifetime", 86400);
124-
125101# Keppon API : queue
126102define('GEARMAN_SERVER','127.0.0.1');
127103
128104
129- define('APE_HOST','0.ape.happyman.idv.tw');
130- $CONFIG['admin'] = array();
105+ define('APE_HOST','0.ape.tile. happyman.idv.tw');
106+ $CONFIG['admin'] = array( 3 );
131107// gdalwarp -t_srs EPSG:4326 dem_20m.tif dem_20m-latlong.tif
132108// source: http://data.gov.tw/node/35430
133109define('twDEM_path', __ROOT__ ."db/DEM/dem_20m-latlong.tif");
134- $CONFIG['poi_file'] = "/home/mountain/mapsforge/20171008 /MOI_OSM_Taiwan_TOPO_Rudy.poi";
110+ $CONFIG['poi_file'] = "/home/happyman/poi /MOI_OSM_Taiwan_TOPO_Rudy.poi";
135111
0 commit comments