Category Archives: PHP development

An unlikely place to look for an Amazon S3 issue

This has driven me nuts for a few hours so I have to share just in case someone else has similar issue. Basically I have a PHP script to access Amazon S3 using its SDK for PHP lib, and it … Continue reading

Posted in PHP development | 1 Comment

A PHP class to read Microsoft Access Database

A friend of mine recently asked me to help out building a data warehouse based on some Access database files. Here is a PHP class that I created to read database record from Access.

Posted in PHP development | Comments Off

A PHP boolean variable note

I am by no means a PHP know-all so this might have been documented. If I have a boolean variable, say boolean x = true; and if I use it in a if statement like: if ( x == ‘abc’) … Continue reading

Posted in PHP development | Comments Off

PHP image filter

I am looking for some PHP nudity image filter library and I found this one on phpclasses.org: PHP Image Nudity Filter. The class was written by Bakr Alsharif. According to the web site, the class “analyses the colors used in … Continue reading

Posted in PHP development | 2 Comments

Installing APC

APC stands for “Alternative PHP Cache”. It’s one of the 3 PHP accelerators out there (the other 2 are Zend and eAccelerator). The installation package can be found here: http://pecl.php.net/package/APC Follow the installtion guide in the package, the apc.so is … Continue reading

Posted in PHP development, server setup | Comments Off

enable curl in PHP in Windows

php_curl.dll CURL, Client URL library functions Requires:  libeay32.dll, ssleay32.dll meaning they need to copied to to system32

Posted in PHP development | Comments Off

imagecreateresampled vs. imagecreateresized

If you are using image manipulation functions in PHP to resize a image, a common mistake is to use the imagecreateresized() function. Actually, most of the time, imagecreateresampled() function should be used. According to the API document, imagecreateresampled() copies a … Continue reading

Posted in PHP development | Comments Off

building a Smarty driven PHP site – 1

The Model, View and Controller (MVC) design has been used widely to develop complex web sites. The key of this design is to separate the data, process and presentation so they can be developed separately and easier to maintain.  A … Continue reading

Posted in PHP development | Comments Off

PHP output compression

In php.ini file zlib.output_compression=On zlib.output_compression_level=5 If you use ob_start() (output buffering)Â in php script: use ob_start(‘ob_gzhandler‘); Using both will not get the output compressed twice , there will be an error reporting confliction instead.

Posted in PHP development | Comments Off

PHP caching

I started to implement the PHP caching for one of my site. Since I use PHP/Smarty, there are a few options. Smarty offers a page level caching. You can cache the entire page with Smarty’s caching capability. It is very … Continue reading

Posted in PHP development | Comments Off