NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is three + seven?

Go back

Topic review (newest first)

Voodoo
07-15-2009 14:01:01

I wish I could do something but I just don't know what I'm doing at all, sorry! D:
But thank you so much for doing so, I think that would be best to look through the database because there might be a problem other than that I would never find myself. I don't know, it worked fine on Funpic, maybe it has something to do with that?

errrp now it says

Code:

Parse error: syntax error, unexpected '}' in /home/voodoo/public_html/oekaki/boot.php on line 100

but thank you so much! I really appreciate it.

Waccoon
07-14-2009 23:03:23

Okay, I'm having a hard time figuring out what's going on here, because if the query fails, there is supposed to be a message of some sort.  For some reason, an error is not being printed.  That doesn't make any sense.  So, I've tweaked the code a bit to include a message reference number and I'm now explicitly setting the error link.

Look for the previous code on which we worked...

Code:

// Check db version
$result = mysql_query ("SELECT miscstring FROM {$OekakiPoteto_Prefix}oekakimisc WHERE miscname='dbversion'");
if (!$result) {
    mysql_close($dbconn);
    exit ('Cannot get database version number from table `oekakimisc`.<!-- db:'.mysql_error().' -->');
}
$db_temp = mysql_result ($result, 0);

...and replace that with this:

Code:

// Check db version
$result = mysql_query ("SELECT `miscstring` FROM `{$OekakiPoteto_Prefix}oekakimisc` WHERE `miscname`='dbversion'");
if (!$result) {
    echo "DB: no result<br />\n";
} else {
    echo "DB: result<br />\n";
}
echo ('DB: '.mysql_errno($dbconn).'-'.mysql_error($dbconn)."<br />\n");
$db_temp = mysql_result ($result, 0);
w_exit ('DB: '.mysql_errno($dbconn).'-'.mysql_error($dbconn)."<br />\n");

Sorry to introduce some of the technical details, but I need to find out what your new server doesn't like about the code.  If problems persist, I'd be willing to log into the new server and run a few tests, if you feel comfortable with that.  Sometimes the server logs can provide more information, but some servers log errors and others don't.

Voodoo
07-13-2009 22:58:05

Oops, my bad. Here's the error message that was displayed when I ran the new script:

Code:

Cannot get database version number from table `oekakimisc`.
Waccoon
07-13-2009 21:22:52

Actually, the new "boot.php" I linked to above has a few extra lines of code in it.  Here's what it should look like:

Code:

// Check db version
$result = mysql_query ("SELECT miscstring FROM {$OekakiPoteto_Prefix}oekakimisc WHERE miscname='dbversion'");
if (!$result) {
    mysql_close($dbconn);
    exit ('Cannot get database version number from table `oekakimisc`.<!-- db:'.mysql_error().' -->');
}
$db_temp = mysql_result ($result, 0);

This will give the reason why the query fails and mysql_result() cannot get a value.

It might be an encoding issue or something bizarre, because I don't see anything wrong with the phpMyAdmin screenshot you provided.  Because of how the database is set up, "miscvalue" contains only numbers, while "miscstring" contains text.  So, the database version really is "1.4.2" and not "0".  We just need to find out why the database keeps complaining whenever we read "miscstring".

Normally when the database can't read a value, it will simply return NULL, which will not generate an error.  When the board says "not a valid MySQL result" that means something is seriously wrong.

Voodoo
07-13-2009 13:33:42

Thank you! However I edited the boot.php with your new file and the same error message is displayed (something wrong with line 92.) I looked at lines 91-92 in the new boot.php file you made but the code looks the same:

Code:

$result = mysql_query ("SELECT miscstring FROM {$OekakiPoteto_Prefix}oekakimisc WHERE miscname='dbversion'");
$db_temp = mysql_result ($result, 0);

Here's the dbconn.php file if you need it:

Code:

<?php // Include only

    $dbhost = 'localhost';
    $dbuser = 'voodoo_oekaki';
    $dbpass = '--removed in this post so people won't see it lol--';
    $dbname = 'voodoo_oekaki';
    $OekakiPoteto_Prefix = 'op_';
    $OekakiPoteto_MemberPrefix = 'op_';

    $dbconn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect to the MySQL database.');
    $mySQLDB = mysql_select_db($dbname);

?>

Yes, I did edit it with mySQL, I checked line92 on a code editor and that's how i found that op_oekakimisc was the source of the problem. I don't know exactly what's wrong but when I browsed it with myPHP Admin something doesn't seem to be right, there's only two lines (here's a screencap, both the myPHP admin tables from the old and the new server look exactly the same):

http://i30.tinypic.com/ou9mpy.png

the dbversion is displayed as '0'. I don't have very much experience with mySQL so I don't really know if that's a problem or not. Thanks so much for your help!

Waccoon
07-13-2009 06:39:22

Well, there is definitely something wrong with that table, but I don't see anything odd about the code that creates the table.

This was done with phpMyAdmin, right?  Do you know how to browse to the "op_oekakimisc" table with phpMyAdmin and check to see that there are two rows in that table?  It is possible to get phpMyAdmin to export and import only one table, so that might be worth a try.

I've created a new "boot.php" for you (LINK) that will print some more specific information (via "view source").  Once the file is in place, we'll have a better idea as to why the table wasn't transferred correctly to the new host.  My main concern here is that there might be more data missing than just this one table.  Knowing the specific error will give us an idea if more tables might have suffered the same problem.

Voodoo
07-12-2009 15:54:53

Okay, I read some older posts and figured out how to transfer everything to the new host, I edited the dbcon.php file so they would connect to the new database. However, it displays this error message:

Code:

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/voodoo/public_html/oekaki/boot.php on line 92

Please run the updater.

Database required: v1.4.2
Config present: v

I think there's something wrong with my "op_oekakimisc" table in my database. It seems that some data is missing but this is how it was on the old server and it worked just fine:

Code:

CREATE TABLE IF NOT EXISTS `op_oekakimisc` (
  `MiscID` int(11) NOT NULL AUTO_INCREMENT,
  `miscname` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `miscvalue` bigint(255) NOT NULL DEFAULT '0',
  `miscstring` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`MiscID`),
  KEY `miscname` (`miscname`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `op_oekakimisc`
--

INSERT INTO `op_oekakimisc` (`MiscID`, `miscname`, `miscvalue`, `miscstring`) VALUES
(1, 'piccount', 378, NULL),
(2, 'dbversion', 0, '1.4.2');

Is there some missing data? Here's lines 91-92 from boot.php, perhaps there's a problem there since the error message is from line 92 (I'm really stumped):

Code:

$result = mysql_query ("SELECT miscstring FROM {$OekakiPoteto_Prefix}oekakimisc WHERE miscname='dbversion'");
$db_temp = mysql_result ($result, 0);

help would be appreciated! thanks.

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB