Category: "PHP"

Log ALL Errors
Oct 16th
Graceful error trapping and display is important, both during development and after deployment. It is also good to have debug control that is manageable through environment variables. One nice solution is to use SetEnv in .htaccess or a .conf file.… more »

Interpretive File Architectures - PHP & Perl
Oct 12th
If you are developing code for interpretive languages such as PHP & Perl, consider the use of the scripts carefully.
As a rule, you should strive to write code which evaluates only the code required for execution. Files should be as small as poss… more »

info2spec.sh - Translator from Drupal .info to RPM .spec files
Oct 4th
This is a very simple translation of a Drupal .info file into an RPM .spec file. It may be useful in identifying methods to assemble complex Drupal installations on dedicated servers or VPSs where the modules can be managed as RPMs. This would not be u… more »

Drupal RPM spec file generator module
Sep 28th
A Drupal RPM generator module could scan the modules installed and extract the following information:
Source file (full URL)
Requires - the modules required to support each module
Provides - the name of the service/capability/feature provided by e… more »

Commandline PHP emailer
Sep 28th
A nice commandline PHP emailer (can be adapted for sites), derived primarily from code at http://php.net.
Worthy of note:
Use of $HOSTNAME to get the name of the host. This is good for commandline when the $_SERVER variables aren't available.
S… more »