Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.4
Author Message
Darrell3831
Worker
Worker



Joined: Feb 18, 2004
Posts: 244

PostPosted: Sat Nov 13, 2004 7:13 am Reply with quote

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

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
Darrell3831







PostPosted: Tue Nov 16, 2004 8:58 am Reply with quote

I've notices a thrid thing that isent working right since my upgrade. Well actually I've found many things. Smile 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







PostPosted: Thu Nov 18, 2004 1:19 pm Reply with quote

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

PostPosted: Thu Nov 18, 2004 1:31 pm Reply with quote

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.
 
View user's profile Send private message
Darrell3831







PostPosted: Thu Nov 18, 2004 1:36 pm Reply with quote

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







PostPosted: Thu Nov 18, 2004 1:39 pm Reply with quote

Have you tried just using the 6.9 code?
 
Darrell3831







PostPosted: Thu Nov 18, 2004 1:45 pm Reply with quote

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







PostPosted: Thu Nov 18, 2004 1:48 pm Reply with quote

Is it possible it is optimizing and just not displaying correctly? Have you looked at the before and after in phpMyAdmin?
 
Darrell3831







PostPosted: Thu Nov 18, 2004 1:52 pm Reply with quote

Image
 
Darrell3831







PostPosted: Thu Nov 18, 2004 1:59 pm Reply with quote

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







PostPosted: Fri Nov 19, 2004 12:57 pm Reply with quote

If you'd like to give me ftp and site access I can look for you.
 
Darrell3831







PostPosted: Fri Nov 19, 2004 1:49 pm Reply with quote

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







PostPosted: Fri Nov 19, 2004 9:41 pm Reply with quote

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







PostPosted: Fri Nov 19, 2004 9:46 pm Reply with quote

Thanks for you time...
 
Raven







PostPosted: Fri Nov 19, 2004 11:03 pm Reply with quote

I found it. You need to put the database name in back ticks like this
Code:
$local_query = 'SHOW TABLE STATUS FROM `'.$dbname.'`';

RavensScripts
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.4

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©