Posted by Daniel | Posted in Development, PHP, Software | Posted on January 28, 2012
0
If you are on a host that has short_open_tag off you won’t be able to use the latest Gallery 3 version(as of this writing). The developers have made this a requirement to allow template development to be a little simpler:
Why do you use PHP’s short open tags?
Short open tags are considered harmful by some, but they result in much tighter syntax in our PHP based templates. Here are some possible ways to print ‘Hello World’ in different template systems:
PHP long tags: <?php echo $Hello_World ?>
php short tags: <?= $Hello_World ?>
ASP: {% $Hello_World %}
Django: {{Hello_World}}
Smarty: {Hello_World}As you can see, PHP with long tags is the noisiest. The main reason for deprecating short tags is because the <? token conflicts with XML tags. In our case, this is highly unlikely to ever be a problem, and even if it is it’s a vanishingly small edge case. We’re optimizing for a good developer experience here by requiring them to type less to do more. If at some point PHP short tags goes away, we can pretty easily convert the entire app over to using long tags.
Short open tags will still be enabled by default in all future versions of PHP. While there was initially an idea to change this in PHP 6, plans have changed and short open tags are here to stay.
Source: http://codex.gallery2.org/Gallery3:FAQ#Why_do_you_use_PHP.27s_short_open_tags.3F
So, if your host doesn’t have short tags on, or if you just don’t like to use code that requires them in general you can try out this fork I made of Gallery v3 on github:
Repo | Download Zip
Posted by Daniel | Posted in Development, PHP, WordPress | Posted on January 25, 2009
6
I’ve seen this in a couple of places already, so I’ll go ahead an post it: If you’re getting an error with your WordPress install similar to: “Fatal error: Cannot redeclare pclziputilpathreduction()” and you’re using WP 2.7+, disable your WPAU – WordPress Automatic Upgrade plugin. This error is caused because in version 2.7 WordPress added the ability to update itself, so this plugin is no longer needed. Here is an image of what the deactivated plugin should look like on the plugins page:

Update: This appears to be fixed in the latest version of the plugin. I was able to enable the plugin and browse around without getting errors. But I don’t see the need for this plugin in WP installs newer than 2.6 anyway.
Posted by Daniel | Posted in Life, PHP | Posted on December 27, 2008
1
I’d like to say Happy Holidays to you and yours this season. No matter your religion, race, nationality, whatever… I wish you the best in the new year.

PHP.net’s holiday logo was finally updated this year. The previous one was a bit dated.

Posted by Daniel | Posted in PHP | Posted on September 21, 2008
0
The next minor version of PHP5(5.3; currently in the alpha stage) will include support for NOWDOC, Lambda functions & Closures, and the much anticipated ternary shortcut(?:). NOWDOCs are basically HEREDOCs, but without interpolation. It’s like using single-quotes versus double-quotes in your strings. Lambda functions allow you to define a single-use function so that it doesn’t have to be defined in the global scope of the script throughout execution. You can exectute things like loops or callbacks without having to define the function ahead of time, and you can return the value of your loops or callbacks to a variable directly. The Ternary shortcut is to allow you to perform a quick if() & return the result, which is what the Ternary operator(s) does already, but you don’t have to specify an “else” value. Most(all?) of these features were discussed for inclusion in PHP6, but it looks like they’ve been backported, which is good. 
Also included will be “limited GOTO” which, as I understand it, will entail using the break language construct to jump to a certain position in the script. The information that I’ve seen is minimal, but this feature could be useful to a lot of people as well.