Posts tagged php

php-build on Centos 6

While it's likely I'm the only person in the world using Centos, this is provided just in case. To get multiple versions of PHP running nicely under Centos, first install php-build. You'll need to manually patch it if you have /tmp mounted with noexec. After that:

yum install gcc
yum install libxml2-devel
yum install curl-devel
yum install libjpeg-devel
yum install libpng-devel
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install libmcrypt-devel
yum install readline-devel
yum install libtidy-devel
yum install libxslt-devel

php-build -i development 5.5.8 /usr/local/php-5.5.8
php-build -i development 5.4.24 /usr/local/php-5.4.24
php-build -i development 5.3.28 /usr/local/php-5.3.28
php-build -i development 5.2.17 /usr/local/php-5.2.17

ln -s /usr/local/php-5.5.8/bin/php /usr/bin/php-5.5.8
ln -s /usr/local/php-5.4.24/bin/php /usr/bin/php-5.4.24
ln -s /usr/local/php-5.3.28/bin/php /usr/bin/php-5.3.28
ln -s /usr/local/php-5.2.17/bin/php /usr/bin/php-5.2.17

Easy!

Github March Wrapup

I've posted a bunch of projects to Github in the last few months and haven't linked to them anywhere, so here's a quick roundup of recently notable projects:

  • lib_timezones - A PHP and JS library to handle user-specified timezones properly, with reasonable client-side auto detection.
  • lib_classsify - A partial PHP port of Github's own linguist which can automatically detect the programming language, given a code fragment.
  • js-emoji - A JavaScript library to allow display of Emoji in then browser for OSs without native support (anything that's not OSX 10.8 or iOS 6)
  • lib_autolink - My old PHP URL-detection and linking library, updated to handle multiple protocols.
  • lib_solr_query - A PHP library to turn user-entered complex search queries into valid SOLR query syntax. Supports phrases, booleans, nesting, assertions and more.

Shut up and use bcrypt

With all the current excitement about leaked password databases, I thought I'd take the time to make doing it the right way a bit easier. If you're working on a PHP app, start using lib_bcrypt right now.

Facebook Engineering Process

A nice read about facebook's release engineering approach. This should all sound very familiar to Flickr alumni.

18th October, 9:01 pm

twig looks neat, if i ever get sick of smarty. syntax is a little odd though

7th June, 5:08 pm

php sadness points out a lot of real issues, but it's still the best tool for many problems

25th April, 11:23 pm

i'm still using smarty and you're no longer on the internet. i think i win this round

17th November, 11:07 pm

i'm generally skeptical of new things, but fire php seems pretty nice. stuffing that in headers is a lovely way to debug json ajax responses

24th October, 9:18 am

a couple of interesting alternatives to phpMyAdmin, both simpler: sqlbuddy looks like a really well done minimalist effort, while phpMiniAdmin like like PMA from 10 years ago.

21st October, 7:12 pm

interested in using emoji in your web app? then you should read this guide and then take a look at the code

16th May, 10:54 pm

a little project from last week - iTunesRemote. control iTunes over the web

6th May, 10:57 am

hackernews is just full of morons on most days

5th May, 9:32 pm

i'm the king of php! err, sorry rasmus

23rd March, 2:59 pm

a couple of patches for my php4 OAuth library - it now correctly url-encodes spaces (that explains the intermittent failure!) and works with E_WARNINGS. now with a test case too :)

1st March, 11:40 pm

after a weekend of dorking around with bidirectional text on the web, i've put together a short guide to understanding bidirectional text in unicode. comments welcome

28th February, 7:17 pm

i've been going back and forth with dominic sayers for the last couple of weeks on RFC-based email validation. we both have php functions (mine, his) that pass a huge (and esoteric) test suite. who says RFCs are dull? (hint: they are)

27th October, 4:55 pm

backslash as the namespace separator in php 5? that's actually retarded. err, hey guys, we use that one for escaping characters in strings. i understand the issue, but there are lots of other symbols. like a single colon. or anything really. gah!

24th September, 11:02 am

dwoo is a smarty-like template engine for php5. looks interesting. anyone have any experience with it?

8th September, 11:40 am

the PHP_Debug bar is kinda neat. very ugly, but packed with useful info

4th August, 11:45 pm

announcing lib_oauth - an OAuth library for PHP4, requiring no extra extensions, pear modules, etc.

14th August, 3:06 pm

bookmarking for a later - fb code leaks

11th July, 11:20 am

lots of good stuff in the facebook apc talk. worth a read

2nd May, 4:28 pm

