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

PHP.net:
PHP 5.4.35, 5.5.19 and 5.6.3 Released
Nov 14, 2014 @ 18:08:25

Several new versions of the PHP language have been released, including several bugfixes and security-related issues (including CVE-2014-3710. Updates are available for all current major versions:

Upgrading is recommended, especially if you're making use of the fileinfo functionality. You can get these latest versions from the main downloads page (or the Windows.php.net). You can find out about the other changes in these releases in the Changelog

tagged: language release security update php54 php55 php56 fileinfo

Link: http://php.net/archive/2014.php#id2014-11-13-3

C. Sadeesh Kumar's Blog:
Smart File Type Detection Using PHP
Aug 29, 2011 @ 17:07:53

In a new post today C. Sadeesh Kumar has a quick tip to help your script detect file types without having to rely on the extension to be correct.

In most web applications today, there is a need to allow users to upload images, audio and video files. Sometimes, we also need to restrict certain types of files from being uploaded – an executable file being an obvious example. Security aside, one might also want to prevent users from misusing the upload facility, e.g. uploading copyrighted music files illegally and using the service to promote piracy! In this article, we’ll look into a few ways in which we can achieve this.

The trick to his example is in using the Fileinfo PECL extension. With the help of this extension you can look inside the file and pick out the "magic bytes" (the first few bytes of a file) and see what MIME type the file really is. He includes a simple example of using the extension on a file and a file upload script that checks the type and handles the file accordingly.

tagged: file type detection fileinfo extension pecl tutorial

Link:

Johannes Schluter's Blog:
A hidden gem in PHP 5.3: fileinfo
Dec 17, 2008 @ 15:35:59

Johannes Schluter has pointed out a "hidden gem" for PHP 5.3 in his latest blog post - the fileinfo extension.

This series is not meant to be complete but some personal choice, these blog postings are also no replacement for documentation, but just pointers. My goal is that you try out 5.3 right now so we can fix bugs as soon as possible before releasing it The NEWS file has a quite short entry for my first subject: Added fileinfo extension as replacement for mime_magic extension. (Derick)

He looks at one situation where the extension could come in very handy - getting the content type of the file for a download push - as well as why its better than the older mime_content_type function.

tagged: php5 gem fileinfo mimecontenttype function extension hidden

Link:

Zend Developer Zone:
Zend Weekly Summaries Issue #322
Jan 29, 2007 @ 18:27:00

The latest weekly summary for the PHP mailing lists has been posted over on the Zend Developer Zone. This week, discussions included:

  • Sandboxed semaphores
  • Focus on *printf [continued]
  • PHP 5.2.1 RC2 and PHP 4.4.5 RC1
  • It's all in the HEAD
Descriptions of each of the headings are provided, including code and a "short version" for those on the run.

Be sure to check back each week for a new summary.

tagged: zend weekly summary semaphore fileinfo relrease fastcgi head openssl zend weekly summary semaphore fileinfo relrease fastcgi head openssl

Link:

Zend Developer Zone:
Zend Weekly Summaries Issue #322
Jan 29, 2007 @ 18:27:00

The latest weekly summary for the PHP mailing lists has been posted over on the Zend Developer Zone. This week, discussions included:

  • Sandboxed semaphores
  • Focus on *printf [continued]
  • PHP 5.2.1 RC2 and PHP 4.4.5 RC1
  • It's all in the HEAD
Descriptions of each of the headings are provided, including code and a "short version" for those on the run.

Be sure to check back each week for a new summary.

tagged: zend weekly summary semaphore fileinfo relrease fastcgi head openssl zend weekly summary semaphore fileinfo relrease fastcgi head openssl

Link:

Ilia Alshanetsky's Blog:
GDChart & Fileinfo Releases
Jan 04, 2006 @ 12:48:21

According to this new post from Ilia Alshanetsky's blog, he's wrapped up new versions of his PECL extensions, Fileinfo and GDChart.

Just finished packaging Fileinfo 1.0.3 that finally builds on both PHP 5.1 and 5.0 properly. You can download the new version by running "pecl install fileinfo" or download the tgz file from here.

I've also made the release of GDChart 0.2 that is nearly a complete rewrite of the extension, originally written by Rasmus that allows it to work with PHP 5.1. This extension wraps around the bundled gdchart library and allows you with just a few lines of code draw 20 different graphs types.

The GDChart package looks especially useful, making it a simple matter of feeding in the data you want to render and out popps a graph. Previously, there's been this functionality via other scripts, but it's nice to see something native...

tagged: pecl fileinfo gdchart new releases pecl fileinfo gdchart new releases

Link:

Ilia Alshanetsky's Blog:
GDChart & Fileinfo Releases
Jan 04, 2006 @ 12:48:21

According to this new post from Ilia Alshanetsky's blog, he's wrapped up new versions of his PECL extensions, Fileinfo and GDChart.

Just finished packaging Fileinfo 1.0.3 that finally builds on both PHP 5.1 and 5.0 properly. You can download the new version by running "pecl install fileinfo" or download the tgz file from here.

I've also made the release of GDChart 0.2 that is nearly a complete rewrite of the extension, originally written by Rasmus that allows it to work with PHP 5.1. This extension wraps around the bundled gdchart library and allows you with just a few lines of code draw 20 different graphs types.

The GDChart package looks especially useful, making it a simple matter of feeding in the data you want to render and out popps a graph. Previously, there's been this functionality via other scripts, but it's nice to see something native...

tagged: pecl fileinfo gdchart new releases pecl fileinfo gdchart new releases

Link:


Trending Topics: