PHP Configuration, php.ini and overrides

PHP has several places where configuration can be set. While I had an idea of the precedence of those settings, I decided to test them experimentally to be sure of what I am going to say. In particular this post is focused on error_reporting, but the same considerations can hold true for any setting.

So . . . → Read More: PHP Configuration, php.ini and overrides

Trac woes

After upgrading my Ubuntu Maverick Meerkat to Natty Narwhal, My Trac installation greeted me with “500 Internal Server Error”.

Checking apache error log I saw “ImportError: No module named trac.web.modpython_frontend“.

[Mon May 02 14:02:24 2011] [error] [client 192.168.254.100] mod_python (pid=1991, interpreter=’main_interpreter’, phase=’PythonHandler’, handler=’trac.web.modpython_frontend’): Application error [Mon May 02 14:02:24 2011] [error] [client 192.168.254.100] ServerName: ‘::1′ . . . → Read More: Trac woes

Mod_Jk with Wamp (Apache 2.2.11)

Previously I blogged about installing Mod_jk with Tomcat 5.5 on Linux. This time I’m going to install Mod_jk aka Tomcat Connector on Windows. The binary version can be downloaded here:

http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28/

I downloaded mod_jk-1.2.28-httpd-2.2.3.so – renamed to mod_jk.so and copied to

C:\wamp\bin\apache\Apache2.2.11\modules

I create C:\wamp\bin\apache\Apache2.2.11\conf\workers.properties with the following content

# Define 1 real worker using . . . → Read More: Mod_Jk with Wamp (Apache 2.2.11)

Debugging PHP code with Netbeans

Today I try to enable debugging of PHP with Netbeans on the windows platform. For this reason I’ve downloaded the thread safe version of xdebug and placed it in my extension directory, in my case C:\easyphp3\php\ext

As explained in “Introducing xdebug” to activate it I added the following in my php.ini

zend_extension_ts=${path}\php\ext\php_xdebug-2.0.4-5.2.8.dll xdebug.remote_enable=1

After restarting . . . → Read More: Debugging PHP code with Netbeans

mod_jk with Tomcat 5.5

One year ago I was moving my first steps with Java webservices and today with Java annotations the task to write a webservice is easier.

I’ve already talked about installing mod_jk but it was with Java 1.4 and Tomcat 4.1. Today I’m trying with Java 1.6 and Tomcat 5.5 with apache 1.3.

From http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/ I . . . → Read More: mod_jk with Tomcat 5.5

Configuring Apache / PHP with JavaBridge to Tomcat 5.5

PHP / Java Bridge is an interesting technology to allow to connect PHP with a Java virtual machine. On the official site they claim “It is more than 50 times faster than local RPC via SOAP, requires less resources on the web-server side, and it is faster and more reliable than communication via the Java . . . → Read More: Configuring Apache / PHP with JavaBridge to Tomcat 5.5

Apache Logrotate

Today I wrote a script to rotate apache logfiles using logrotate. The scripts to rotate logs have to be in /etc/logrotate.d directory and can have any name. I rotate logs whenever they grow bigger than 200Mb (size 200M) and keep 30 archives (rotate 30). Before rotating I execute awstats script to calculate statistics and after . . . → Read More: Apache Logrotate

Apache 1.3.37 – PHP 5.2.0 – ModSSL 2.8.25

Here is how I configured Apache with PHP and mod SSL. The new PHP 5.2 is just out and I need CURL that wasn’t previously included in my last build.

# cd mod_ssl-2.8.28-1.3.37 # ./configure –with-apache=../apache_1.3.37 # cd ../apache_1.3.37 # SSL_BASE=/usr ./configure –prefix=/usr/local –enable-module=so \ –enable-module=speling –enable-module=rewrite –enable-module=ssl # make # make install # cd . . . → Read More: Apache 1.3.37 – PHP 5.2.0 – ModSSL 2.8.25

Installing Java, Tomcat, mod_jk on Linux

Today is Monday, back to work. I payed a guy in India to have a couple of days hands on tutorial on SOAP webservices, no time to read a lot of theory without getting a fast grasp. Now time to try them live.

Despite the latest Tomcat version is now 5.5 Axis requires 4.1 and . . . → Read More: Installing Java, Tomcat, mod_jk on Linux

Adding SSL support for a site

This is the procedure to add SSL support to a site. Virtualhosting on https is however not possible, so to host more than one domain on the same machine we’ve to either have more than one IP address on the same server or use different ports. Sad but true. In the old times this was . . . → Read More: Adding SSL support for a site