PHP and MySQL

New: Visit my "PHP Musings" blog for more on the topic of PHP, MySQL, and related (and maybe unrelated) subjects.

PHP is a general-purpose, multi-platform scripting language optimized for use with web applications. MySQL is a multi-platform relational database management system. PHP includes many functions specifically for working hand-in-hand with MySQL; and as both are open-source programs, they are very popular for use in creating interactive web applications. As such, they have become my tools of choice for web programming.

Latest News from PHP.net

PHP 5.3.10 Released! (2012-02-02)

The PHP development team would like to announce the immediate availability of PHP 5.3.10. This release delivers a critical security fix.Security Fixes in PHP 5.3.10:Fixed arbitrary remote code execution vulnerability reported by Stefan Esser, CVE-2012-0830.All users are strongly encouraged to upgrade to PHP 5.3.10.For source downloads please visit our downloads page, Windows binaries can be found on windows.php.net/download/. (more...)

PHP 5.4.0 RC6 released (2012-01-24)

The PHP development team announces the 6th release candidate of PHP 5.4. PHP 5.4 includes new language features and removes several legacy (deprecated) behaviours. Windows binaries can be downloaded from the Windows QA site. THIS IS A RELEASE CANDIDATE - DO NOT USE IT IN PRODUCTION!. This is the 6th release candidate. The release candidate phase is intended as a period of bug fixing prior to the stable release. No new features should be included before the final version of PHP 5.4.0. The 6th release candidate focused on improving traits. Please test them carefully and help us to identify bugs in order to ensure that the release is solid and all things behave as expected. Please take the time to test this release candidate against your code base and report any problems that you encounter to the QA mailing list and/or the PHP bug tracker. A complete list of changes since the last release candidate can be found at NEWS The next candidate will be released on Feb 2. (more...)

PHP 5.3.9 Released! (2012-01-10)

The PHP development team would like to announce the immediate availability of PHP 5.3.9. This release focuses on improving the stability of the PHP 5.3.x branch with over 90 bug fixes, some of which are security related.Security Enhancements and Fixes in PHP 5.3.9:Added max_input_vars directive to prevent attacks based on hash collisions. (CVE-2011-4885)Fixed bug #60150 (Integer overflow during the parsing of invalid exif header). (CVE-2011-4566)Key enhancements in PHP 5.3.9 include:Fixed bug #55475 (is_a() triggers autoloader, new optional 3rd argument to is_a and is_subclass_of).Fixed bug #55609 (mysqlnd cannot be built shared)Many changes to the FPM SAPI moduleFor a full list of changes in PHP 5.3.9, see the ChangeLog. For source downloads please visit our downloads page, Windows binaries can be found on windows.php.net/download/.All users are strongly encouraged to upgrade to PHP 5.3.9. (more...)

Articles and Scripts

The following are a few articles/scripts I've cobbled together at one point or another regarding common issues in the use of these tools:

Links

Here are a few links to on-line references and sources which I frequently use:

Forcing a File Download

This is just a little tip I picked up at the PHPBuilder.com forum to ensure that a file is presented for downloading rather than being automatically opened by a browser.

<?php
header('Content-Length: '.$fileSize);
header('Content-Type: '.$mimeType);
header('Content-Disposition: attachment; filename="'.$fileName.'"');
header('Content-Transfer-Encoding: binary');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');