<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress Support Forums Tag: db_connect</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress Support Forums Tag: db_connect</description>
<language>en</language>
<pubDate>Fri, 09 Jan 2009 04:13:15 +0000</pubDate>

<item>
<title>feelie75 on "Had to comment out 'return false' to get install to work"</title>
<link>http://bbpress.org/forums/topic/had-to-comment-out-return-false-to-get-install-to-work#post-15299</link>
<pubDate>Sat, 12 Apr 2008 04:38:14 +0000</pubDate>
<dc:creator>feelie75</dc:creator>
<guid isPermaLink="false">15299@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;This is the code that was making the call and getting the return false returned to it, thus resulting in this error:&#60;/p&#62;
&#60;p&#62;       if (!$bbdb-&#38;gt;db_connect('SHOW TABLES;')) {&#60;br /&#62;
              $this-&#38;gt;step_status&#60;a href=&#34;http://trac.bbpress.org/changeset/1&#34;&#62;[1]&#60;/a&#62; = 'incomplete';&#60;br /&#62;
              $this-&#38;gt;strings&#60;a href=&#34;http://trac.bbpress.org/changeset/1&#34;&#62;[1]&#60;/a&#62;['messages']['error'][] = __('There was a problem connecting to the database you specified.&#60;br /&#62;Please check the settings, then try again.');&#60;br /&#62;
              return 'error';&#60;br /&#62;
       }&#60;/p&#62;
&#60;p&#62;db_connect was returning false when it detected $this-&#38;gt;$dbhname was undef. So by removing the return false when that happened, the db_connect call then succeeded and all was happy :).&#60;/p&#62;
&#60;p&#62;To answer the other person, I'm hosting on localhost. I have an old PowerPC Mac running OS X 10.4.11 or something. It's a spare computer; thought I'd stick a forum on it and learn some php.
&#60;/p&#62;</description>
</item>
<item>
<title>chrishajer on "Had to comment out 'return false' to get install to work"</title>
<link>http://bbpress.org/forums/topic/had-to-comment-out-return-false-to-get-install-to-work#post-15197</link>
<pubDate>Wed, 09 Apr 2008 18:20:45 +0000</pubDate>
<dc:creator>chrishajer</dc:creator>
<guid isPermaLink="false">15197@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;What host are you using?
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Had to comment out 'return false' to get install to work"</title>
<link>http://bbpress.org/forums/topic/had-to-comment-out-return-false-to-get-install-to-work#post-15188</link>
<pubDate>Wed, 09 Apr 2008 15:39:24 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">15188@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Were you getting an error message when it didn't work? It would be useful to know it if you did.
&#60;/p&#62;</description>
</item>
<item>
<title>feelie75 on "Had to comment out 'return false' to get install to work"</title>
<link>http://bbpress.org/forums/topic/had-to-comment-out-return-false-to-get-install-to-work#post-15178</link>
<pubDate>Wed, 09 Apr 2008 07:26:23 +0000</pubDate>
<dc:creator>feelie75</dc:creator>
<guid isPermaLink="false">15178@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I'm sure this ISNT the proper solution, heh, but since it worked I thought I'd point it out.&#60;/p&#62;
&#60;p&#62;After Step 1 failed many times, I set out to debug it. My travel took me here:&#60;br /&#62;
bb-includes/db-mysql.php&#60;/p&#62;
&#60;p&#62;                $this-&#38;gt;$dbhname = @mysql_connect( $server-&#38;gt;host, $server-&#38;gt;user, $server-&#38;gt;pass, true );&#60;br /&#62;
                if (!$this-&#38;gt;$dbhname)&#60;br /&#62;
                       return false;&#60;/p&#62;
&#60;p&#62;That was failing and returning false everytime. I couldn't figure it out. I printed out the hose and user and password, and it looked good. I could connect just fine from a shell prompt.&#60;/p&#62;
&#60;p&#62;After confirming that it actually WAS connecting, and that it was simply the lack of $this-&#38;gt;$dbhname that was causing the failure, I just commented out the return false; and VOILA! It worked! Installation finished and I can post messages, etc, etc, everything seems fine.&#60;/p&#62;
&#60;p&#62;Soooo... What's up with that?! hehe. $dbhname was == 'dbh_local'. &#60;/p&#62;
&#60;p&#62;Not sure what other details I can provide. Just thought I'd share the rather strange experience and oddness that I'd have to hack the db_connect code to get the install to complete... Weird!!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
