Saturday, July 15, 2006

Implementing Additional Methods with mysqli and PHP 5

Welcome to the third installment of the series "Using mysqli in PHP5." Comprised of three articles, this series teaches you how to use the most important methods and properties included in the "mysqli" extension, which is bundled with PHP 5, in order to get the most out of the MySQL 4.1 database server and above.

Introduction

If you've been reading up my two previous articles, then quite probably you'll know how to utilize the mysqli's core methods for connecting to MySQL, as well as performing many other useful tasks, such as running single and multiple queries, preparing SQL statements, and using the COMMIT and ROLLBACK features found in MySQL 4.1 and up. What's more, you'll surely recall that this extension allows you to handle one or more result sets via an object-oriented approach, which is very convenient if you're particularly inclined to work with object-based applications.Additionally, I covered, with numerous hands-on examples, other combinations of handy methods and properties, in order to show you how to perform some common MySQL-related operations. In this case obviously I'm talking about counting the number of rows affected after running a specific query, or determining the number of rows returned by a result set, among others. Of course, one of the best points regarding the use of the "mysql" library rests on how easily it allows you to accomplish all the things (and more) that I mentioned before by using an object-oriented approach, without the need to define custom classes. Once the library is available to your system, you can go ahead and start writing down object-based code.Well, if I stand behind the previous paragraphs, I must say that the "mysqli" extension offers an impressive set of features, which can be implemented right from the very beginning. However, and speaking of its cool features, in the next few lines, I'm going to show you a few more. Over the course of this last tutorial, I'll be covering some other methods and properties, mainly aimed at finding the IDs after inserting new rows, and obtaining information about specific table fields.Now, be patient and start reading the last chapter of this story. Let's do it together!

Next: Fetching rows, finding IDs and moving result set pointers: implementing the “fetch_array()” and “data_seek()” methods >>

Tuesday, June 20, 2006

PHP DEVELOPMENT :: GOOGLE CALENDARE

Now you can get the word out to anyone, because we just added a new publishing feature that lets you show an interactive calendar to others -- even if they don't use Google Calendar.

Read more at googleblog.blogspot.com...

Saturday, June 10, 2006

Developing PHP the Ajax way

Asynchronous JavaScript and XML ( Ajax ), is arguably the most popular new Web technology. In this two-part "Developing PHP the Ajax way" series, you will create a simple photo album as an online Web application, entirely in PHP and the Simple Ajax Toolkit (Sajax). You'll begin by writing a simple photo album using the standard method of PHP development and later apply Sajax to make it an active Web application.

Read more at www-128.ibm.com/develop...

The Basics of Serializing Objects in PHP

Object serialization in PHP is very easy, and can be used for a variety of different purposes. It can be used to perform some fairly complex operations, in fact. This article, the first of a three-part series, introduces you to object serialization and a number of the tasks for which you can put this approach to use.

Read more at www.devshed.com/c/a/ PHP ...

Saturday, May 27, 2006

PHP DEVELOPMENT: Picasa for Linux

Let's say you happily use Linux, but you sometimes find yourself wishing you had access to interesting new apps that launch for Windows but not Linux. And maybe, like a lot of us, you have a lot of photos stored on your personal machine, and you've read about or even tried Google's photo organizer, Picasa. But using it means switching to Windows, even temporarily. (We know--thanks but no thanks.)

Read more at googleblog.blogspot.com...

Tuesday, May 23, 2006

An Introduction to Sockets in PHP

Working with low-level sockets can be a painful task in PHP. Fortunately, PHP offers a nice library of socket handling functions to make your life easier. If you do a lot of network programming in PHP, you will want to check out this three-part series, which starts with the basics and takes you through more advanced approaches. This article is the first one in the series.

Read more at www.devshed.com/c/a/PHP...

Thursday, May 18, 2006

PHP IDE Debug Protocol

Lately there were many questions and comments on blogs and in PHP related forums regarding the debugger protocol, which will be used in the PHP IDE project at Eclipse.org. For those of you who are not familiar with the ' debug protocol ' term or do not know what I am talking about here is a short explanation. PHP IDE Debug Protocol

Wednesday, May 17, 2006

Making AJAX development easier

AJAX has the power to make your site more compelling and more dynamic, but AJAX development is often complicated, with much of the development time spent working around browser quirks and the fragility of AJAX components. Trust us, we know--the development of our own AJAX apps, like Google Maps and Google Calendar, caused us no small amount of AJAX-induced frustration.

Making AJAX development easier

Monday, May 15, 2006

Creating ZIP and TAR archives on the fly with PHP

In this tutorial you will learn how to create ZIP and TAR archives dynamically using PHP and the PEAR::Archive_Zip and PEAR::Archive_Tar packages.

Creating ZIP and TAR archives on the fly with PHP

Thursday, May 11, 2006

PHP Optimization

Php optimization is the skill of fine tuning an application to extract maximum performance with minimum server load. Many of my clients in the past have wondered why I spend extra hours just to get the script execution time to be cut down by 1 second.

PHP Optimization

PHP GAINS IN THE TIOBE PROGRAMMING COMMUNITY INDEX

The TIOBE Programming Community Index has been updated for April 2006 showing their view on the status of programming languages in the development community. PHP moves up a spot from 5th to 4th. The long-in-the-tooth C fades back a bit relinquishing 1st place to Java, while C++ gains on its brethren with PHP biting on its heels (a margin of 0.02 between their percentages). PHP has a higher climb rate so expect another big move in the coming year.

Monday, May 08, 2006

PHP : Zend Framework

