Archive for the 'PHP' Category
One subsystem of a PHP server is its session handling. In multi user systems the choice of handlers requires a tradeoff between performance, persistence, and security/user isolation. Because my setup does not seem to be common I document it here. Read the rest of this entry »
posted on 20120807 in Admin, english, PHP |
Comments Off on PHP memcached session handler security
What makes good code and why is some code better than others? One quantitative approach to answer this is the use of software metrics. These metrics try to capture the size and complexity of code in numbers (e.g. ‘lines of code‘, ‘cyclomatic complexity‘) and can be useful indicators for maintainability and simplicity (or more often the lack thereof).
I found three ways to get complexity measures for PHP code.
Read the rest of this entry »
posted on 20100920 in english, PHP, Projects |
Comments Off on Measuring PHP code complexity
Falls er per (F)CGI eingebundene PHP-Interpreter viele “Internal Server Errors” verursacht, sich aber im Apache-Log keine Fehlermeldung findet… dann sollte man nachsehen ob die PHP-Prozesse überhaupt durchlaufen oder aber abstürzen.
Falls nämlich das Kernel-Log von SIGABRTs berichtet und überall Core-Dumps rumliegen, dann kann man sich langes rumschrauben am Logging sparen und stattdessen gleich die fehlerhafte PHP-Extension suchen und neuinstallieren.
posted on 20100908 in Admin, PHP |
1 comment »
Das PEAR-DTA-Paket bekommt zur Zeit eine Lese-Funktion, um DTA/DTAZV-Dateien auch einlesen zu können.
Mit dem DTA-Leser stelle ich nun ein Beispielskript online um Dateien entgegenzunehmen und ihren Inhalt anzuzeigen. Ist in einigen Situationen recht nützlich…
posted on 20100708 in PHP, Projects |
Comments Off on DTA-Leser
Given a multiuser webserver with PHP and error logging to syslog. Problem: how do you correlate error messages with users? This patch lets PHP call openlog() with a configurable program name. Read the rest of this entry »
posted on 20100319 in Admin, english, PHP, Syslog |
Comments Off on PHP syslog patch
The problem: take a PHP/SQL web application and add a function to export form letters. Because they might have to be edited later, the letters are not to be exported as PDFs but as ODT files for word processing.
When I implemented this I could not find documentation about this, so I wrote a small how-to.
Read the rest of this entry »
posted on 20090913 in english, PHP |
Comments Off on How to create OpenDocument texts with PHP
Ich betreue eine PHP-Anwendung die Überweisungen vorbereitet, mithilfe der PEAR Payment_DTA Klasse als DTA-Datei formatiert und per E-Mail an die Finanzabteilung schickt.
Um damit auch EU-Überweisungen erfassen zu können habe ich eine Klasse DTAZV geschrieben.
Read the rest of this entry »
posted on 20080919 in Admin, Digital, PHP |
Comments Off on DTAZV mit PHP