Author |
Message |
Darrell3831
Worker


Joined: Feb 18, 2004
Posts: 244
|
Posted:
Sat Nov 13, 2004 7:13 am |
|
Hi,
I upgraded from Nuke 6.9 to 7.4 and have Chatserv's 2.6 patches installed.
Before the upgrade the admin function "Optimize Database" worked and "Newsletters" to the members worked.
Now the optimize database displays only the top row of the table with no information in that row and then stops with no error messages of any kind. It just stops. The optimization does not occure. I can optimize the database from phpMyAdmin.
The newsletter still gets sent but every single carriage return is taken out and you get one long sentence in the email. Other emails from my site are working correctly. Properly formated as you'd expect.
Are either of these known issues that a lot of people face? I havent noticed anything for the search terms I'm choosing.
Thanks for any suggestions that get me on the right track here.
Darrell |
_________________ http://www.psy-center.com |
|
|
 |
Darrell3831

|
Posted:
Tue Nov 16, 2004 8:58 am |
|
I've notices a thrid thing that isent working right since my upgrade. Well actually I've found many things. but I've been able to fix most of them.
This new thing I found is in the Top10 module. It's not updating correctly. The number of comments hasent advanced since the upgrade.
Has anybody experienced any of these problems, and do you remember how you fixed it?
Thanks.
Darrell |
|
|
|
 |
Darrell3831

|
Posted:
Thu Nov 18, 2004 1:19 pm |
|
Here is the section of Optimize Database which I think is wrong in nuke 7.4.
Code: $local_query = 'SHOW TABLE STATUS FROM '.$dbname;
$result = $db->sql_query($local_query);
if ($db->sql_numrows($result)) {
while ($row = $db->sql_fetchrow($result)) {
$tot_data = $row['Data_length'];
$tot_idx = $row['Index_length'];
$total = $tot_data + $tot_idx;
$total = $total / 1024 ;
|
I don't think the code is dropping down into this while loop.
What kind of echo statements could I insert in order to see the value of $result so that I can tell if the if statement is evaluating true or false???
Thanks,
Darrell |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Nov 18, 2004 1:31 pm |
|
I have upgraded several sites and not experience these things. But, I can't remember if I was using 2.6. I'll ask Chat to take a look. |
|
|
|
 |
Darrell3831

|
Posted:
Thu Nov 18, 2004 1:36 pm |
|
Thank you Raven.
Here is the code from nuke 6.9's optimize.php in the admin folder:
Code: $local_query = 'SHOW TABLE STATUS FROM '.$dbname;
$result = @sql_query($local_query, $dbi);
if (@sql_num_rows($result, $dbi)) {
while ($row = sql_fetch_array($result, $dbi)) {
$tot_data = $row['Data_length'];
$tot_idx = $row['Index_length'];
$total = $tot_data + $tot_idx;
|
As you can see the database queries are done differently. Here is this code example I know it's getting down into the while loop because it works.
I don't know whay the way the database queries are made were changed, or how to troubleshoot these changes.
Darrell |
|
|
|
 |
Raven

|
Posted:
Thu Nov 18, 2004 1:39 pm |
|
Have you tried just using the 6.9 code? |
|
|
|
 |
Darrell3831

|
Posted:
Thu Nov 18, 2004 1:45 pm |
|
The version from 6.9 with patches installed no longer works either... I've uploaded it into the 7.4 site with the exact same results.
However it did work before the upgrade.
That's why I'm trying to echo those things back to the screen.. So that I can see what values they contain. Something has changed that makes them evaluate to false apperantly. Because it dosent drop down into the loop...
I don't know how to trouble shoot this, but I'm trying everything I can think of.
Darrell
BTW, the counter for the number of times you have optimized is working. Each time I try again it goes up by one... |
|
|
|
 |
Raven

|
Posted:
Thu Nov 18, 2004 1:48 pm |
|
Is it possible it is optimizing and just not displaying correctly? Have you looked at the before and after in phpMyAdmin? |
|
|
|
 |
Darrell3831

|
Posted:
Thu Nov 18, 2004 1:52 pm |
|
|
|
 |
Darrell3831

|
Posted:
Thu Nov 18, 2004 1:59 pm |
|
I've checked in phpMyAdmin and, NO the optimization is not taking place when you execute the script. Only when you do it from phpMyAdmin. |
|
|
|
 |
Raven

|
Posted:
Fri Nov 19, 2004 12:57 pm |
|
If you'd like to give me ftp and site access I can look for you. |
|
|
|
 |
Darrell3831

|
Posted:
Fri Nov 19, 2004 1:49 pm |
|
I appreciate the offer thanks!
I don't mind trouble shooting it myself if you're busy though, I just need some ideas......
I'll PM you the info in a bit.
Thanks,
Darrell |
|
|
|
 |
Raven

|
Posted:
Fri Nov 19, 2004 9:41 pm |
|
Just to bring partial closure, the problem is that the SHOW TABLES command is choking on his database name, apparently because it has a '-' in it. I've seen this before and the only remedy that I know of is to rename the database. |
|
|
|
 |
Darrell3831

|
Posted:
Fri Nov 19, 2004 9:46 pm |
|
|
|
 |
Raven

|
Posted:
Fri Nov 19, 2004 11:03 pm |
|
I found it. You need to put the database name in back ticks like thisCode:$local_query = 'SHOW TABLE STATUS FROM `'.$dbname.'`';
|
 |
|
|
|
 |
|