I'm getting the following message throughout the app --
during install, and basically any time any page tries to do
an insert or update:
Warning: pg_affected_rows(): Not supported under this
build. in [.........]/wp-includes/wp-db.php on line 214
My setup:
OS X 10.3.5
Apache/1.3.29
PHP/4.3.4
PostgreSQL 7.4.3
The problem does NOT occur under the following setup:
Debian (not sure of version)
Apache/1.3.31
PHP/4.3.4
PostgreSQL 7.4.3
Any thoughts? Does that apache version actually matter,
maybe...?
Logged In: YES
user_id=636322
Well pg_affected_rows() is exported directly by PHP...the
docs there mention that a function may not be availiable
depending on the build of libpq. While that's rather odd, I
suspect that for some reason your build of libpq doesn't
support that function.
I'm not positive, but I don't think the return value of that
function is actually used to do anything useful. It should
be safe (relatively) to comment out that function call and
use '1' instead.
Depending on where you got your postgres and PHP packages
for OSX, you may want to try a different build or build them
yourself.
Logged In: YES
user_id=41726
I'm using the default install of Apache / PHP -- that is, the
versions that come preinstalled with OS X -- so it would be a
good version to support.
I'd hesitate to make pg_affected_rows return a bogus value
without understanding all the implications. Wish the WP
developer would write some regression test (grr)!
Perhaps it would be better to make it return a non-numeric value,
so that if anything is counting on it being meaningful, it will blow
up. I'll try that and see how it flies.
Logged In: YES
user_id=41726
All right, I tried making query() return a non-numeric value -- I
changed line 214 of wp-db.php from this:
$this->rows_affected = pg_affected_rows($this->result);
...to this:
$this->rows_affected = 'pg_affected_rows not supported';
...and everything seems to work fine. I did a check of posting
articles, posting comments, editing articles, viewing by category
& date, and the RSS & Atom feeds. It looks like it would break
XML-RPC, although with no regression tests, it's hard to know.