boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fix for "Warning: Call-time pass-by-reference has been ..."

 
Post new topic   Reply to topic    boardom Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Wed Jan 30, 2002 9:58 pm    Post subject: Fix for "Warning: Call-time pass-by-reference has been ..." Reply with quote

If you have this message appearing in b2 v0.6 :
Quote:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.

...then you have 3 possibilities to fix the problem.


1. edit php.ini
Edit php.ini on your server and put a line that says
Code:
allow_call_time_pass_reference = On

It should magically fix the problem.
If it doesn't, maybe solution #2 can help.


2. create/edit a .htaccess file
Create a .htaccess file in b2's directory, or edit it if you already have that file, and add these lines to it:
Code:
<IfModule mod_php4.c>
php_value allow_call_time_pass_reference 1
</IfModule>

This should work.
If it still doesn't fix your problem, then...


3. disable XMLRPC in b2
...then you need to disable all XMLRPC functions from b2.

Here's how.

Open b2functions.php (in the /b2-include directory) and delete everything from :
Code:
// pings Weblogs.com

function pingWeblogs($blog_ID="1") {
   // original function by Dries Buytaert for Drupal
   global $use_weblogsping, $blogname,$siteurl,$blogfilename;

(...)

to :
Code:
(...)

      $output = preg_replace("/.*<\/boolean>/si","",$output);
      $output = preg_replace("/.*<value>/si","",$output);
      $output = preg_replace("/<\/value>.*/si","",$output);
      return $output;
   }
}

Then replace it with this code:
Code:

function pingWeblogs($blogID=1) {
   // I'm such an empty function
   return true;
}
function pingWeblogs_old() {
   // I'm such an empty function
   return true;
}


Then open xmlrpc.inc (in the /b2-include directory too), and delete EVERYTHING. Leave only a blank line.

Then you can delete xmlrpc.php too, since it wouldn't work.


Last edited by michel v on Sun Feb 17, 2002 9:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Wed Jan 30, 2002 11:04 pm    Post subject: Reply with quote

I just fixed the 'bug'.
Nobody should see any warnings there anymore if they use the newest b2functions.php and xmlrpc.inc files.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Chief



Joined: 30 Jan 2002
Posts: 23

PostPosted: Wed Jan 30, 2002 11:05 pm    Post subject: Tried Last option Reply with quote

tried the last mod and got:

Parse error: parse error in ... b2functions.php on line 581

or line 580 after I resaved it without extra carriage returns. Either way, the line that is at 580 or 581 is: " // I'm such an empty function
"

So i deleted the comment and come up with the same error on the same line with " return true;
"

Any ideas?
_________________
The Chief
Back to top
View user's profile Send private message
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Wed Jan 30, 2002 11:17 pm    Post subject: Reply with quote

Just use the newest version of b2functions.php and xmlrpc.inc, it's better
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Chief



Joined: 30 Jan 2002
Posts: 23

PostPosted: Wed Jan 30, 2002 11:31 pm    Post subject: Where? Reply with quote

Hope I'm not being an idiot, but where do I find them?
I've already downloaded the latest version and that's the one I edited with option two. That is the .6 version, right?

Thanks again for all the help.
_________________
The Chief


Last edited by Chief on Wed Jan 30, 2002 11:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Jan 30, 2002 11:44 pm    Post subject: Reply with quote

yes, the 0.6 version. the same you downloaded - it's just been updated Smile
Back to top
Chief



Joined: 30 Jan 2002
Posts: 23

PostPosted: Wed Jan 30, 2002 11:50 pm    Post subject: Yeah! Reply with quote

Thank You! that worked. Very Happy

Just for the sake of edification, I'm going to try and figure out what you did differently in those downloaded files versus the changes suggested above.

Thanks again!
_________________
The Chief
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Bugs All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group