Category Archive for 'PHP'

SQL Server 2008, Domain Auth, PHP5, Ubuntu Server

Thursday, January 28th, 2010

May this save you pain.

Configuring Sendmail for UF’s SMTP

Friday, January 15th, 2010

Our Ubuntu web host, hosted with OSG, was not able to send mail (using PHP mail) outside of UF. An OSG tech said our From: header should be a valid address at UF (check) and that the logs at smtp.ufl.edu showed those messages never made it there.
The solution was to configure sendmail to use smtp.ufl.edu [...]

Minify 2.1.3 released

Tuesday, June 30th, 2009

This is how I spend my time off? I squashed a few more bugs and got Minify 2.1.3 finally out the door. It fixes a few HTTP bugs, including working around a Safari/webkit bug that was preventing efficient cache usage. There’s also code to make it far easier to diagnose users’ URI rewriting problems when [...]

Miško Hevery Programming Talks

Monday, June 29th, 2009

Miško Hevery gave several presentations at Google last year that are worth checking out, I think even if you’re familiar with Dependency Injections and unit testing. They cover the ways that global state can sneak into applications, how undeclared dependencies make classes harder to test and reuse, and how DI in general eases a lot [...]

Minify getting out there

Saturday, January 10th, 2009

Interest in Minify seems to be picking up:

Version 2.1.1 is approaching 51K downloads. This is almost 5x the total for all previous versions.
More issues fixed. Several developers have cornered down bugs and submitted patches and we’re getting more experience on misconfigured servers (e.g. invalid DOCUMENT_ROOTs). There’s one particular bug I want fixed before pushing out [...]

Where’s the code?

Monday, October 13th, 2008

Google’s free open source project hosting has been awesome for Minify, so when I was looking around for Subversion hosting for my personal code, I figured why not host it there? So here’s a bunch of my PHP and Javascript code. Hopefully some of it will be useful to people. A few PHP highlights:

HashUtils implements [...]

Getting phpQuery running under XAMPP for Windows

Wednesday, October 8th, 2008

While trying to run the initial test scripts included with phpQuery 0.9.4 RC1, I got the following warning:
Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:\xampp\htdocs\phpQuery-0.9.4-rc1\phpQuery\phpQuery.php on line 280
This is strange because DOMDocument’s constructor has only optional arguments.
As it turns out, XAMPP for Windows ships PHP with the old PHP4 “domxml” extension enabled [...]

Minify 2.1 on mrclay.org

Friday, September 19th, 2008

A new release of Minify is finally out, and among several new features is the “min” application that makes 2.1 a snap to integrate into most sites. This post walks through the installation of Minify 2.1 on this site.

flock() blocking reads

Friday, September 12th, 2008

(Sigh.) After applying recent upgrades to our Red Hat 5 server at work, suddenly PHP file locking blocks the script execution for exactly 30 seconds! Both a shared reading lock (LOCK_SH) and exclusive writing lock (LOCK_EX) do this. This was, shall we say, unpleasant to diagnose. Since we use Cache_Lite (which locks by default) to [...]

Minifying Javascript and CSS on mrclay.org

Thursday, March 27th, 2008

Update: Please read the new version of this article. It covers Minify 2.1, which is much easier to use.
Minify v2 is coming along, but it’s time to start getting some real-world testing, so last night I started serving this site’s Javascript and CSS (at least the 6 files in my WordPress templates) via a [...]