View previous topic :: View next topic |
Author |
Message |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Wed Jan 30, 2002 9:58 pm Post subject: Fix for "Warning: Call-time pass-by-reference has been ..." |
|
|
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 |
|
 |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Wed Jan 30, 2002 11:04 pm Post subject: |
|
|
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 |
|
 |
Chief
Joined: 30 Jan 2002 Posts: 23
|
Posted: Wed Jan 30, 2002 11:05 pm Post subject: Tried Last option |
|
|
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 |
|
 |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Wed Jan 30, 2002 11:17 pm Post subject: |
|
|
Just use the newest version of b2functions.php and xmlrpc.inc, it's better |
|
Back to top |
|
 |
Chief
Joined: 30 Jan 2002 Posts: 23
|
Posted: Wed Jan 30, 2002 11:31 pm Post subject: Where? |
|
|
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 |
|
 |
Guest
|
Posted: Wed Jan 30, 2002 11:44 pm Post subject: |
|
|
yes, the 0.6 version. the same you downloaded - it's just been updated  |
|
Back to top |
|
 |
Chief
Joined: 30 Jan 2002 Posts: 23
|
Posted: Wed Jan 30, 2002 11:50 pm Post subject: Yeah! |
|
|
Thank You! that worked.
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 |
|
 |
|