<?xml version="1.0"?><!-- 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>MachForm Community Forums Topic: Feature Request:  Modify MySQL Server display on Errors</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Feature Request:  Modify MySQL Server display on Errors</description>
<language>en</language>
<pubDate>Sun, 15 Nov 2026 23:26:04 +0000</pubDate>

<item>
<title>yuniar on "Feature Request:  Modify MySQL Server display on Errors"</title>
<link>https://www.machform.com/forums/topic/feature-request-modify-mysql-server-display-on-errors#post-11299</link>
<pubDate>Thu, 27 Jan 2011 14:18:35 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11299@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks for the feedback on this. We should get this cleaned within the next update.
&#60;/p&#62;</description>
</item>
<item>
<title>kwbrayton on "Feature Request:  Modify MySQL Server display on Errors"</title>
<link>https://www.machform.com/forums/topic/feature-request-modify-mysql-server-display-on-errors#post-11298</link>
<pubDate>Thu, 27 Jan 2011 05:52:11 +0000</pubDate>
<dc:creator>kwbrayton</dc:creator>
<guid isPermaLink="false">11298@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Just happened to call up a form today against the MySQL Server that had been taken down for maintenance. When the MachForms attempted to connect to the server, it throw the following error message: &#60;/p&#62;
&#60;p&#62;Could not connect: Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (10060)PHP Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (10060) in D:\Inetpub\Public\mf\includes\db-core.php on line 11&#60;/p&#62;
&#60;p&#62;My concern about this message is that this message displays both the DB_HOST value and the location of the db-core-php file. These seem like useful bits for hackers. It might be nice to be able to suppress revealing all this detail by turning off error reporting and/or crafting less revealing messages. &#60;/p&#62;
&#60;p&#62;As an example, I've replace the function connect_db() in db-core.php with this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function connect_db(){
		$link = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
/* or die(&#38;#39;Could not connect: &#38;#39; . mysql_error()); */
                if(!$link)
                {
                        echo &#38;quot;ERROR: Cannot connect to database. Please try again later!&#38;quot;;
                        exit;
                }
		mysql_select_db(DB_NAME) or die(&#38;#39;Could not select database&#38;#39;);
		mysql_query(&#38;quot;SET NAMES utf8&#38;quot;);
		return $link;
	}&#60;/code&#62;&#60;/pre&#62;</description>
</item>

</channel>
</rss>
