Let the blog see the rabbit...

...an XHTML compliant rabbit

A weblog by Denis Walker

Blog posting finally works right

It's been annoying me for ages that when you post a new blog entry you get a stack of PHP warnings despite it posting the entry successfully and fixing this has been on my TODO list for a while. Finally, I got round to looking at it last night, only to find that the suphp PATH_INFO problem was preventing me from working on my own copy of the blog code.

This morning, after a fair amount of buck-passing, this issue was finally resolved (thanks sits and Arthur!) and I was able to look at the problem.

It turns out that as of PostgreSQL 8.1, the OID is not present by default and this was what was causing the problem - the db_last() function was using pg_last_oid(), which was simply not returning anything.

I've worked round this by using the shortsubject to fetch the new entry from the database instead. 

[ Entry posted at: Sat 02 Dec 2006 14:11:58 UTC | 0 comment(s)... | Cat: SUCS ]

Add Comment

Validate : XHTML / CSS / RSS / ATOM :: SUCS Blogs Version 209