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

David Soria Parra's Blog:
PHP 5.3.99-dev and DTrace Part I
Apr 29, 2010 @ 17:17:32

As David Soria Parra mentions in a recent post to his blog, the DTrace functionality has been backported to the PHP 5.3 branch and gives developers a bit more information about what's happening inside their applications.

For those not following the PHP development. We backported the DTraces probes from the abandoned PHP 6.0 branch, back to the new trunk PHP 5.3.99-dev. It is called 5.3.99 because the PHP dev community has not decided yet on a version number (5.4 or 6.0).

He gives the configure line to get it working on Solaris and Mac OSX and a sample line of code to ensure everything's working correctly. The results show the full execution of the example. This functionality can replace this extension from the PECL repository.

tagged: dtrace trace backport osx solaris

Link:

Rob Thompson's Blog:
PHP and Solaris - getcwd() Behavior
Nov 12, 2007 @ 19:47:00

Rob Thompson passed along some information that PHP users running on Solaris might want to check out - the slightly buggy behavior of the PHP getcwd function on the platform.

Many functions within the PHP codebase relied upon a universally working getcwd() [C] call to expand paths and to find out where a script is being executed. In particular, Solaris does not assume that getcwd() is a privilege that should be granted to users in directories that don't have 'r' (read) permission, even if it has 'x' (execute) permissions. [...] Under Linux, getcwd() behaves normally but under Solaris, getcwd() does not work with the --x restrictive permissions.

He does note, happily, that this issue is cleared up with an upgrade to PHP 5.2.5 as soon as possible. He had code snippets included in the post so you can test your installation for the problem too.

tagged: solaris getcwd behavoir update php5 permissions solaris getcwd behavoir update php5 permissions

Link:

Rob Thompson's Blog:
PHP and Solaris - getcwd() Behavior
Nov 12, 2007 @ 19:47:00

Rob Thompson passed along some information that PHP users running on Solaris might want to check out - the slightly buggy behavior of the PHP getcwd function on the platform.

Many functions within the PHP codebase relied upon a universally working getcwd() [C] call to expand paths and to find out where a script is being executed. In particular, Solaris does not assume that getcwd() is a privilege that should be granted to users in directories that don't have 'r' (read) permission, even if it has 'x' (execute) permissions. [...] Under Linux, getcwd() behaves normally but under Solaris, getcwd() does not work with the --x restrictive permissions.

He does note, happily, that this issue is cleared up with an upgrade to PHP 5.2.5 as soon as possible. He had code snippets included in the post so you can test your installation for the problem too.

tagged: solaris getcwd behavoir update php5 permissions solaris getcwd behavoir update php5 permissions

Link:

Bob Majdak's Blog:
Compile That PHP-GTK2, and More
Nov 06, 2007 @ 16:23:00

The PHP-GTK Community site has pointed out a work-in-progress guide to compiling PHP-GTK2 from Bob Majdak:

This document does not care about what distribution you use, these instructions will work on all shapes of Linux, FreeBSD, or Solaris. It is up to you to translate any line into the required line for your distribution. I will however tell you right now, if you are on Ubuntu and never done this before, you are missing pretty much every package you need.

There is one platform that there's not instructions for, though - Windows. All of the other major platforms are presented. Tools needed to compile your own setup include Autotools, the usual make tools, GTK+, a recent version of PHP (5.2 or higher) and LibGlade.

tagged: compile phpgtk gtk tutorial linux freebsd solaris compile phpgtk gtk tutorial linux freebsd solaris

Link:

Bob Majdak's Blog:
Compile That PHP-GTK2, and More
Nov 06, 2007 @ 16:23:00

The PHP-GTK Community site has pointed out a work-in-progress guide to compiling PHP-GTK2 from Bob Majdak:

This document does not care about what distribution you use, these instructions will work on all shapes of Linux, FreeBSD, or Solaris. It is up to you to translate any line into the required line for your distribution. I will however tell you right now, if you are on Ubuntu and never done this before, you are missing pretty much every package you need.

There is one platform that there's not instructions for, though - Windows. All of the other major platforms are presented. Tools needed to compile your own setup include Autotools, the usual make tools, GTK+, a recent version of PHP (5.2 or higher) and LibGlade.