i hadn't noticed before, but using the smarty logo requires agreeing to the draconian trademark policies of new digital group. they appear to be quite evil.

18th November, 12:09 pm

from a php disucssion at work: "If you're willing to continually do the heavy lifting of ensuring that your version of Smalltalk96 on Rails stays concurrent with the latest patches". omg, how awesome would that be?

5th November, 5:42 pm

eric's been digging up a couple of really neat http upload related tools lately - two ajax progress meters for php and this neat multi-file upload ui.

1st November, 1:41 pm

found by eric and pretty cool - a php extension to allow you to track file upload progress. very very nice.

21st October, 11:56 pm

man, joyce sure hates templates. i suspect anyone how really wants to use xslt in a real application is fundamentally sadistic

6th October, 11:44 am

php annoyance of the day: "If you compare two numerical strings, they are compared as integers" ... even if we can't convert those strings to numerics without losing precision.

2nd July, 12:40 pm

mike b pointed me to this bizarre article from IBM's daniel sabbah describes lamp as "going to have to grow up at some point". err, right. because lamp clearly doesn't scale. it's not like the biggest websites in the world use it. ryan tomayko's response is on the mark.

24th May, 12:26 am

php diary is good. and linking to an old article of mine. which surely makes me more likely to lonk to them ;)

28th April, 6:39 pm

i present a short lession in turning RFC BNF into perl regular expressions: Parsing Email Adresses in PHP

21st March, 10:11 pm

and here's that code in php for your enjoyment.

21st February, 12:56 pm

smarty syntax i wasn't aware of - you can nest array indexes using square brackets like so. the smarty manual needs some serious fleshing out :)

15th February, 1:18 pm

php in perl. excellent. now to make the flickr core even more confusing ^_^.

3rd February, 1:51 pm

for your coding pleasure - porter stemmer in php

1st February, 6:23 pm

a new release of lib_filter (only 2 months late) to avoid the br tag being removed when the b tag should be (bad regexp - no cookie for you!).

16th January, 11:40 pm

just bookmarking jeff's notes of phpwest.

15th January, 12:29 am

david ascher picks out the best quotes from my presentation at phpwest.

11th January, 9:53 pm

dude. i am on the front page of php.net. i am l33t haxxor (if you're in vancouver on friday, come and listen to me talk crap at phpwest)

7th December, 6:58 pm

savant seems like a good idea, but basically just sucks. php is too syntax heavy for templating. a six character sequence to open a tag? ffs

28th October, 9:42 am

and someone else is getting offended by my like a sieve comment (or, at least, taking it out of context).

27th October, 2:25 pm

crumbs. everyone is talking about my php presentation. keith devens picks out the good bits.

11th October, 10:37 pm

the newly launched php wtf seem to be struggling for content - maybe there's not as many bad php programmers as one would imagine, or (as i find that hard to believe), the people running the site are finding bad code tough to spot ;)

13th September, 5:24 pm

at least someone took my comments about PEAR's failing to heart.

11th August, 5:26 pm

what. the. fuck. i did a "pear upgrade-all" and it first failed because of dependencies. fair enough - stupid that it didn;t automatically install the dependency, but forgivable. but then once finished, pear was broken because it used php 4.2.0 only features. how fucking stupid is that? the people in charge or pear are braindead idiots.

14th July, 10:17 pm

stupid stupid pear doesn't have an atom parser yet (and wont for ages - their standards and approval process greatly discourage people writing for it - there's no way i ever will :/) so i wrote one with the same interface as XML::RSS, for drop in replacement (it's going to be used in an upcoming aggregator project).

14th July, 10:15 pm

check out my rtf tokeniser in perl which i wrote many years ago and just remembered about (although we now have RTF::Tokenizer on cpan which didn't exist when i wrote my tokenizer).

2nd July, 5:26 pm

george schlossnagle writes about php and scaling in response to the rather crazy friendster/joyce/php/jsp stuff going on right now.

About

This is the personal site of Cal Henderson, Slack co-founder, ex Glitch engineer, ex Flickr architect, programmer, author and chronic complainer.

I give occasional talks, write code and sometimes articles. I also blog at World of Theorycraft and those links show up here too.

» Contact
» About Cal

Recent Tags

via-kottke

Popular Tags

apple awesome bacon code coding comics design flickr food games javascript lego maps movie music perl php programming software tech tv video visualization web

Archives

2014: Jan Feb Mar Apr May Jun Jul Aug Sep Oct
2013: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2012: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2011: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2010: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2009: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2008: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2007: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2006: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2005: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2004: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2003: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2002: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2001: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2000: Jun Jul Aug Sep Oct Nov Dec