Author Topic: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size  (Read 35256 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« on: June 18, 2005, 12:49:22 AM »
IMHO MySQL v4.1 is not a major upgrade from v3 or even v4.0 but its major pain in the @$$..

Well, anyway, after upgrading I've noticed that database size in ACP shows n/a
After investigation I found out that some database "variables" for tables in v4.1 has been changed. One of them is "Type" parameter that used to determin what type of table is it (MyISAM, ISAM, HEAP, InnoDB, etc). As of v4.1 this "variable" was renamed to "Engine" which makes 4images ignore it and show "n/a" instead.


The fix is very simple, in includes/db_utils.php find:
Code: [Select]
        if (eregi('^(MyISAM|ISAM|HEAP|InnoDB)$', $row['Type'])) {Replace with:
Code: [Select]
        if ((isset($row['Type']) && eregi('^(MyISAM|ISAM|HEAP|InnoDB)$', $row['Type'])) || (isset($row['Engine']) && eregi('^(MyISAM|ISAM|HEAP|InnoDB)$', $row['Engine']))) {

This fix should not affect any other versions of MySQL.

P.S.
Also some people may see some error messages such as:
Quote
Notice: Undefined index: Type in /path/to/4images/includes/db_utils.php on line 184
this fix should solve it too.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Guerillia

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #1 on: October 13, 2005, 01:04:07 PM »
Es funktioniert trotz des Patches nicht. im ACP wird der Header und das linke Menü geladen, aber das "mittlere" fehlt komplett. Nach einer Weile bekommt man einen 500er und die oben beschrieben Fehlermeldung "Undefined index: Type in /path/to/4images/includes/db_utils.php on line 184"

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.420
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #2 on: October 13, 2005, 05:47:38 PM »
Stimmt den die mySQL Version?

Offline Guerillia

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #3 on: October 13, 2005, 08:31:59 PM »
--> Client API version    4.1.14

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #4 on: October 13, 2005, 11:56:42 PM »
Try now, I've updated the line, it should not show you "Underfined index" error anymore. Cant say if it will fix the 500 error though. if not, perhaps you should contact your hoster, something is wrong with the server.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Guerillia

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #5 on: October 14, 2005, 07:20:35 PM »
It works fine  :D  Thx a lot

Offline linux_rh

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #6 on: March 26, 2006, 08:29:50 PM »
hello there i got broblem with 4images  after moving from hosting  has Mysql 4.0.25  and  shift  to MySql 4.1.13

when i uplaod it  i got error dublcated syntcs  and  the  when i got help from someone  and  that was uploaded  when i want to get into control panle  i can  do that  but  i can not get  any opstions there  i got error 


is  there any way to solve  this problem ?

althought  i register  4images  and  i have  more then 800 hunderd pic

thank you


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #7 on: March 26, 2006, 09:34:23 PM »
What error? is that error related to "ACP doesnt show database size"? if not, then please start a new topic in troubleshooting section and be more describtive on what exactly is the problem and what error messages.

Also, please read forum rules.

P.S. please slow down during typing too...too many typos for a single post :P
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline linux_rh

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #8 on: March 27, 2006, 10:21:28 AM »
regardding  the probelm i said  and  the error   i  am using arabic languge  and when  i shift from mysql server 4.0.25
to mysql 4.1.13  i got   14 database table written  there  althought 4images tables are 15 by difulat
2nd i got  this erroe

Quote
Server: localhost   Database: samauae_mywork

Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/string.lib.php on line 112

Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/string.lib.php on line 112

Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/string.lib.php on line 112

Quote
Error
SQL query:

INSERT INTO 4images_wordlist( word_text, word_id )
VALUES (

'Ρݭ姬4
)



Quote
MySQL said: 

Quote
#1062 - Duplicate entry '???' for key 2


brows

SQL query:

SELECT *
FROM
MySQL said: 

Quote
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1


this the  link  http://www.samauae.com/ad1

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #9 on: March 27, 2006, 03:06:32 PM »
huh? the error you showed comes from phpmyadmin and not from 4images...are you sure you are on the right forum?
And as I said, your question has nothing to do with this topic, please DO NOT CONTINUE here.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline linux_rh

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #10 on: March 27, 2006, 04:35:49 PM »
thank you

bye

Offline ladyoz

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [1.7 / 1.7.1] MySQL v4.1 = ACP doesnt show database size
« Reply #11 on: August 15, 2006, 11:25:05 PM »
Woohoo!  I just started having this silly problem today, and for no reason at all that I could see.  This fixed it - thanks V@no!  :D
Despite the cost of living, it's still popular ...