tagged: compile phpgtk gtk tutorial linux freebsd solaris compile phpgtk gtk tutorial linux freebsd solaris

Link:

Zend Developer Zone:
Tim Bray Explains Why Solaris in a Good Choice for PHP Developers
Oct 20, 2006 @ 14:51:56

Over on the Zend Developer Zone, Cal Evans shares part of a mini-interview (one question, really) where Cal asked Tim about Solaris as a hosting and development platform for PHP.

Tim will be at ZendCon this year participating in a panel discussion titled "How Do The Stacks Stack Up?" I talked with Tim by phone because I was curious why PHP developers should consider Solaris as a development and deployment environment. Here's what Tim had to say.

His answer was based around three main points - observability, virtualization "stuff", and the ZFS filesystem all Solaris systems come installed with. And, of course, he explains the thought process behind each (briefly).

tagged: solaris interview timbray developer question three points solaris interview timbray developer question three points

Link:

Zend Developer Zone:
Tim Bray Explains Why Solaris in a Good Choice for PHP Developers
Oct 20, 2006 @ 14:51:56

Over on the Zend Developer Zone, Cal Evans shares part of a mini-interview (one question, really) where Cal asked Tim about Solaris as a hosting and development platform for PHP.

Tim will be at ZendCon this year participating in a panel discussion titled "How Do The Stacks Stack Up?" I talked with Tim by phone because I was curious why PHP developers should consider Solaris as a development and deployment environment. Here's what Tim had to say.

His answer was based around three main points - observability, virtualization "stuff", and the ZFS filesystem all Solaris systems come installed with. And, of course, he explains the thought process behind each (briefly).

tagged: solaris interview timbray developer question three points solaris interview timbray developer question three points

Link:

Wez Furlong's Blog:
Undefined Behaviour
Apr 29, 2006 @ 12:59:43

Spurred on by some comments made in a thread on the php internals mailing list, Wez Furlong has posted this new item on his blog to help clear up some of the confusion around some "undefined behaviour" in the PDO libraries.

In this thread on the php internals list, Kevin is asking why the handling of whitespace in certain PDO DSNs is inconsistent. I go on to point out that the manual doesn't say anything about whitespace in DSNs, and that all the documented examples have no whitespace around the DSN parameters.

This is an example of undefined behaviour. The PHP manual doesn't define what happens when you put whitespace in there. That doesn't tell you anything at all about whether you should or should not do that. It might work now, and it might work next week. In 6 months time, when you application is widely deployed and someone changes an apparently unrelated part of their system, it might NOT work and might result in someone getting paged at 3am trying to figure out what the mysterious problem is.

Wez goes on to mention that there are some issues with this in the Solaris manual pages as well, as based on others running into this same sort of problem. The realy key here, though, is how the documenttion is defined. Developers, in his opinion, show always treat situations that aren't expressly defined by the manual as a "situation is undefined" rather than making their own expectations.

tagged: undefined behaviour pdo library documentation solaris undefined behaviour pdo library documentation solaris

Link:

Wez Furlong's Blog:
Undefined Behaviour
Apr 29, 2006 @ 12:59:43

Spurred on by some comments made in a thread on the php internals mailing list, Wez Furlong has posted this new item on his blog to help clear up some of the confusion around some "undefined behaviour" in the PDO libraries.

In this thread on the php internals list, Kevin is asking why the handling of whitespace in certain PDO DSNs is inconsistent. I go on to point out that the manual doesn't say anything about whitespace in DSNs, and that all the documented examples have no whitespace around the DSN parameters.

This is an example of undefined behaviour. The PHP manual doesn't define what happens when you put whitespace in there. That doesn't tell you anything at all about whether you should or should not do that. It might work now, and it might work next week. In 6 months time, when you application is widely deployed and someone changes an apparently unrelated part of their system, it might NOT work and might result in someone getting paged at 3am trying to figure out what the mysterious problem is.

Wez goes on to mention that there are some issues with this in the Solaris manual pages as well, as based on others running into this same sort of problem. The realy key here, though, is how the documenttion is defined. Developers, in his opinion, show always treat situations that aren't expressly defined by the manual as a "situation is undefined" rather than making their own expectations.

tagged: undefined behaviour pdo library documentation solaris undefined behaviour pdo library documentation solaris

Link:


Trending Topics: