Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99391 - phppgadmin with php-4.4.0 complains that only variable references should be returned by reference
Summary: phppgadmin with php-4.4.0 complains that only variable references should be r...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-17 19:37 UTC by Ben
Modified: 2005-07-31 21:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben 2005-07-17 19:37:43 UTC
After upgrading to php-4.4.0 and pgadmin 3.5.3, the following message is printed
in the database selection frame:

Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/phppgadmin/classes/database/Postgres80.php on line 74

After doing some googling, I take it that this functions returning references
was one big issue that php-4.4.0 addressed.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Here is the function is question:

/**
 * Return all database available on the server
 * @return A list of databases, sorted alphabetically
 */
function &getDatabases() {
	global $conf;

	if (isset($conf['owned_only']) && $conf['owned_only'] &&
!$this->isSuperUser($_SESSION['webdbUsername'])) {
		$username = $_SESSION['webdbUsername'];
		$this->clean($username);
		$clause = " AND pu.usename='{$username}'";
	}
	else $clause = '';

	if (!$conf['show_system'])
		$where = ' AND NOT pdb.datistemplate';
	else
		$where = ' AND pdb.datallowconn';

	$sql = "SELECT pdb.datname AS datname, pu.usename AS datowner,
pg_encoding_to_char(encoding) AS datencoding,
		       (SELECT description FROM pg_description pd WHERE pdb.oid=pd.objoid) AS
datcomment,
		       (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE
pt.oid=pdb.dattablespace) AS tablespace
		FROM pg_database pdb, pg_user pu
		WHERE pdb.datdba = pu.usesysid
		{$where}
		{$clause}
		ORDER BY pdb.datname";

	return $this->selectSet($sql);
}
Comment 1 Warren Howard 2005-07-19 23:13:26 UTC
I would like to add that I was also having this problem.

My version of PHP is

*  dev-php/mod_php
      Latest version available: 4.4.0
      Latest version installed: 4.4.0
      Size of downloaded files: 4,023 kB
      Homepage:    http://www.php.net/
      Description: Apache module for PHP
      License:     PHP-3
 
*  dev-php/php
      Latest version available: 4.4.0
      Latest version installed: 4.4.0
      Size of downloaded files: 4,023 kB
      Homepage:    http://www.php.net/
      Description: PHP Shell Interpreter
      License:     PHP-3

and my version of phppgadmin is:

*  dev-db/phppgadmin
      Latest version available: 3.5.3
      Latest version installed: 3.5.3
      Size of downloaded files: 446 kB
      Homepage:    http://phppgadmin.sourceforge.net/
      Description: Web-based administration for Postgres database in php
      License:     GPL-2

Examples the errors I saw phppgadmin:

Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/phppgadmin/classes/database/Postgres80.php on line 93

Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/phppgadmin/libraries/adodb/adodb-connection.inc.php on
line 497

Notice: Only variable references should be returned by reference in
/var/www/localhost/htdocs/phppgadmin/classes/database/Postgres.php on line 3883

There is this bug report here at the phppgadmin site:

http://sourceforge.net/tracker/index.php?func=detail&aid=1240262&group_id=37132&atid=418980

I followed the instructions and the error messages are no longer appearing.


Regards,

Warren.
Comment 2 Chan Min Wai 2005-07-30 22:31:21 UTC
Same problem happen to me, however in comment 1 where the forum go wasn't
actually the was to solve the real problem behind. It just suppress the error
message.

Should be an upstream problem.
Comment 3 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-31 21:34:37 UTC
*** Bug 100915 has been marked as a duplicate of this bug. ***
Comment 4 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-31 21:36:25 UTC
Please read http://www.php.net/release_4_4_0.php and disable error reporting
(which should always be done in a production environment) until the maintainers
of phppgadmin have fixed their code.