November 15, 2006

How to Compile PHP5.2 and PHP-GTK2 on Windows using Visual C++ Express

Posted in Planet at 2:05 pm by Elizabeth Marie Smith

Welcome to the wonderful world of Microsoft Windows
“I’m trying to compile PHP on Windows”
Such a simple statement brought various reactions in IRC channels and mailing lists. But invariably I heard the same thing asked.
“Why?”
No, I’m not insane. And I realize that there are some great resources for downloading precompiled ready to go [...]

November 11, 2006

Edin’s Treasure Trove – or how to actually get PHP 5.2 compiling on Windows

Posted in Planet at 9:15 pm by Elizabeth Marie Smith

After Pierre’s nice hint after my rant about compile failures (his comment said download this huge file from Edin’s site…)
I downloaded zip.zip (nice descriptive name eh?) from edin’s site. Deleted my current win32build directory – unzipped that monster, took the php_build, dropped it where win32build was and renamed it (hey, took me a long [...]

November 9, 2006

Compiling PHP5.2 on Windows with .Net toolchain – is it even possible?

Posted in Planet at 8:49 pm by Elizabeth Marie Smith

For three days I fought with compiling PHP5.2 on windows. The point was to be able to compile PHP-GTK2 a little more often (there are at least two bugfixes in CVS that I need for my writer project) and asking on the list/irc for compiled versions got me some smartass answer about “learn to [...]

November 6, 2006

Bundled go-pear.phar broken in 5.2 windows releases

Posted in News at 2:09 pm by Elizabeth Marie Smith

There was an error in go-pear.phar in PHP 5.2 snaps. Greg Beaver fixed it immediately, but the fix was NOT incorporated into the 5.2 releases for windows – however the file for the source releases is correct. If you are getting errors that look like this

Warning: Cannot use a scalar value as an array in
phar://go-pear.phar/PEAR/Command.php on line 268

when installing PEAR please grab the latest version of the go-pear.phar file from cvs . Another option is to use the script from Go-Pear . Save it to your system and run it using the instructions in the comments header and you’ll always have the latest versions of the PEAR package installer.

November 3, 2006

Filter and PHP 5.2

Posted in News at 9:43 am by Elizabeth Marie Smith

In response to a lot of griping from the PHP community about a lack of unified cleaning of user supplied data, 5.2 is introducing a new extension included by default, called filter. (It was available for 5.1 through PECL)
The available functions are now in the manual and there is a short tutorial on how to use filter in your code. There were quite a few arguments going on about the right api for the extension on the internals mailing list. We’ll see how the users like it.

One thing that may not seem obvious at first is that filter does two jobs depending on the type of filter you are using – it sanitizes (or literally filters) using any of the filter constants starting with FILTER_SANITIZE and validates using any of the filters that start with FILTER_VALIDATE – why they decided to combine the two is kind of fuzzy but don’t let it confuse you.

You need to understand the difference because validate filters will return false if the validation failed. The sanitize filters will always return a string.

Give it a try and see if you think it’s useful enough to become the standard for variable sanitizing and validating.

Zendcon talk roundup

Posted in News at 9:25 am by Elizabeth Marie Smith

Zendcon was held October 30 to November 2 in San Jose, California. Several of our members even attended, but while we’re waiting for their opinions on the experience, here’s a round up of available blog postings and slides from speakers from the conference. Now you do miss a lot of information only looking at the slides, but hopefully you can learn something new.

You can also read some roundups and opinions from people at the conference if you’re interested.

Sounds like everyone had a great time and there’s some interesting information there.

November 2, 2006

PHP 5.2 Released

Posted in News at 4:59 pm by Elizabeth Marie Smith

PHP 5.2 is finally released. If you are using 5.0.x or 5.1.x it is recommended that you upgrade. The number of bugfixes and feature enhancements are kind of staggering.

Here are some highlights:

  • E_RECOVERABLE_ERROR was added – basically a recoverable fatal error. Eventually this will replace fatal errors that may muck up your project, but don’t muck up the engine itself – this has also changed the value of E_ALL
  • __toString works in more places (like concatenation) – but objects still can’t be used as array keys (use spl_object_hash()) to get around it
  • Using remote files has been split into two seperate ini entries – allow_url_fopen allows basic file manipulation but not including the files, allow_url_include controls remote file inclusion and is off by default
  • Some “OO purity” checks have been added, and fought over…and finally most regulated to simply E_STRICT
    • abstract static methods are no longer allowed (this is a real point of contention – check the mailing list for further madness)
    • constructors can be in interfaces so you can force argument/return signatures in implemented classes
    • other junk – check the news file included with the download and the upgrade file for further information
  • Extension changes – some added, some removed
  • Memory manager improvements and new default memory limit
  • Hooks for file upload progress implementations (still needs an extension to work – can we get this into pecl sometime soon?)

The bottom line? PHP 5.0.x is really old. PHP 5.1.x is officially obsolete. Upgrading hurts, but an exploited PHP bug would hurt more.

One more item – there is a really nice new windows installer for PHP. It can set up basically every sapi available plus cgi – that means Apache in all its incarnations, IIS, the list goes on. It also allows you to set up additional extensions (the trick is to open the extensions tree on the “Choose Items to Install” page and pick the ones you want…not very intuitive I know) One more caveat? Windows gets so little love that even the link on the downloads page is wrong, and the server is incorrectly sending headers for the msi. Internet Explorer totally ignores this and still downloads it properly. One time when their stupidity comes in handy. But in Firefox you have to open the file in a new tab, immediately head to “save page as” and then close the tab quick before it kills your browser! If you’re a windows user head to the real download the msi and enjoy how easy it is to install PHP on windows

Update: the link issue has been fixed and should propogate to all the mirrors

November 1, 2006

Zend Conference PHP Community Deck of Cards

Posted in News at 6:46 pm by lig

At the Zend conference this year they have a really cool toy out – the PHP Community deck of cards. I am assuming it is based off of last years cards by Cal Evans – but taken to the next step. This year they have a full deck of cards with various members of the PHP community on them include the 4 Queens – Sara Goleman (spades), Laura Thomson ( hearts), Dhwani Vahia (diamonds) and Joyce Park (clubs).

Unfortunately as far as I know they are only available to conference attendees and those who are featured in the deck.  To see the full deck of cards check out here.

google