Thread Starter
sayakb
(@sayakb)
Update:
plugins.php opens okay now.
And.. plugin-install.php opened this morning. But it had this error at the end:
Warning: http_build_query() expects at most 2 parameters, 3 given in /home/www/blog.sayakbanerjee.com/wp-includes/http.php on line 248
So I opened up http.php and found this code:
$r[‘body’] = http_build_query($r[‘body’], null, ‘&’);
And replaced this with this (in order to have 2 args):
$r[‘body’] = http_build_query($r[‘body’], ‘&’);
So well, that again made plugin-install.php disappear with the “Download this file” syndrome.
I changed the code back, while plugin-install.php isn’t back again.
So in a nutshell:
1. I have akismet and hello dolly plugins in my wp-content/plugins folder. Not the faulty sociable plugin anymore.
2. Everything in my dashboard works fine, except for plugin-install.php (Install new plugins). That means I cannot have more plugins but only the default ones.
Getting the exact same error:
http_build_query() expects at most 2 parameters, 3 given in … wp-includes/http.php on line 248
What’s weird is that I have a recent, fresh WordPress install with no plugins whatsoever. So I think this is a WordPress bug — not something you (or I) did.
If I figure out the problem I will post back.
thanks,
dustin
That doesn’t make any sense, because http_build_query takes THREE parameters, not two. See here: http://www.php.net/http_build_query
The function is also defined in wp-includes/compat.php for those peoplee running older php versions.
I might be mistaken but I found that in version 5.1.2 of PHP the arg_separator parameter was added. I’m running 5.0.4 – I have the function, but not the third parameter. So I’m getting the same error.
My web server was upgraded to the 5.0.3 version of PHP and I got that warning. I had the server reverted back to PHP Version 4.3.11 and there is no warning and I can install plugins. I also have no warning message and proper function while using PHP Version 5.2.8.
having same error when in plugins_install page if doing anything that needs a search… ( okay on Start page)..
Warning: http_build_query() expects at most 2 parameters, 3 given in /home/…./wp-includes/http.php on line 251
Everything was fine before ! the last plugin I activated was WASSUP so I deactivated but the problem still there. I did upgrade my php version from 4+ to 5.02 two days ago but I think (as far as I recall) I did not have this error afterwards!
Okay, I did another upgrade on my php version to 5.2 and all works fine now – the error disappeared on all plugin-install pges and I installed new plugin with no problem !