Tuesday, 28 September 2010 02:46 PM

A PHAR Problem

I have been playing around with the new PHAR extension in PHP 5.3 and came into a problem that caused me a few days head scratching.

As PHAR is new to PHP there really is not a lot of real world examples and tutorials, so the problem:

I compiled a new PHAR file according to the example on php.net ran the example in a browser only to come up with a blank screen/web page Cry. I knew the PHAR extension was working because I could access the image files in it, it just wasn't parsing the PHP coded pages.

With a lot of searching through google I came accross the solution.

I had compiled PHP with the suhosin extension and this was blocking the PHAR from working so the solution is to put this code in php.ini file:

 

Whitelist Phar in Suhosin
suhosin.executor.include.whitelist="phar"

 

And the magic worked since my PHAR file is working now Cool

 

Last Updated ( Tuesday, 05 October 2010 09:58 AM )

Contacts

If you would like to contact me regarding the range of serves that I can offer. Please use the details below.
Office: 01767 631679
email: Shaun Freeman

Ubuntu

Donate

If you find this website useful and you would like to contribute feel free to by using the button below.

Links

Web Design - A list of website designers in Bedfordshire.

Site Specs

Site best viewed in a screen resolution of 1024x768 & 32 bit colours or higher using the latest version of Firefox