The tutorial "Run PHP applications in Apache Geronimo" from IBM developerWorks is for you if you're a PHP developer who would like to start using Apache Geronimo as your application server, or if you're an application developer who would like to start developing PHP applications on your Java 2 Platform, Enterprise Edition (J2EE)-certified Geronimo application server. This tutorial is also for you if you'd like to build PHP and JSP applications that can be used together by sharing sessions.

» Read More

I was waiting for it to be released tomorrow. But no, it is released 2 hours ago with dynamic configuration, components, admin generator, multiple databases, advanced cache, and dozens of other new features. I make it in bold "admin generator" because it is a major enhancement in the 0.6 version.

The 0.6 breaks backward compatibility on some points, but the upgrade process for your projects is mainly automated and does not takes long.

» Read More

What is the better way to write setter and getter in PHP? I mean, is better for a member class to have separate methods for getting and setting its value OR to have only one method for set and get?

» Read More

Francois ZANINOTTO in a post at the Symfony weblog said:
The 0.6 release of symfony is almost ready. We are currently putting the finishing touches on the code and documentation.
...
If everything goes as planned, the 0.6 will be released in a stable state on Friday (Feb. 10th), the day of the PHP Architect podcast. We are looking forward to sharing your first impressions then.

» Read More

I came across a post in comp.lang.php that I posted 3 years ago as response to this question:
I am trying to write a PHP script that will download a list of all the newsgroups on a news server and put them into a MySQL database
...
If someone can point me in the right direction to download the group list using PHP, I think I can figure out how to write it to a database.

I think the response does not get old therefor I'll rewrite it here with some modifications:

» Read More

If you want a copy of "Nusphere PhpEd" the professional integrated development environment for building web-applications using php scripting language, you can buy one or you have to win the programming contest. You have to create a script that simulates the "Texas Holdem Poker" game and send it to contest@php-editors.com before Wednesday 1st March 2006 at 23.59 (GMT).

Good luck.
phpflashcards.com is a site designed to help new and experienced PHP developers hone their skills for certification exams. The site:
- Uses AJax
- Is new: there only few questions and many categories are there with 0 question
- In Beta: needs to be evolved. You can help adding questions and answers. It has wiki-like features so that users can submit and edit questions and answers.

» Read More

Use single quoted strings unless you need to interpolate variables into your string. This saves PHP the time to scan the string for contained variables and saves about 50% execution time. here is a benchmark:

» Read More

Ivo Jansch at the "Achievo blog" has wrote a post about what he calls "Defensive programming". The problem is very simple but not all developers that take care of such thing:

Look at this code:

» Read More

So if your boss asks you for a beautiful backend for the application you are developing, tell him it will take long, generate it in minutes, and go fishing.

The version 0.6 of the Symfony framework is not yet released. Francois ZANINOTTO in a post at the Symfony project home page says that it will soon be released in a stable version. The post links to the detailed description of the new features of the 0.6..

Symfony is a great framwork and every time it comes a new version you think waoo!!!, this is the best, it can't be better.

» Read More

In a previous post entitled "Top 10 PHP MVC frameworks" I gave PRADO the 5th place.

PHPBuilder announced that the version 3.0 alfa of PRADO, the winner of the Zend coding contest, is released. PRADO is component-based and event-driven for developing Web applications in PHP 5.

» Read More

In my previous post "Pearing the Cake" I was looking to see if the separation between the cake framework and the cake application is easy. The answer is NO. There are many path constants used by both the framework and the application in many files. It is possible to do the separation, but I think in this case I will fork an other project from Cake and this wasn't my goal. So I created an other solution. I created a pear package from all files in CakePHP project and add some scripts to make the creation an the deployment of projects and applications easier.

» Read More

I have never read the PHP License before. But I'm surprised to read in The PHP Licence version 3.01 (the latest) that you cannot use the name "PHP" in your product name. But There are many scripts that use "PHP" in their name like phpmyadmin, phpbb, phpnuke, cakephp and many others. Are they all illegal ? do they have a written permission from group@php.net?

» Read More

You probably know that you can use PHP as scripting language. PHP CLI (PHP Command Line Interface) is there for that. It was first released in PHP 4.2.0 as experimental, but as of PHP 4.3.0, it is fully functional and enabled by default. In this example, I will write a very simple script that will list and email me all running process on my linux box and then I will add an entry in the crontab to run the script every day at 23:00

» Read More

CakePHP is an easy to use PHP MVC framework inspired by Ruby On Rails. It is one of the promising frameworks out there. In a previous article entitled "Top 10 PHP MVC frameworks" I gave it the 3rd place.

I tried to see today if it is easy to make it into a pear package. Why a pear package ? Because it will be easier to install with a command like:

pear install cakephp

and to update with a command like:

pear upgrade cakephp

» Read More

After one day from the release of PHP 5.1.2 which fixes about 90 issues, the PHP development team announced today the release of the version 4.2 of the PHP4 branch which fixes and corrects more than 30 issues.

The development team encourages all users of both branches to upgrade to these versions.
I was surprised today when I saw my article "Sending Email in PHP: The hacker way" was selected at PHP Magazine web site in the news page. I didn’t send them the article. I don’t know where they got it from and how they found my site. PHP Zone is only 12 days old and has few visitors per day.

» Read More

I didn’t miss it, but haven’t told about it. The symfony advent calendar is a set of 24 tutorials, published day-by-day last month to illustrate agile development of a web 2.0 application in PHP with the symfony framework. The result is "Askeet", an open source community based Q&A repository.

In a previous post titled "Top 10 PHP MVC frameworks", I chose Symfony as the best PHP MVC framework. It has a very good documentation. The "Symfony advent calendar" is a proof of the quality of symfony documentation.

» Read More

A hacker doesn't really need PHP to send an Email. He needs only a command prompt and a telnet program, that's all. But we are in the PHP Zone, so we will do it with PHP too. All the stuff here is for learning purpose. Don't use it to hack or to spam or to do any other illegal action.

First, a good start is to read the SMTP specification protocol. It helps to understand how things work. You can read the Request For Comments number 2821 document (RFC2821) for that. It's a good idea to read the entire document, but if you haven't the time, just read the chapter 4.

» Read More

I came across a site where the guy out there sells some php scripts. He has a demo page for a $6 rating system. I was wondering, with all the good design of the site, how secure his script is.
First of all, I write about form spoofing and take the guy's script as example after I informed him about the security hole in his stuff and I have seen that he has corrected the problem. I didn't even receive thanks from him :-(

Anyway, look at the demo page (before I do anything):

» Read More