Firefox PHP

Smileys Module - lost smileys; limitation?

Posted by James E. 
Smileys Module - lost smileys; limitation?
June 23, 2008 04:40PM
While working on the Phorum Smileys module, adding icons, twice it has dumped everything I have added. This last time the error message given was:

Warning: Invalid argument supplied for foreach() in /home/pmwf/docs/Phorum/mods/smileys/smileyslib.php on line 82

The last icon I added was present, the rest were dumped and the settings restored to the default. This forum uses a lot of icons, is there a limitation causing this? Or something else? I need this fixed so I don't end up going through this again and again...

Thanks for any advice, suggestions, etc.



Edited 1 time(s). Last edit at 06/23/2008 04:45PM by Jittery Jim.
Re: Smileys Module - lost smileys; limitation?
June 23, 2008 04:47PM
About how many smileys are we talking here? The smileys configuration is stored in a single database field as a serialized array. When adding a lot of data, this might exceed the maximum length of that field. This seems like the thing that is happening for you.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Smileys Module - lost smileys; limitation?
June 23, 2008 05:04PM
Quite a lot...presently we are using WebBBS and I would bet we have around 450ish icons - crazy, yes, I know. It seems to blow up on me around the same place each time, IIRC.



Edited 1 time(s). Last edit at 06/23/2008 05:06PM by Jittery Jim.
Re: Smileys Module - lost smileys; limitation?
June 23, 2008 05:22PM
Damn... that's a lot.

You could fix it by increasing the storage size for the settings table field "data". Change the data type from TEXT to MEDIUMTEXT. That should give you more than enough space. You could do this by using some db management program or by issuing the query:
ALTER TABLE phorum_settings
CHANGE data data MEDIUMTEXT NOT NULL DEFAULT ''

(phorum_settings might be something different based on your db prefix setting)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Smileys Module - lost smileys; limitation?
June 24, 2008 08:50PM
Quote
Maurice Makaay
Damn... that's a lot.

You could fix it by increasing the storage size for the settings table field "data". Change the data type from TEXT to MEDIUMTEXT. That should give you more than enough space. You could do this by using some db management program or by issuing the query:
ALTER TABLE phorum_settings
CHANGE data data MEDIUMTEXT NOT NULL DEFAULT ''

(phorum_settings might be something different based on your db prefix setting)

Thanks, I had my DB guy make the change and I was able to add a hanful of icons...now the database isn't responding...
Re: Smileys Module - lost smileys; limitation?
June 24, 2008 08:59PM
Not responding? To any request or when adding smileys? This change should not have that effect.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Smileys Module - lost smileys; limitation?
June 24, 2008 10:59PM
I was able to add a few, and then the site quit responding at all. [www.pmwf.com] and Phorum/admin.php don't respond and eventually time out. My DB guy has gotten a copy of the database and is going to check tomorrow to see what happened. The only thing I did sice he made the change suggested above was add about 20 smileys, then it just clamed up. Once he has a chance to review it and let's me know what he found I'll post here.
Re: Smileys Module - lost smileys; limitation?
June 25, 2008 02:09AM
the site works fine for me right now.


Thomas Seifert
Re: Smileys Module - lost smileys; limitation?
June 25, 2008 11:46AM
Yeah, interestingly enough when I tried just now it's working again...not sure if my guy did anythign or not. Most curious...
Re: Smileys Module - lost smileys; limitation?
December 22, 2008 04:16PM
Hi Maurice,

I have the same problem, I lost all my smileys when I reached about 250. It happened three times when I discovered it was due to to number of smileys, full of work to recreat all the smileys and I don't if I can save a file to avoid recreated them.

I change the phorum_settings data MEDIUMTEXT , are you sure I can put now a lot of smileys whitout risk to lost them ?? ans how many : 1000 smileys ??
Re: Smileys Module - lost smileys; limitation?
December 22, 2008 06:02PM
Yes, with mediumtext, you can put a lot more in there.

But really.. you want to provide *that* many smileys?
It's up to you of course, but by doing that alone, you'd put a nice performance hit on the server (asuming that you're also using the editor tools to have the smileys in a popup, which makes the browser load all available smileys).


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login