I have recently upgraded from Fedora 15 to 17. I have PostgreSQL and Apache running happily on my machine. To administer my database, I use phpPgAdmin.
Prior to going to FC17, all was OK. Now, phpPgAdmin reports 'Login Failed', no matter which username and password I try. I can access the database using my own Perl CGI scripts, by using psql from a command line and by using the PgAdminIII GUI, but phpPgAdmin cannot connect.
/var/log/httpd/error_log contains this entry:
[Mon Jul 02 11:02:06 2012] [error] [client 127.0.0.1] PHP Strict standards: Only variables should be assigned by reference in /usr/share/phpPgAdmin/classes/database/Connection.php on line 23, referer: http://localhost/phpPgAdmin/redirect.php?subject=server&server=%3A5432%3Aallow
Line 23 of /usr/share/phpPgAdmin/classes/database/Connection.php reads:
$this->conn = &ADONewConnection(\'postgres7\');
My guess is that PHP variable assignment has become more strictly policed under Fedora 17 and this line 23 is doing something that is no longer allowed. What that something is and how to correct/work around it is beyond my limited knowledge of PHP and Apache.
Stretching my understanding, I can see how the error might be raised if either $this->conn is not regarded as a variable which may be assigned to, or &ADONewConnection('postgres7') is not returning a valid value: perhaps it is returning a constant, or a null, or some other value that cannot be assigned to $this->conn? Is the literal \'postgres7\' throwing a spanner into the works by referring to an earlier version of PostgreSQL than what I am using? <grasping at straws here ...>
The only thing I am sure of is that I am out of my depth in trying to figure this out by myself.
I have raised this question at Fedora Forum
and at the phpPgAdmin forum on SourceForge
, without success to date.
Any help would be appreciated.