Thanks for such a thorough response, Brad! Your time is very much appreciated.
You've summed-up the situation quite nicely. And you're right about everything:
- Yes, I am using Ubuntu 10.04.
- Yes, I am using Aptitude.
- Yes, there are no packages for mysqlnd available from the Ubuntu 10.04 repositories.
I tried installing the "php5-mysqlnd" package from the "Precise" channel, as recommended in the StackOverflow thread, but the following results:
apt-get --dry-run install php5-mysqlnd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-mysqlnd: Depends: phpapi-20090626
E: Broken packages
Upgrading to Ubuntu 12.04 is on the list of to-dos, but it won't be anytime in the immediate future. So, that option is out.
Compiling PHP myself seems too risky; this is a large-scale production system and there's too much that I would need to test after building from source to make this option practical for me.
It seems we're onto option 3: don't use the constant. And no, I don't "need" it, per se, but it's a nice-to-have. We use Sencha's ExtJS framework and it requires proper data typing. While it is possible to type-cast in ExtJS, I found the native PHP solution (using this constant) to be a more elegant solution.
Oh well. I guess we'll have to wait until we upgrade to PHP 5.4, which will probably happen when we move to Ubuntu 12.04.
Thanks for all your help here, Brad.