MyBB Community Forums

Full Version: Bump
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Previous unanswered question:

Is it possible to install sendmail (unix) and configure php to use it via php.ini for email instead of smtp?


Current new question that concerns errors:

I am receiving the following error when I try to access the forum that I am trying to install:

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/forums/inc/db_mysql.php on line 313
MySQL error:
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/forums/inc/db_mysql.php on line 314


Query:

When I look at lines 313 and 314 in this files it reads the following:
/**
         * Output a database error.
         *
         * @param string The string to present as an error.
         */
        function dberror($string="")
        {
                if($this->error_reporting)
                {
                        echo "MySQL error: " . mysql_errno($this->link);
                        echo "<br />" . mysql_error($this->link);
                        echo "<br />Query: $string";
                        exit;
                }
        }


        /**
         * Returns the number of affected rows in a query.
         *
         * @return int The number of affected rows.


does anyone knows why I am receiving these error and how to get rid of them? Any help will be appreciated.

with warm regards
Ronald Cross
First question 1) MyBB doesn't use smtp in version 1.2. Your only choice is to use sendmail.

Second question 2) Your host's mysql server is down. Contact them.
Or you have inputted the wrong username, password or hostname for the mysql database. Please check your inc/config.php file.

Cheers,
CraKteR
CraKteR Wrote:Or you have inputted the wrong username, password or hostname for the mysql database. Please check your inc/config.php file.

Thanks, I believe I found the answer. The config.php file has the initial mysql root password. I changed the root password.

Is is safe for me to put the new password in this config file? Isn't this a security issue?

with kind regards
Ronald Cross
The config.php file is safe. People can't access it.
Tikitiki Wrote:The config.php file is safe. People can't access it.

Are you sure? The permission for my file is rw-rw-rw

Is this the correct permission? The r parts looks scary!

with kind regards
Ronald Cross
That's read and write access. You need to have read access to get the users to get the info so they can access the MySQL database. You don't need the write part any more though. But it's not unsafe to keep it that way since only you should have access to the ftp server and only you should be able to download the file.
read access is only a server side thing. If any user navigates to the config.php file they will receive no information since none is actually 'outputted' to the browser.
Now, if you added echo to the front of each line, it would be outputed, but as it isn't... it safe, trust me. Wink
That would return in a big fat error.

To be "extra" secure you can add a .htaccess file to your root folder, if your server software is apache.
With the code:
<Files "config.php">
	Order Allow,Deny
	Deny from All
</Files>

Although it's not really necessary.

Cheers,
CraKteR.
Pages: 1 2