PHP Powers the WebNow, the world's most popular web programming language gets even better with an easy to use framework for developing the next generation of web applications.

Read more at framework.zend.com/

PHP Documentation

PHP Documentation - little collection of the docs,tutorials and howtos related to Linux/Unix programming, system administration and web development. PHP Documentation

Read more at www.php.net/docs.php

Friday, May 05, 2006

PHP 5.1.4

PHP 5.1.4 fixes critical error in PHP 5.1.3 with the $_POST array.
All people that has upgraded to PHP 5.1.3 are recommended to download upgrade to PHP 5.1.4 from official PHP.net site:

Download PHP 5.1.4

Completely free web design contract - checked in 2006 by qualified lawyers

Although not directly PHP-related, I'm aware that a lot of people who look over this blog are freelance or part time coders. It's always important to make sure that both you and your client stand on the same level, and as such, MediaSurgery have been kind enough to release their web design contract (checked by a lawyer) for free. The contract is available in both Open Office and Microsoft Word formats. Go get it!

Completely free web design contract - checked in 2006 by qualified lawyers

Wednesday, May 03, 2006

PHP 5.1.3. Release Announcement

The PHP development team is proud to announce the release of PHP 5.1.3. This release combines small number of feature enhancements with a significant amount of bug fixes and resolves a number of security issues. All PHP users are encouraged to upgrade to this release as soon as possible.

The security issues resolved include the following:

  • Disallow certain characters in session names.
  • Fixed a buffer overflow inside the wordwrap() function.
  • Prevent jumps to parent directory via the 2nd parameter of the tempnam() function.
  • Enforce safe_mode for the source parameter of the copy() function.
  • Fixed cross-site scripting inside the phpinfo() function.
  • Fixed offset/length parameter validation inside the substr_compare() function.
  • Fixed a heap corruption inside the session extension.
  • Fixed a bug that would allow variable to survive unset().

The feature enhancements include the following notables:

  • The use of the var keyword to declare properties no longer raises a deprecation E_STRICT.
  • FastCGI interface was completely reimplemented.
  • Multitude of improvements to the SPL, SimpleXML, GD, CURL and Reflection extensions.
  • Support for many additional date formats added to the strtotime() function.
  • A number of performance improvements added to the engine and the core extensions.
  • Added imap_savebody() that allows message body to be written to a file.
  • Added lchown() and lchgrp() to change user/group ownership of symlinks.
  • Upgraded bundled PCRE library to version 6.6

The release also includes over 120 bug fixes with a focus on:

  • Make auto_globals_jit work without too many INI changes.
  • Fixed tiger hash algorithm generating wrong results on big endian platforms.
  • Fixed a number of errors in the SOAP extension.
  • Fixed recursion handling in the serialize() functionality.
  • Make is_*() function account of open_basedir restrictions.
  • Fixed a number of crashes in the DOM and PDO extensions.
  • Addressed a number of regressions in the strtotime() function.
  • Make memory_limit work in Win32 systems.
  • Fixed a deadlock in the sqlite extension caused by the sqlite_fetch_column_types() function.
  • Fixed memory leaks in the realpath() cache.
For a full list of changes in PHP 5.1.3, see the ChangeLog

Dipping a Toe into Rapid Application Development for PHP

Dipping a Toe into Rapid Application Development for PHP: "[Summary]



As Andi Gutmans presented at his php|tek keynote, and reinforced by IBM in their showing of QEDWiki, there is indeed a place in PHP for the Rapid Application Development. As part of Andi’s keynote, he spoke about component architectures and showed a quick demo of what that might look like in the future. He did so with a proof of concept called phpBlox. Now, don’t get too excited, it looks nice and worked for the demo, but we are still only at the beginning of the Road to RAD."

Sunday, April 30, 2006

Google Maps

The Google Maps API supports the same browsers as the Google Local site. Since different applications require different behaviors for users with incompatible browsers, the Maps API provides a global method (GBrowserIsCompatible()) to check compatibility, but it does not have any automatic behavior when it detects an incompatible browser. The script http://maps.google.com/maps?file=api&v=2 can be parsed in almost every browser without errors, so you can safely include that script before checking for compatibility.

Read more at googleblog.blogspot.com...

Openomy PHP API

Openomy is an online file system. You can store files on Openomy and access them from any computer. Openomy organizes files and users via tags (as opposed to folders). You can choose to keep your files guarded by Openomy, or allow certain outside applications (of your choice) to do new and interesting things with your data.

Openomy PHP API

Friday, April 28, 2006

A WEEK IN PHPWORLD #3

Welcome back to the third edition of "a week in phpworld" - my subjective view at the highlights that happened last week in the phpworld.

PHP's World

Ilia Alshanetsky finally released the third Release Candidate for PHP 5.1.3 on friday. Somehow confusing to me, that one can't find the fix of the security-holes that lead to the "unofficial" RC3 i reported about last week in the ChangeLog of RC3. Instead you find them in the ChangeLog of RC2 - a RC that was actually released at end of march but now is timed to 6th of april. Confused now, too? However, Ilia asked the community once more to test the RC3 as much as possible - looking to release a final version of PHP 5.1.3 this week thursday. You can find the source download as usual at Ilias php.net-home and the binaries for windows at Edin's php.net-home.
Some other good news come from : Scott Mattocks announced a Release plan for PHP-GTK 2-alpha1 in the weekly PHP-GTK News. According to this plan, there are only three main-issues left preventing an immediately release. First there is a review for some patches needed , next some windows-bugs has to be fixed and last there is a need for update of the packaging script.

A WEEK IN PHPWORLD #3