@@ -28,9 +28,9 @@ type ServerSettings struct {
2828 RootPath string `json:"rootPath"`
2929 GameDataPath string `json:"gameDataPath"`
3030 LegacyPHPPath string `json:"legacyPHPPath"`
31- LegacyPHPCGIPath string `json:"legacyPHPCGIPath"`
3231 LegacyCGIBINPath string `json:"legacyCGIBINPath"`
3332 LegacyHTDOCSPath string `json:"legacyHTDOCSPath"`
33+ PhpCgiPath string `json:"phpCgiPath"`
3434 UseInfinityServer bool `json:"useInfinityServer"`
3535 InfinityServerURL string `json:"infinityServerURL"`
3636 HandleLegacyRequests bool `json:"handleLegacyRequests"`
@@ -82,9 +82,9 @@ func initServer() {
8282 rootPath := flag .String ("rootPath" , serverSettings .RootPath , "The path that other relative paths use as a base" )
8383 gameDataPath := flag .String ("gameRootPath" , serverSettings .GameDataPath , "This is the path where to find the zips" )
8484 legacyPHPPath := flag .String ("legacyPHPPath" , serverSettings .LegacyPHPPath , "This is the path for PHP" )
85- legacyPHPCGIPath := flag .String ("phpCgiPath" , serverSettings .LegacyPHPCGIPath , "Path to PHP CGI executable" )
8685 legacyCGIBINPath := flag .String ("legacyCGIBINPath" , serverSettings .LegacyCGIBINPath , "This is the path for CGI-BIN" )
8786 legacyHTDOCSPath := flag .String ("legacyHTDOCSPath" , serverSettings .LegacyHTDOCSPath , "This is the path for HTDOCS" )
87+ phpCgiPath := flag .String ("phpCgiPath" , serverSettings .PhpCgiPath , "Path to PHP CGI executable" )
8888 useInfinityServer := flag .Bool ("useInfinityServer" , serverSettings .UseInfinityServer , "Whether to use the infinity server or not" )
8989 infinityServerURL := flag .String ("infinityServerURL" , serverSettings .InfinityServerURL , "The URL of the infinity server" )
9090 handleLegacyRequests := flag .Bool ("handleLegacyRequests" , serverSettings .HandleLegacyRequests , "Whether to handle legacy requests internally (true) or externally (false)" )
@@ -115,11 +115,6 @@ func initServer() {
115115 fmt .Println ("Failed to get absolute PHP path" )
116116 panic (err )
117117 }
118- serverSettings .LegacyPHPCGIPath , err = filepath .Abs (path .Join (serverSettings .RootPath , strings .Trim (* legacyPHPCGIPath , string (os .PathSeparator ))))
119- if err != nil {
120- fmt .Println ("Failed to get absolute PHP CGI path" )
121- panic (err )
122- }
123118 serverSettings .LegacyCGIBINPath , err = filepath .Abs (path .Join (serverSettings .RootPath , strings .Trim (* legacyCGIBINPath , string (os .PathSeparator ))))
124119 if err != nil {
125120 fmt .Println ("Failed to get absolute cgi-bin path" )
@@ -130,6 +125,11 @@ func initServer() {
130125 fmt .Println ("Failed to get absolute htdocs path" )
131126 panic (err )
132127 }
128+ serverSettings .PhpCgiPath , err = filepath .Abs (path .Join (serverSettings .RootPath , strings .Trim (* phpCgiPath , string (os .PathSeparator ))))
129+ if err != nil {
130+ fmt .Println ("Failed to get absolute PHP-CGI path" )
131+ panic (err )
132+ }
133133 serverSettings .UseInfinityServer = * useInfinityServer
134134 serverSettings .InfinityServerURL = * infinityServerURL
135135 serverSettings .HandleLegacyRequests = * handleLegacyRequests
@@ -146,9 +146,9 @@ func initServer() {
146146 fmt .Println ("Root Path:" , serverSettings .RootPath )
147147 fmt .Println ("Game Data Path:" , serverSettings .GameDataPath )
148148 fmt .Println ("Legacy PHP Path:" , serverSettings .LegacyPHPPath )
149- fmt .Println ("Legacy PHP-CGI Path:" , serverSettings .LegacyPHPCGIPath )
150149 fmt .Println ("Legacy CGI-BIN Path:" , serverSettings .LegacyCGIBINPath )
151150 fmt .Println ("Legacy HTDOCS Path:" , serverSettings .LegacyHTDOCSPath )
151+ fmt .Println ("PHP-CGI Path:" , serverSettings .PhpCgiPath )
152152
153153 // Setup the proxy
154154 proxy = goproxy .NewProxyHttpServer ()
@@ -375,7 +375,7 @@ XgVWIMrKj4T7p86bcxq4jdWDYUYpRd/2Og==
375375 serverSettings .VerboseLogging ,
376376 serverSettings .ExtIndexTypes ,
377377 serverSettings .GameDataPath ,
378- serverSettings .LegacyPHPCGIPath ,
378+ serverSettings .PhpCgiPath ,
379379 serverSettings .ExtMimeTypes ,
380380 serverSettings .OverridePaths ,
381381 serverSettings .LegacyHTDOCSPath ,
0 commit comments