Friday, November 30, 2007

PHP Manual Updates

The PHP documentation team is proud to present to the PHP community a few fixes and tweaks to the PHP Manual, including:an improved, XSL-based build system that will deliver compiled manuals to mirrors in a more timely manner (goodbye dsssl)manual pages can now contain images (see imagearc() for an example)updated function version information and capture system (fewer "no version information, might be only in CVS" messages)... and more to come!Please help us improve the documentation by submitting bug reports, and adding notes to undocumented functions.

PHP 5.2.5 Released

The PHP development team would like to announce the immediate availability of PHP 5.2.5. This release focuses on improving the stability of the PHP 5.2.x branch with over 60 bug fixes, several of which are security related. All users of PHP are encouraged to upgrade to this release.

Further details about the PHP 5.2.5 release can be found in the release announcement for 5.2.5, the full list of changes is available in the ChangeLog for PHP 5.Security Enhancements and Fixes in PHP 5.2.5:Fixed dl() to only accept filenames. Reported by Laurent Gaffie.Fixed dl() to limit argument size to MAXPATHLEN (CVE-2007-4887). Reported by Laurent Gaffie.Fixed htmlentities/htmlspecialchars not to accept partial multibyte sequences. Reported by Rasmus LerdorfFixed possible triggering of buffer overflows inside glibc implementations of the fnmatch(), setlocale() and glob() functions.

Reported by Laurent Gaffie.Fixed "mail.force_extra_parameters" php.ini directive not to be modifiable in .htaccess due to the security implications. Reported by SecurityReason.Fixed bug #42869 (automatic session id insertion adds sessions id to non-local forms).Fixed bug #41561 (Values set with php_admin_* in httpd.conf can be overwritten with ini_set()).For users upgrading to PHP 5.2 from PHP 5.0 and PHP 5.1, an upgrade guide is available here, detailing the changes between those releases and PHP 5.2.5.

Wednesday, November 28, 2007

What can PHP do?

PHP scripts are used in Three Main Areas.

Server-side scripting:

This is the most traditional and main target field for PHP. You need three things to make this work. The PHP parser (CGI or server module), a web server and a web browser. You need to run the web server, with a connected PHP installation. You can access the PHP program output with a web browser, viewing the PHP page through the server. All these can run on your home machine if you are just experimenting with PHP programming.

Command line scripting:

You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks.

Writing desktop applications:

PHP is probably not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client-side applications you can also use PHP-GTK to write such programs. You also have the ability to write cross-platform applications this way. PHP-GTK is an extension to PHP, not available in the main distribution.

What is PHP?

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. It refers to "PHP: Hypertext Preprocessor" which means that PHP handles data before it becomes HTML. According to the official PHP Web site, PHP is a server-side, cross-platform, HTML embedded scripting language..

Its advantage over JavaScript is that it runs on the web server rather than on the viewer's PC or Mac. PHP can be used for the same kind of applications as ASP and .NET but is free and open source.