News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Dave Marshall's Blog:
Log memory usage using declare and ticks in PHP
0 comments :: posted Friday May 16, 2008 @ 12:05:37
voice your opinion now!

Posted to his blog, Dave Marshall has a tip that uses declare and a trick or two to check out the memory usage of your scripts.

As far as I know, there isn't any memory footprint profiling in Xdebug, I think there was at some point but they removed it because it was a little flaky. I like to monitor the memory usage within my scripts, and I've found this simple snippet can help.

The script defines a log_memory function that pushes the memory and time information into a session value. The register_tick_function method is used to add log_memory to the handler and its called over and over from inside his for loop.

tagged with: log memory usage ticks registertickfunction method session


C7Y:
Reflections on Designing an IRC Bot in PHP, Part 2
0 comments :: posted Friday April 18, 2008 @ 11:14:56
voice your opinion now!

Matthew Turland notes that the second part of his "IRC Bots in PHP" series of articles has been posted to the C7Y community site (from php|architect).

The precursor to this article introduced some background and an overview of the design for the Phergie project as an example of the concepts involved in a PHP IRC bot implementation. This article will go further into the topic of plugins including descriptions of those that are commonly needed to make a bot fully functional as well as the commonly needed core features to support plugin development.

In part one he set up some of the foundation code and explained some of the thought behind the structure of the bot. In this part he gets more into the heart of the bot, showing how to define functions for common IRC actions (join/part/ping/etc) and how he made a plugin system to handle custom actions. He also mentions topics like memory usage, data storage methods and some of the "niceties" he included.

tagged with: irc bot tutorial example plugin action memory phergie

PHP-GTK Community Site:
PHP-GTK on Vista Memory Issue
0 comments :: posted Thursday March 13, 2008 @ 09:37:27
voice your opinion now!

The PHP-GTK Community Site has posted about an issue that's been found with PHP-GTK on a Windows Vista machine that can cause problems with how the OS handles memory (by Wim Stockman).

My work station is WinXp system and my friend where I had to create it for has the new Vista and somewhere over 9000 pictures to be managed. On my system everything worked fine, but on my friends system i always got the error can not open file.

Further testing revealed that it was the OS at fault - Vista wasn't handling the memory usage for the application correctly. When it was run directly from the file explorer (versus in the PHP-GTK console) though, it worked just fine.

tagged with: winxp windows vista phpgtk memory issue console fileexplorer

Brian Moon's Blog:
Apache Worker and PHP
0 comments :: posted Friday February 15, 2008 @ 08:43:00
voice your opinion now!

In a recent post to his blog, Brian Moon talks about the experience he's had with using PHP on Apache 2 with a threaded MPM at Dealnews.com.

Well, first, what is an MPM? It stands for Multi-Processing Module. [...] The most commonly used threaded MPM is the Worker MPM. In this MPM, you have several processes that run multiple threads within it. This is the one I will be talking about.

He goes on to describe the "huge memory savings" that using the module got them - using the worker process to increase the child capacity of the Apache instance. He recommends keeping it simple when compiling a server to work with the worker functionality and mentions how it can also help with serving static pages right along side the dynamic ones (without a second server!).

Check out the post for a few more tips.

tagged with: apache worker mpm process static dynamic memory

Christopher Jones' Blog:
Temporary LOBS in PHP's OCI8 Extension. Instant Client.
0 comments :: posted Monday January 21, 2008 @ 12:05:00
voice your opinion now!

Christopher Jones talks today on his blog about a bug he's just corrected and integrated into the release of the Oracle Instant Client that lets PHP correctly take advantage of the temporary LOBS functionality.

When PHP is done with the temporary LOB, it needs to tell Oracle to destroy it. If this isn't done, then the temporary LOB will hang around using DB space until the connection is closed. I just merged a fix worked on by Krishna Mohan and myself for bug 43497.

Example code is included showing two instances of its use - a normal use that frees the memory correctly and the other showing how to create the temporary lob to hold the data as needed.

tagged with: temporary lob patch oci8 extension instant client memory leak

Internet Super Hero Blog:
mysqli_debug() - 'm'/dump memory information
0 comments :: posted Tuesday September 04, 2007 @ 09:03:00
voice your opinion now!

A new note on the Internet Super Hero blog talks about a new improvement to the mysqlnd driver support a memory dump option for mysqli_debug.

Andrey has implemented a little mysqlnd only addition to mysqli_debug(): 'm' - dump memory information. It works like the other options described in PHP: Debugging ext/mysqli and mysqlnd with the only difference that it is only available with mysqlnd.

A comparison of the "before option 'm'" and "after option 'm'" is also included.

tagged with: mysqlidebug option memory dump information mysqlnd mysqlidebug option memory dump information mysqlnd


releases code mysql package ajax zend framework cakephp application database zendframework pecl conference security PEAR job developer release book PHP5

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework