Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso's Blog:
Display errors on screen even with display errors = off with PHP
Oct 11, 2011 @ 16:03:07

Gonzalo Ayuso has posted a handy tip to his blog today about showing errors even with "display_errors" being off in your application (could be helpful in debugging those difficult problems).

Shared hosting are cheap, but normally they don’t allow us the use some kind of features. For example we cannot see the error log. That’s a problem when we need to see what happens within our application. Normally I work with my own servers, and I have got full access to error logs. But if we cannot see the error log and the server is configured with display errors = off in php.ini (typical configuration in shared hosting), we have a problem.

His solution involves an "error sniffer" script that captures the issues in a script and echoes them out at the end. In his ErrorSniffer he sets up a custom error, exception and shutdown handler to grab the problems and capture them for later use - including echoing them out to the user if desired.

tagged: error errorsniffer shutdown exception handler github:https://github.com/gonzalo123/ErrorSniffer

Link:

Stephen Colebourne's Blog:
Time-zone database down
Oct 07, 2011 @ 17:48:02

In a new post to Stephen Colebourne's blog today, there's some bad news for developers of software and OSes in general - the timezone database that most software uses is down due to a copyright struggle with a company named Astrolabe, Inc.. How does this relate to PHP? It's the same database the language uses to define its timezones as a part of the DateTime functionality.

The time-zone database (sometimes referred to as the Olson database) is the computing world's principle source of time-zone data. It is embedded in every Unix and Java for starters, and will be used by many websites and probably by your iPhone. You may know it via the IDs, such as "Europe/London" or "America/New_York". But, perhaps you're thinking that time-zones don't change? Well that may be true for America and the EU right now, but certainly isn't for the rest of the world.

Astrolabe claims that the database is a part of the work on their "ACS Atlas" product and the contents of it belong to them.

The impact of this is severe for anyone that uses it - whether via Java, Unix or some other means. This really is the key tool used by everyone to tell the right time globally. We all owe a debt of gratitude to the database maintainers who have worked on this for many, many years at zero cost to the industry and for zero financial gain.

Stephen puts out a call to some of the larger technology leaders/companies to help resolve this situation and/or provide a resource where this information can once again be accessed freely.

tagged: timezone database astrolabe copyright shutdown

Link:

Chris Jones' Blog:
Oracle Database and Instant Client 11.2.0.2 are available on Linux
Sep 16, 2010 @ 14:55:08

On his OTN blog today Chris Jones announces the release of the latest Oracle database and Instant Client libraries (11.2.0.2) for the linux OS:

The Oracle 11.2.0.2 Instant Client libraries are now available on Linux x86 and x86_64 platforms from the Instant Client home page. And they'll soon be uploaded on ULN for customers with Oracle Linux support to install via the update server. If you are one of the (not so?) few users of command line PHP then you might want to grab the new client because it has Oracle bug 9891199 fixed. You'll also need OCI8 1.4.3 from PECL.

The bug this corrected caused a shutdown delay that caused issues with command-line users and their scripts. Unfortunately, the details of the bug are only available to those with an Oracle subscription. This update will not prevent you from connecting to older versions of the Oracle databases.

tagged: oracle database instantclient update pecl shutdown bug

Link:

Eirik Hoem's Blog:
Dying with grace - PHP's register_shutdown_function
Mar 17, 2008 @ 17:02:00

Eirik Hoem has posted a new look at a function that can be amazingly helpful when you have a script with issues that needs a little extra help cleaning up after itself - register_shutdown_function.

Scripts tend to die, and that's not usually nice. We do not want to show the user a fatal error nor a blank page (display errors off) . PHP has a function called register_shutdown_function which lets us set up a function which is called at execution shutdown. What this means is that our function will be executed when our script is done executing / dying and PHP execution is about to shut down.

He suggests various things that can be done with the functionality, including checking for successful script execution (via a false variable that can be checked for success).

tagged: registershutdownfunction shutdown function register die success

Link:

Ilia Alshanetsky's Blog:
PHP 5.2.0 RC3 Released!
Sep 01, 2006 @ 19:10:34

Ilia Alshanetsky has posted about the release of the latest release candidate for the upcoming PHP version, 5.2 - PHP 5.2.0 RC3.

The third and possibly the final release candidate of PHP 5.2.0 is now available for download. The number of changes are fairly small, which is always good when nearing the final release, but there were 2 important fixes that need attention.

He notes that there are only really two major issues that need to be addressed before the final release and are included in this release candidate - a memory corruption issue and a problem in the session shutdown order.

You can download this release now: Bzipped file || Gzipped file.

tagged: release candidate php5.2 session shutdown memory corruption release candidate php5.2 session shutdown memory corruption

Link:

Ilia Alshanetsky's Blog:
PHP 5.2.0 RC3 Released!
Sep 01, 2006 @ 19:10:34

Ilia Alshanetsky has posted about the release of the latest release candidate for the upcoming PHP version, 5.2 - PHP 5.2.0 RC3.

The third and possibly the final release candidate of PHP 5.2.0 is now available for download. The number of changes are fairly small, which is always good when nearing the final release, but there were 2 important fixes that need attention.

He notes that there are only really two major issues that need to be addressed before the final release and are included in this release candidate - a memory corruption issue and a problem in the session shutdown order.

You can download this release now: Bzipped file || Gzipped file.

tagged: release candidate php5.2 session shutdown memory corruption release candidate php5.2 session shutdown memory corruption

Link:


Trending Topics: