Loading...
 
Architecture / Installation

Architecture / Installation


adodb.inc.php error workaround

posts: 3

After a great deal of searching I have managed to find a workaround to the problem that i was having with adodb.inc.php

The exact error message that was getting was the following.

Notice: Only variable references should be returned by reference in /www/h/htdocs/intranet/lib/adodb/adodb.inc.php on line 2797

The reason that this happens is because of the adodb library's.

Now the work around. Please backup your files. If this doesn't work in your case you may need to role back.

1.) Download and replace the adodb files with the most recent version. This is currently version 4.65 (This still has a bug). Download it from http://adodb.sourceforge.net

After you have installed this package you should now get the following error message.

Notice: Only variable references should be returned by reference in /www/h/htdocs/intranet/lib/adodb/adodb.inc.php on line 2847

2.) edit adodb.inc.php from the new package.

on line 2843 you should see the following.

function &FetchRow()

This needs to be editted so that the "&" is striped off. It is shown below including a few other lines of code so that you know exactly what to edit.

/**
* Fetch a row, returning false if no more rows.
* This is PEAR DB compat mode.
*
* @return false or array containing the current record
*/
function FetchRow()
{
if ($this->EOF) {
$false = false;
return $false;
}
$arr = $this->fields;
$this->_currentRow++;
if (!$this->_fetch()) $this->EOF = true;
return $arr;
}

Now you should find that the error message has gone away.

Thanks
Chris


posts: 3

Chris,

Thanks for figuring this one out! It worked for me, too.

Albert Ingram


posts: 102

Chris,

Is this workaround valid for all versions of TikiWiki?

cgc0202


posts: 102

Chris & Albert:

Here is what I found

Just replacing "function &FetchRow()" to "function FetchRow()" was enough in my case — no need to upgrade the adobd folder. The error disappeared.

Note that I uploaded an older version of tikiwiki (v1.85) using Fantastico, I got this error:

*******
Notice: Only variable references should be returned by reference in /home/username/public_html/wiki/lib/adodb/adodb.inc.php on line 2736

when I accessed the admin page.

Then when I typed the admin username and password, it got even worse:
******
Notice: Only variable references should be returned by reference in /home/username/public_html/wiki/lib/adodb/adodb.inc.php on line 2736

Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/wiki/lib/adodb/adodb.inc.php:2736) in /home/username/public_html/wiki/tiki-login.php on line 170
*********
And nothing more appeared

Based from your observation, once I replaced the "function &FetchRow()" you found to "function FetchRow()", the said error no longer appeared.

And, after the admin username and password was typed, it went to the right page, so that I could replace the password.

There was no need to go all about replacing the adobd folders. This means the error is in the "function &FetchRow()" alone.

I am not suggesting here that the adobd folder need not be replaced. There must be other new features with the latest version that would merit its replacement.


posts: 15 Canada

Hi Chris,

This fix worked for me too, thanks a million man!

Norm.


posts: 9 United States

> After a great deal of searching I have managed to find a workaround to the problem that i was having with adodb.inc.php
>
> The exact error message that was getting was the following.
>
> Notice: Only variable references should be returned by reference in /www/h/htdocs/intranet/lib/adodb/adodb.inc.php on line 2797
>
> The reason that this happens is because of the adodb library's.
>
> Now the work around. Please backup your files. If this doesn't work in your case you may need to role back.
>
> 1.) Download and replace the adodb files with the most recent version. This is currently version 4.65 (This still has a bug). Download it from http://adodb.sourceforge.net
>
> After you have installed this package you should now get the following error message.
>
> Notice: Only variable references should be returned by reference in /www/h/htdocs/intranet/lib/adodb/adodb.inc.php on line 2847
>
> 2.) edit adodb.inc.php from the new package.
>
> on line 2843 you should see the following.
>
> function &FetchRow()
>
> This needs to be editted so that the "&" is striped off. It is shown below including a few other lines of code so that you know exactly what to edit.
>
> /**
> * Fetch a row, returning false if no more rows.
> * This is PEAR DB compat mode.
> *
> * @return false or array containing the current record
> */
> function FetchRow()
> {
> if ($this->EOF) {
> $false = false;
> return $false;
> }
> $arr = $this->fields;
> $this->_currentRow++;
> if (!$this->_fetch()) $this->EOF = true;
> return $arr;
> }
>
> Now you should find that the error message has gone away.
>
> Thanks
> Chris
>
>
>


posts: 5

Another newbie here. I did a search for the error I am having after the Fantastico install of Tiki Wiki. While my error message is different than the one referenced in this thread for the fix. It seems all paths lead to this message.

