Archive for February, 2007

PHP_Archive & Phar

Tuesday, February 27th, 2007

Looking for an easy way to package your php application without having to copy tons of files across servers? Here’s a new PHP Extension which allows you to create and use PHAR (PHP Archive) files.

Here’s how you would use it in your code:

< ?
include 'phar:///full/path/to/my.phar/file.php';
? >

Phar provides both a stream wrapper (phar://) and a Phar class which can be used to access the contents of a phar archive. What is a phar archive? Think of it as a virtual filesystem that is customized for use with PHP, sort of like a Java .jar archive.

.phar files can be read using the phar stream, or with the Phar class. If the SPL extension
is available, a Phar object can be used as an array to iterate over a phar’s contents
or to read files directly from the phar.

Phar archives can be created using the streams API or with the Phar class, if
the phar.readonly ini variable is set to false.

Greg’s Blog :Introducing pecl extension phar - Lot 49: Greg Beaver’s blog

Phar Extension page: http://pecl.php.net/package/phar

PHPExcel

Tuesday, February 27th, 2007

PHPExcel provides classes which allow you to create Excel 2007 files in PHP. This requires PHP 5.2 and php_zip extension enabled.

Some of the features this class set provides:

  • Setting spreadsheet meta data (author, title, description, …)
  • Multiple worksheets
  • Fonts and font styles,
  • Cell borders
  • Fills
  • Gradients
  • Adding images to your spreadsheet

A code sample showing the usage is available at:
http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Examples

Link to Project page: CodePlex - PHPExcel

Anubis - PHP-GTK IDE

Monday, February 26th, 2007

 Anubis Screenshot

If you’re looking for a IDE for PHP-GTK programming, you should try out Anubis. I took a quick look at it and it’s pretty simple to use. There are no overly complicated interfaces in the current version just click and drop. :)

Link: Anubis Download Page

SWFUpload beta

Monday, February 26th, 2007

SwfUpload Logo

Here’s a cool way to give users an option to upload files to the server. Features of SWFUpload:

  • Only display chosen filetypes in dialog
  • Upload multiple files at once by ctrl/shift-selecting in dialog
  • Trigger javascript functions on start, cancel, progress and complete
  • Get file information/size before upload starts
  • Style upload buttons any way you want
  • Do progress-bars/information using valid XHTML and CSS
  • No page reloads, display uploaded files as they are finished
  • Works on all platforms/browsers that has Flash support.
  • Degrades gracefully to a normal html upload form if Flash or javascript isn’t available
  • Control filesize before upload starts

Download: SWFUpload beta

Performance Tuning Best Practices for MySQL (Video)

Wednesday, February 21st, 2007

This video is from one of Google’s Techtalk sessions by Jay Pipes

ABSTRACT Learn where to best focus your attention when tuning the performance of your applications and database servers, and how to effectively find the “low hanging fruit” on the tree of bottlenecks. It’s not rocket science, but with a bit of acquired skill and experience, and of course good habits, you too can do this magic!

Debugging sleeping connections with MySQL

Monday, February 19th, 2007

I’ve had to to look at this situation quite a few times on live servers, where the number of MySQL connections seemed to exceed the max limit of the server and PHP used to throw “Too many connections” error when a MySQL query was run. When we looked at the MySQL process list, it showed quite a few MySQL connections in the Sleep state. Here’s an article from MySQL Performance Blog on debugging such connections.

I see if frequently with web applications and it is often indication of trouble. Not only it means you may run out of MySQL connections quicker than you expected but it also frequently indicates serious problems in the application. If you do not use persistent connections and you have connection in Sleep stage for 600 seconds what could it be ? It may mean some of your pages take that long to generate (or might be the code simply gets into the tight loop and page never gets generated) it also could mean some of external Web Services are slow or not available and you’re not dealing with timeouts properly. Or may be you have several connections to MySQL server and right now running query which takes that long ? In any case it is something frequently worth looking at.

Link: MySQL Performance Blog » Debugging sleeping connections with MySQL

PHP 5.2.1 Released

Friday, February 9th, 2007

 PHP Logo

The PHP Team has announced the release of the latest version of PHP, version 5.2.1. The changelog can be found at: http://www.php.net/ChangeLog-5.php#5.2.1

The key improvements of PHP 5.2.1 include:

  • Several performance improvements in the engine, streams API and some Windows specific optimizations.
  • PDO_MySQL now uses buffered queries by default and emulates prepared statements to bypass limitations of MySQL’s prepared statement API.
  • Many improvements and enhancements to the filter and zip extensions.
  • Memory limit is now always enabled, this includes Windows builds, with a default limit of 128 megabytes.
  • Added several performance optimizations using faster Win32 APIs (this change means that PHP no longer supports Windows 98).
  • FastCGI speed optimized build of PHP for Windows made available for downloading.
  • Over 180 bug fixes.

Link: PHP 5.2.1 Release Announcement

phpPaypalPro 0.2.0 Released

Thursday, February 8th, 2007

phpPaypalPro version 0.2.0 has been released under the revised BSD license. Their catch phrase is “So Easy Even A Caveman Can Use It”.

phpPaypalPro is an object-oriented framework developed in PHP5 to integrate easily with the Website Payments Pro SOAP 1.1 API from Paypal. The framework is very easy to deploy, allowing you to execute any of the operations in just a few lines. It deploys the built-in SOAP extension available natively in PHP5 to interact with the SoapServer from Paypal.

Current operations supported in version 0.2.0 includes:

  • DoDirectPayment
  • SetExpressCheckout
  • GetExpressCheckoutDetails
  • DoExpressCheckoutPayment
  • TransactionSearch
  • GetTransactionDetails

Link: phpPaypalPro - Website Payments Pro Made Easy

Cool Linux GUI

Thursday, February 8th, 2007

If you thought Microsoft’s Vista had a cool GUI, check this GUI:

I wonder which distro this is? If you do, do post a comment and let me know.

53 CSS-Techniques You Couldn’t Live Without

Wednesday, February 7th, 2007

Are you looking for a list of what you can do with CSS with links to tutorials which show you how to? You must go through the following article from Smashing Magazine.

Over the last few years web-developers have written many articles about CSS and developed many useful techniques, which can save you a lot of time - of course, if you are able to find them in time. Below you’ll find a list of techniques we , as web-architects, really couldn’t live without. They are essential and they indeed make our life easier. Let’s take a look at 53 CSS-based techniques you should always have ready to hand if you develop web-sites.

Link: 53 CSS-Techniques You Couldn’t Live Without | Smashing Magazine

About Me

Here's my blog on stuff I keep finding on the Web. More

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
On the Go? Get this on your Widsets: Add to my Widsets
Find entries :
Page 1 of 212»