1 sven67 Nov 02, 2006 22:16
3 blueyed Nov 03, 2006 00:51
Sylv, he's running 0.9.1 on www.typ15.de.
Sven, there should be the output from mysql_error() in the empty part between the brackets of your error message. It's strange, because it's empty.
Can you go into /inc/_misc/_db.class.php and put a
var_dump( $this->dbhandle );
before the line that says "if( ! $this->dbhandle )" (around line 300 probably).
What does it say?
4 sylv Nov 03, 2006 00:55
oops sorry, he reverted.
5 blueyed Nov 03, 2006 01:03
Or tests it, before doing it "live".. ;)
6 sven67 Nov 03, 2006 07:06
blueyed wrote:
What does it say?
Oh, it only says
NULL
8|
Sven
7 blueyed Nov 03, 2006 15:50
The doc for mysql_connect says:
"""
Returns a MySQL link identifier on success, or FALSE on failure.
"""
So, NULL is strange.
Try two thing:
1. Remove the "@" in front of the mysql_connect() (line 300) - probably it will throw a warning then. Make sure you have "display_errors=1" and "error_reporting=E_ALL" for your PHP (see http://manual.b2evolution.net/Debugging).
2. Make sure the "function DB" part looks like here: http://evocms.cvs.sourceforge.net/evocms/b2evolution/blogs/inc/_misc/_db.class.php?view=markup&pathrev=v-1-8 - maybe you have edited something etc?!
If this still does not help to show the error, try tracking it down, by inserting e.g. "var_dump($params['handle']);" to see if there gets a handle param passed etc.
8 sven67 Nov 03, 2006 16:29
blueyed wrote:
1. Remove the "@" in front of the mysql_connect() (line 300) - probably it will throw a warning then.
After removing the "@", I now get
Warning: Wrong parameter count for mysql_connect() in
/mnt/jd1/04/408/00000014/htdocs/blogs.new/inc/_misc/_db.class.php on line 288
I did not modify the 1.8.2 code in any way.
Sven
9 blueyed Nov 03, 2006 18:21
the client_flags parameter has been added in PHP 4.3.0 and the new_link parameter in 4.2.0.
b2evo requires PHP 4.3 - also at other places.
You can replace the line with the mysql_connect with this block:
if( version_compare(PHP_VERSION, '4.3', '>=') )
{
$this->dbhandle = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
}
elseif(version_compare(PHP_VERSION, '4.2', '>=') )
{ // PHP 4.2: client_flags not available
$this->dbhandle = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link );
}
else
{ // PHP before 4.2: new_link and client_flags not available
$this->dbhandle = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword );
}
10 sven67 Nov 03, 2006 19:18
Oh, thanks a lot -- so I will better upgrade to php 4.3 if I can convince my
web hoster to do so :-/
Next time I will consider reading the release notes before asking ;-)
Sven
11 sven67 Nov 03, 2006 22:51
Final note: after upgrading php, the b2evo-upgrade was very easy!!!
Thanks again. :p
Sven
www.typ15.de
looks like you've got it sorted :)