[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapguide-commits
Subject:    [mapguide-commits] r9995 - in trunk/Installer: Custom/apache_actions Support/Web/x64 Support/Web/x64
From:       svn_mapguide () osgeo ! org
Date:       2022-10-26 15:27:41
Message-ID: 20221026152741.6545D1A6100 () trac ! osgeo ! org
[Download RAW message or body]

Author: jng
Date: 2022-10-26 08:27:39 -0700 (Wed, 26 Oct 2022)
New Revision: 9995

Added:
   trunk/Installer/Support/Web/x64/mod_fcgid.so
Modified:
   trunk/Installer/Custom/apache_actions/apache_actions.cpp
   trunk/Installer/Support/Web/x64/configs/Apache2/conf/httpd.conf
Log:
#2852: Add missing mod_fcgid.so binary for installer and update apache custom action \
to bake a custom php-cgi.exe path with proper space escaping to workaround \
mod_fcgid's inability to handle paths with spaces on Windows!

Modified: trunk/Installer/Custom/apache_actions/apache_actions.cpp
===================================================================
--- trunk/Installer/Custom/apache_actions/apache_actions.cpp	2022-10-26 12:03:08 UTC \
                (rev 9994)
+++ trunk/Installer/Custom/apache_actions/apache_actions.cpp	2022-10-26 15:27:39 UTC \
(rev 9995) @@ -239,6 +239,7 @@
 	// %MG_WEB_ROOT% for [WEBROOTLOCATION]
 	// %MG_WEB_PORT% for [APACHE_PORT]
 	// %MG_WEB_PHP% for [PHPLOCATION]
+	// %MG_WEB_PHP_FCGI% for [PHPLOCATION] with proper escaping for spaces
 	// %MG_WEB_APACHE% for [APACHELOCATION]
 	// %MG_VIRTUAL_DIR% for [VIRTUALDIR]
 	//
@@ -317,6 +318,14 @@
 				FindAndReplace(line, "%MG_WEB_ROOT%", szWebRootDir);
 				FindAndReplace(line, "%MG_WEB_PORT%", szPortNo);
 				FindAndReplace(line, "%MG_WEB_PHP%", szPhpDir);
+				// BOGUS: The mod_fcgid FcgidWrapper directive can't handle paths to php-cgi.exe \
that contain spaces +				// Guess where the default windows installation root is? \
"C:\Program Files\...". What total BS!  +				//
+				// Per this comment \
(https://www.php.net/manual/en/install.windows.apache2.php#117707), the workaround \
+				// is to put a backslash "\" before every space in the path +				std::string \
phpDirFcgi = szPhpDir; +				FindAndReplace(phpDirFcgi, " ", "\\ ");
+				FindAndReplace(line, "%MG_WEB_PHP_FCGI%", phpDirFcgi);
 				FindAndReplace(line, "%MG_WEB_APACHE%", szApacheDir);
 				FindAndReplace(line, "%MG_VIRTUAL_DIR%", szVirtualDir);
 				if (bJava)

Modified: trunk/Installer/Support/Web/x64/configs/Apache2/conf/httpd.conf
===================================================================
--- trunk/Installer/Support/Web/x64/configs/Apache2/conf/httpd.conf	2022-10-26 \
                12:03:08 UTC (rev 9994)
+++ trunk/Installer/Support/Web/x64/configs/Apache2/conf/httpd.conf	2022-10-26 \
15:27:39 UTC (rev 9995) @@ -200,7 +200,7 @@
 # PHP FastCGI setup
 FcgidInitialEnv PHPRC "%MG_WEB_PHP%"
 AddHandler fcgid-script .php
-FcgidWrapper "%MG_WEB_PHP%/php-cgi.exe" .php
+FcgidWrapper "%MG_WEB_PHP_FCGI%/php-cgi.exe" .php
 
 #
 # ExtendedStatus controls whether Apache will generate "full" status

Added: trunk/Installer/Support/Web/x64/mod_fcgid.so
===================================================================
(Binary files differ)

Index: trunk/Installer/Support/Web/x64/mod_fcgid.so
===================================================================
--- trunk/Installer/Support/Web/x64/mod_fcgid.so	2022-10-26 12:03:08 UTC (rev 9994)
+++ trunk/Installer/Support/Web/x64/mod_fcgid.so	2022-10-26 15:27:39 UTC (rev 9995)

Property changes on: trunk/Installer/Support/Web/x64/mod_fcgid.so
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
_______________________________________________
mapguide-commits mailing list
mapguide-commits@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic