mod_dav_svn from subversion 1.7.x does not build against apache 2.4

Since the API in Apache 2.4.x has changed the mod_dav_svn module from svn doesn’t build currently. I made patch for that. There is only a small issue in subversion/mod_dav_svn/util.c

Index: util.c
===================================================================
--- util.c    (revision 1299310)
+++ util.c    (working copy)
@@ -627,8 +627,14 @@
         if (errscan->desc == NULL)
             continue;

-        if (errscan->save_errno != 0) {
+#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)            
+        if (errscan->aprerr != 0) {
+            errno = errscan->aprerr;
+#else
+        if (errscan->save_errno != 0) {
             errno = errscan->save_errno;
+#endif
+
             ap_log_rerror(APLOG_MARK, level, errno, r, "%s  [%d, #%d]",
                           errscan->desc, errscan->status, errscan->error_id);
         }

Now it compiles against Apache 2.2 and Apache 2.4

 

Any feedback is welcome.

Javascript getElmentsByClassName

If not having jquery this could be a solution

<script type="text/javascript">
function getElementsByClassName(classname, node)  {
    if(!node) node = document.getElementsByTagName("body")[0];
    var a = [];
    var re = new RegExp('\\b' + classname + '\\b');
    var els = node.getElementsByTagName("*");
    for(var i=0,j=els.length; i<j; i++){
        if(re.test(els[i].className)){
            a.push(els[i]);
        }
    }
    return a;
}
</script>

HTML5 Tags in IE7, IE8

To get HTML5 Tags working in Internet Explorer 7 (IE7) and Internet Explorer 8 (IE8), there is a simple workaround. Before the html head  close tag add

<!--[if lt IE 9]>
        <script>
        document.createElement('header');
        document.createElement('nav');
        document.createElement('section');
        document.createElement('article');
        document.createElement('aside');
        document.createElement('footer');
        document.createElement('hgroup');
        </script>
        <![endif]-->
    </head>

and in your css in the very first line(s)

header, nav, section, article, aside, footer, hgroup {
    display: block;
}

 

Than most html5 stuff shall work. Yes, things like input types still don’t work. That’s for sure, but at least the design won’t be broken, if you are using html5.

Jquery IE .html() Error

Ein einfacher html code, der per ajax verändert werden soll.

<div><img src="icons/reddotadd.gif" title="Add Page" id="AddPageTrigger" alt="Add Page" style="border:0; cursor:pointer;" /></div>
$("#AddPageTrigger").text("TEXT hier");

schlägt im IE fehl. Warum? Keine Ahnung, aber was funktioniert ist

$("#AddPageTrigger").parent().text("TEXT hier");

Ajax Undzeichen ( &) übertragen

Normalerweise gibt es ein Problem beim Übertragen von Daten per AJAX, wenn sich ein & Zeichen in dem zuübertragenden Text / Daten befindet. Das Javascript interpretiert das Undzeichen als Trennzeichen. Alles nach dem & Zeichen wird nicht mehr übertragen. Abhilfe schafft hier die funktion encodeURIComponent

 

var save_data = 'save_text=' + encodeURIComponent($(".edit_textarea").val());
		logging(save_data);
		//return false;
		$.ajax({
			type: 'POST',
			url: 'ajax.php',
			data: save_data,
			success: function (msg){
				console.log('OK: ' + msg);
			},
			error:function (xhr, ajaxOptions, thrownError){
				alert(xhr.status);
				alert(thrownError);
			}
		});

Jetzt kommen die Daten auch an.

mod_fcgid is crashing apache windows and linux

With apache 2.3.15 I had kinda  the same issue with mod_fcgidon ubuntu 8.04 as on windows.  With -k restart or -k graceful the server did not die like on windows, but the server delivered than only a 200 OK response header, but nothing more. Switching from worker mpm to event mpm seemed to solve this, but the server died later :-/

Since it has talmost the same issues like on windows I could make a patch that fixes this. Grab the patch (patched against trunk) for the patch for 2.3.6

The bug 50309 is now longer than a year listet. Bad that none applied it yet.