This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Like (thumb) gives error
#1

when I click on the thumbs up/down I receive this error

Quote:Sorry, there is a database problem.

Please check back shortly. Thanks.

It never worked
Reply
#2

Can you open /comments/includes/db/connect.php

There should be 3 instances of this line:

cmtx_db_error_general();

Above each instance, add a unique echo, like this:

echo '1';
cmtx_db_error_general();

..

echo '2';
cmtx_db_error_general();

etc

Then try to vote again and see which number displays.

You can then remove the echo lines.

Have you completed the interview?
Reply
#3

(31-Dec-2013, 01:30 PM)mariank Wrote:  It never worked

It hasn't ever worked, you mean?

Have you completed the interview?
Reply
#4

yes - I mean it hasn't ever worked - I said that cause the message they gave made it sound a temporary problem so I was saying it wasn't a temporary problem - it never worked

I'll try with the echo lines and see what we find
Reply
#5

(31-Dec-2013, 05:48 PM)Steven Wrote:  Can you open /comments/includes/db/connect.php

There should be 3 instances of this line:

cmtx_db_error_general();

Above each instance, add a unique echo, like this:

echo '1';
cmtx_db_error_general();

..

echo '2';
cmtx_db_error_general();

etc

Then try to vote again and see which number displays.

You can then remove the echo lines.

Sorry I disappeared - Hostgator must have been having a wild New Year's party - I couldn't get my site,FTP,control panel

OK - I put in those lines and they're always 1 - so the problem is at the first one
Reply
#6

Can you replace this:

PHP Code:
<?php 
@$cmtx_connection = mysql_connect ($cmtx_mysql_host, $cmtx_mysql_username, $cmtx_mysql_password);

With this:

PHP Code:
<?php 
$cmtx_connection
= mysql_connect ($cmtx_mysql_host, $cmtx_mysql_username, $cmtx_mysql_password);
echo
mysql_errno($cmtx_connection) . ": " . mysql_error($cmtx_connection);

(Note that I removed the @ on the first line)

Have you completed the interview?
Reply
#7

This is the error I get for a thumbs up (in green)
Quote:Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'michalk'@'localhost' (using password: NO) in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 39

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 40

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 40
: 1
Commentics

Sorry, there is a database problem.

Please check back shortly. Thanks.

Dislike0

This is the warning for a thumbs down (in red)
Quote:Randy says...
Another City Mini lover
PermalinkPermalink
FlagFlag
Like0
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'michalk'@'localhost' (using password: NO) in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 39

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 40

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 40
: 1
Commentics

Sorry, there is a database problem.

Please check back shortly. Thanks.

If I choose flag I get this message in blue
Quote:Sherry says...
I'm a BoB revolution lover
PermalinkPermalink

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'michalk'@'localhost' (using password: NO) in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 39

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 40

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home2/michalk/public_html/childchat.org/comments/includes/db/connect.php on line 40
: 1
Commentics

Sorry, there is a database problem.

Please check back shortly. Thanks.
Reply
#8

It looks like the vote.php file and the flag.php file are having trouble reading at least one, if not all, of the connection variables in the file details.php.

So in connect.php replace this line ..

PHP Code:
<?php 
require_once 'details.php'; //load database details

with your connection variables from details.php.

The code in connect.php should now look something like this:

PHP Code:
<?php 
@$cmtx_db_orig = mysql_query("SELECT DATABASE();");
@
$cmtx_db_orig = mysql_result($cmtx_db_orig, 0);

$cmtx_mysql_database = ''; // The name of the database you created
$cmtx_mysql_username = ''; // Your MySQL username
$cmtx_mysql_password = ''; // Your MySQL password
$cmtx_mysql_host = 'localhost'; // Usually 'localhost'. Can also be an IP address.
$cmtx_mysql_port = ''; // In most cases leave blank.
$cmtx_mysql_table_prefix = ''; // In most cases leave blank.

require_once 'failure.php'; //load failure messages

.. except your connection variables will obviously be filled in.

Before you do that, you might first want to try setting normal file permissions for details.php.

Another thing to check is to make sure you have granted your MySQL user full permissions.

Have you completed the interview?
Reply
#9

That's it! Putting the connection variables right in the connect file worked perfectly

thanks
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
14-Jul-2018, 05:35 PM
Last Post by Steven
03-Mar-2016, 08:12 PM
Last Post by Steven
09-Jul-2012, 01:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)