Monthly Archives: March 2011

Upgrading the pear installer with pear

I recently tried to install the latest version of PHPUnit, and I ran into a bit of trouble. When I installed pear on SLE 10 (zypper install php5-pear), the installer version was too old to download and install PHPUnit. So, I had to upgrade the pear installer to the latest version before I could install PHPUnit. To do this, simply run ‘pear upgrade pear’ from the command line (or in a shell). After you do that, PHPUnit should install without problems.

To install PHPUnit will all dependencies, execute the following from the command line (or in a shell).

pear channel-discover
pear channel-discover
pear channel-discover
pear install --alldeps phpunit/PHPUnit

NGINX configuration

I recently configured NginX to run on port 8080, and I thought that I would share my configuration file (nginx.conf).

#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log debug;
#pid logs/;

events {
worker_connections 10240;

http {
include mime.types;
default_type application/json;
log_format gzip '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent"';

#log_format accounting_log '$time_local,0,$firm_id,$request_ip,Nginx,Lookup,$successFailure,"$request",$http_user_agent,$status,$upstream_response_time';
access_log off;

sendfile on;
keepalive_timeout 65;

#gzip on;

server {
listen *:8080;
error_page 500 502 503 504 403 404 405 = /cache_miss_js;
set $logFile "logs/nginx.log";

location ~* \.php.* {
#access_log $logFile accounting_log;

if ($remote_addr ~* ([0-9]+).([0-9]+).([0-9]+).([0-9]+)) {
set $request_ip $remote_addr;
if ($http_x_clientip ~* ([0-9]+).([0-9]+).([0-9]+).([0-9]+)) {
set $request_ip $http_x_clientip;

add_header X-ClientIP $request_ip;

root html/start/public;
fastcgi_pass php_servers;
fastcgi_pass_header Set-Cookie;
#fastcgi_connect_timeout 50;
#fastcgi_read_timeout 50;
fastcgi_next_upstream timeout error;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME ./html/start/public$fastcgi_script_name; #this is the one line for edition
include fastcgi_params;

if (!-e $request_filename) {
rewrite ^.*$ /index.php last;

location / {
error_page 500 502 503 504 = /index.php;
error_page 403 404 405 = /index.php;
access_log $logFile gzip;
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;


It is just a development instanstance of Nginx.

The above configuration file works with rewrite rules for Zend Framework.

NginX config

Installing a subversion client on SLE 10

I just noticed that SUSE Linux Enterprise Server 10 does not have Subversion in the core repository. Apparently, one has to download a 2.9 GB “developer kit” to get the subversion client RPM.

I did some searching on the internet, and I discovered the RPMs at the following location. I am using x86_64 of SLE 10. You can check your version with the following command: lsb_release -d


Neon is a dependency for the subversion client.