Disable AllowOverride (htaccess to httpd.conf)

AllowOverride is one of the things that slow down a lot. Disabling it makes apache faster. It is a horror to migrate all .htaccess files by hand. BUT here is a PHP script from Paul Reinheimer which makes it realy easy :-)

Get it htaccess.php

tune your server!

crashing fcgid 2.3.6 on windows

On Windows fcgid crashes apache when apache do a graceful restart (httpd -k restart). Here is a patch that should fix that. This patch in inspired from Tom Dovovan.

Index: modules/fcgid/fcgid_pm_main.c
--- modules/fcgid/fcgid_pm_main.c    (revision 1037552)
+++ modules/fcgid/fcgid_pm_main.c    (working copy)
@@ -375,7 +375,9 @@
 proc->diewhy = FCGID_DIE_SHUTDOWN;
 proc_print_exit_info(proc, exitcode, exitwhy,
-        apr_pool_destroy(proc->proc_pool);
+        #ifndef Win32
+            apr_pool_destroy(proc->proc_pool);
+        #endif
 proc->proc_pool = NULL;
 return 1;
Index: modules/fcgid/fcgid_pm_win.c
--- modules/fcgid/fcgid_pm_win.c    (revision 1037552)
+++ modules/fcgid/fcgid_pm_win.c    (working copy)
@@ -123,7 +123,9 @@
 "mod_fcgid: can't create wake up thread");
+    apr_pool_cleanup_register(pconf, main_server,
+                              procmgr_stop_procmgr, apr_pool_cleanup_null);
 return APR_SUCCESS;

@@ -249,8 +251,6 @@
 procmgr_child_init(server_rec * main_server, apr_pool_t * pchild)
-    apr_pool_cleanup_register(pchild, main_server,
-                              procmgr_stop_procmgr, apr_pool_cleanup_null);
 return APR_SUCCESS;

Download this patch

Preparing mod_svn for compiling on windows

Well I didn’t manage it to compile mod_svn without the apache compiled source tree, but than it works fine and fast. Also Python 3 did not work. So I took 2.7
Assuming that OpenSSL 1.0.0a and zlib are compiled in that source tree as well.

C:\python27\python gen-make.py -t vcproj --vsnet-version=2008 --with-httpd=C:\build\httpd-2.2.x-sni-dev-ipv6
 --with-zlib=C:\build\httpd-2.2.x-sni-dev-ipv6\srclib\zlib --with-apr=C:\build\httpd-2.2.x-sni-dev-ipv6\srclib\apr

Than just open subversion_vcnet.sln with Visual C++ Express Edition. Ignore all warnings about solution folders. Choose the __ALL__ project. Than change from debug to release. Start!

My sample config

LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so

LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn/>
  DAV svn

  SVNListParentPath on
  SVNParentPath /Repositories/
  SVNIndexXSLT "/svnindex.xsl"
  SVNPathAuthz on
  AuthzSVNAccessFile "C:/Repositories/authz"

  AuthName "Subversion Repositories"
  AuthType Basic
  AuthUserFile "C:/Repositories/htpasswd"

  require valid-user

Changed to event mpm

I made some testing on my dev machine and liked event mpm. So I installed it here. I noticed that  the event mpm closes the connections faster than worker mpm. Some download tests sadisfied me. Less memory usage and faster serving :-) For now I keeped the settings from worker mpm. I’ll look for tweaking in the next days.

Different to the docs event mpm works fine with SSL.

sudo apt-get install apache2-mpm-event libapache2-mod-fcgid

Also the serving PHP over fcgid is nice.  The implementation of PHP over fcgid in the older post.

reddot rql finishtranslation

Howto get a page released from translation editor

Function finishtranslation(pageguid,availableLangVariantId)
 dim xmlString
 dim resXML
 xmlString = "" _
 & "<IODATA loginguid=""" & Session("LoginGuid") & """ sessionkey=""" & Session("SessionKey") & """>" & Vbcrlf _
 & "<WORKFLOW>" & Vbcrlf _
 & "<PAGES action=""finishtranslation"" sourcelanguageid="""& Session("LanguageVariantId") & """ targetlanguageid=""" & availableLangVariantId & """>" & Vbcrlf _
 & "<PAGE guid=""" & pageguid & """/>" & Vbcrlf _
 & "</PAGES>" & Vbcrlf _
 & "</WORKFLOW>" & Vbcrlf _
 & "</IODATA>" & Vbcrlf
 If show_debug = true then
 Response.write("<div style=""margin-left:20px; border:1px solid green;""")
 xmlString = replace(xmlString,"<","&lt;")
 xmlString = replace(xmlString,">","&gt;")
 Response.write("[" & xmlString & "]")
 End If
 resXML = objIO.ServerExecuteXml(XMLString, sError)

 If sError <> "" Then
     Response.Write "<span style='color:red'>" & sError & "</span><br />"
 End If

End Function

Author Archive

Archives by Month: