Sep 06

Leopard (10.5) was the first release of MacOS that included PHP 5 support. However by default it is disabled.
To enable it you need to uncomment (remove the #) from the following line in /private/etc/apache2/httpd.conf.

#LoadModule php5_module libexec/apache2/libphp5.so

Then restart apache

sudo /usr/sbin/apachectl restart

written by objects \\ tags: , ,

Apr 30

When processing a large file (for example using ‘LOAD DATA LOCAL INFILE’) the connection to mysql can get lost. Reason for this is the mysql server has a limit on the size of a ‘packet’ it receives and when this limit is exceeded it drops the connection.

This limit can be changed using the system variable max_allowed_packet. This specifies the maximum size of a packet in bytes.

A packet is a single SQL statement sent to the MySQL server, a single row that is sent to the client, or a binary log event sent from a master replication server to a slave.

written by objects \\ tags: ,

Mar 02

When using DWR you sometimes need access to the servlet request or the session.
When you do you can get access to them via the DWR WebContext class as shown in the following example code.

WebContext ctx = WebContextFactory.get();
HttpServletRequest request = ctx.getHttpServletRequest();

written by objects \\ tags: , , ,