My error is: Notice: Only variable references should be returned by reference in /home/myacccountname/public_html/tipwiki/lib/adodb/adodb.inc.php on line 2736

The version Fantastico installed is 1.86 Polaris.

The specs. on my account are:

Operating system Linux
Service Status Click to View
Kernel version 2.6.9-11.ELsmp
Machine Type i686
Apache version 1.3.33 (Unix)
PERL version 5.8.6
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
Installed Perl Modules Click to View
PHP version 4.4.0
MySQL version 4.0.25-standard
cPanel Build 10.8.0-STABLE 21
Theme cPanel X v2.5.0

-----------
If I go into a Zencart Install I get more info:

Database: MySQL 4.0.25-standard

HTTP Server: Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.0 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a

Php Configure Command:
./configure' 'with-apxs=/usr/local/apache/bin/apxs' 'with-xml' 'enable-bcmath' 'enable-calendar' 'with-curl' 'with-dom' 'with-dom-xslt' 'with-dom-exslt' 'enable-exif' 'enable-ftp' 'with-gd' 'with-jpeg-dir=/usr/local' 'with-png-dir=/usr' 'with-xpm-dir=/usr/X11R6' 'with-gettext' 'with-imap' 'with-imap-ssl' 'with-kerberos' 'enable-mbstring' 'enable-mbstr-enc-trans' 'enable-mbregex' 'with-mcrypt' 'with-mhash' 'with-ming=../ming-0.2a' 'enable-magic-quotes' 'with-mysql=/usr' 'with-openssl' 'enable-discard-path' 'with-pdflib' 'with-pear' 'enable-xslt' 'with-xslt-sablot' 'enable-sockets' 'enable-track-vars' 'with-ttf' 'with-freetype-dir=/usr' 'enable-gd-native-ttf' 'enable-versioning' 'enable-wddx' 'with-xmlrpc' 'with-zip' 'with-zlib'

Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.zlib

As I'm sure most know there is a lot more info on the server also listed. I searched for "adodb" and didn't find anything.

Another issue which may make my problem more complex is that we are on a regular reseller account and don't have access to install anything.

Are there instructions I need to give my provider, or questions to ask? I downloaded the latest adodb package. Do I make the changes in this thread and then sent it to them? Or is it something I can install in my account?

Any answers greatly appreciated,

Betty









> After a great deal of searching I have managed to find a workaround to the problem that i was having with adodb.inc.php
>
> The exact error message that was getting was the following.
>
> Notice: Only variable references should be returned by reference in /www/h/htdocs/intranet/lib/adodb/adodb.inc.php on line 2797
>
> The reason that this happens is because of the adodb library's.
>
> Now the work around. Please backup your files. If this doesn't work in your case you may need to role back.
>
> 1.) Download and replace the adodb files with the most recent version. This is currently version 4.65 (This still has a bug). Download it from http://adodb.sourceforge.net
>
> After you have installed this package you should now get the following error message.
>
> Notice: Only variable references should be returned by reference in /www/h/htdocs/intranet/lib/adodb/adodb.inc.php on line 2847
>
> 2.) edit adodb.inc.php from the new package.
>
> on line 2843 you should see the following.
>
> function &FetchRow()
>
> This needs to be editted so that the "&" is striped off. It is shown below including a few other lines of code so that you know exactly what to edit.
>
> /**
> * Fetch a row, returning false if no more rows.
> * This is PEAR DB compat mode.
> *
> * @return false or array containing the current record
> */
> function FetchRow()
> {
> if ($this->EOF) {
> $false = false;
> return $false;
> }
> $arr = $this->fields;
> $this->_currentRow++;
> if (!$this->_fetch()) $this->EOF = true;
> return $arr;
> }
>
> Now you should find that the error message has gone away.
>
> Thanks
> Chris
>
>
>

posts: 5

Sorry -

I forgot to add that about halway through the 2736 errors, I get a line which gives another error:


Warning: Cannot modify header information - headers already sent by (output started at /home/columbia/public_html/tipwiki/lib/adodb/adodb.inc.php:2736) in /home/columbia/public_html/tipwiki/index.php on line 10


Sorry for the extra post, but it wouldn't let me edit my other one.

redface

b

posts: 5

Sorry to have wasted all the space and bandwidth!

I tried the fix by Chris even though my message was slightly different and so far so good. It's working with no ugly error messages.

betty


posts: 2

Thanks Heaps Chris

The & thing fixed the error for me. I managed to get this installed on my webhost using FTP only to get the variable blah blah error, reinstalled, same, your fix -> cured!

its the 1.91 release. it was short of a trackers directory, but other than that the install was pretty smooth

JD


posts: 1
Works fantastic, wootness indeed, thanks :-)

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting