badges dont save into the database

Comments

idontunderstand’s picture

My hosting provider which is "siteground" it is saying that it is the problem with the script. They have a maximum upload limit for their database which is 96MB

I have selected php badges to create and upload from this source

http://tools.dynamicdrive.com/button/

and then I have attempted to save them to the database

But when I click on edit user badges and i select a badge that i have uploaded ( a php badge) I get this message

"There was a problem saving the badge information into the database"

Then when i also click on products I get this

Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 274420 bytes) in /home/facebusk/public_html/includes/theme.inc on line 377

The hoster I am using is "siteground" and they tell me that they have an uploading limit of 96MB which they have set to optimise their shared server hosting.....

Any thoughts on this? Thanks

snailian’s picture

This is a RAM memory problem, not a database space problem.
See how much ram they allow you use at any one time. It looks like drupal is using up more than 96MB per process for some reason.

idontunderstand’s picture

yes, why do you think drupal is using up more than 96MB Ram memory. Ok, so its not database storage, its RAM, do i need to run db maintenance, because i have done that for the user badge module, but still nothing, should i run it for all the database?

I've run database optimiser db maintenance but still it makes no difference....

snailian’s picture

I'm not sure why drupal would be using that much. I had a similar problem awhile back, so I disabled most of my modules and installed the devel module to show the mem usage per page load. I then re-enabled a few modules at a time until I found the culprit. You might just have to juggle around some non-essential modules to get it to load under the 96MB memory limit or find out which module(s) are causing you problems and disable them.

idontunderstand’s picture

Thank you for your help. I will try that with the Devel module. Good luck with your games development site. I will take a look when i get a moment.

idontunderstand’s picture

If I run the Devel module will it tell me how much RAM is being used? Do I have to disable all the modules one by one and then re-enable them to find out the amount of memory they are using?

It says this

Memory usage:

* Memory used at devel_init(): 29.36 MB
* Memory used at devel_shutdown(): 35.96 MBs

So is it a problem with the RAM usage or something else?

I am also getting this

Warning: Table 'facebusk_drupal5.user_badges_badges' doesn't exist query: SELECT DISTINCT b.bid, b.weight, b.name, b.image, b.href FROM user_badges_badges b INNER JOIN user_badges_user u ON b.bid = u.bid WHERE u.uid = 1 ORDER BY b.weight, b.name in /home/facebusk/public_html/includes/database.mysql.inc on line 174

snailian’s picture

It looks like it isn't your ram after all. I was going off of the error "Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 274420 bytes) in /home/facebusk/public_html/includes/theme.inc on line 377"

Maybe your database has reached your host's limit. If this is the case, you may need to clean up your database, ask your host to increase it, or upgrade your hosting plan.

maulwuff’s picture

Component: Miscellaneous » Code
Category: task » bug
Status: Active » Needs review

I have the same issue. After investigating the databse, I found out, there is a problem with the install file. I only had 3 user_badges tables, instead of 4.
It says:

 db_query("CREATE TABLE {user_badges_badges} (
        bid int(10) NOT NULL default '0',
        name varchar(50) NOT NULL default '',
        image varchar(80) NOT NULL default '',
        weight int(2) NOT NULL default '0',
        href VARCHAR(80) default '',
      )");

but it should say:

db_query("CREATE TABLE {user_badges_badges} (
        bid int(10) NOT NULL default '0',
        name varchar(50) NOT NULL default '',
        image varchar(80) NOT NULL default '',
        weight int(2) NOT NULL default '0',
        href VARCHAR(80) default '',
        PRIMARY KEY (bid)
      )");

the primary key is missing.

after this mod + reinstalling the module, the badges do save.

Richard Blackborder’s picture

Status: Needs review » Fixed

Added and committed and a new release made.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.