Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: another problem with new favs feature  (Read 5448 times)

0 Members and 1 Guest are viewing this topic.

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
another problem with new favs feature
« on: August 12, 2007, 03:18:49 pm »

sorry about the topic title :)

Ok so I'll try and be clear with this.

The following problem causes cpmfetch to not work, return no error message and also stop the rest of the page working below it...basically the page stops at this code.

I have 3 users, all with a few favorites in the favs folder i coppermine.

I want to do a cpmfetch from all 3 users like this:

$objCpm->cpm_viewLastAddedMediaFrom("favorites=1, 2, 3",1,6,$featured);

but it is crashing if I do all 3 users together.

these combinations of users work fine:
1
2
3
1,2
2,3
1,3

but never:
1,2,3
breaks every time

I have tried combinations from a different 3 users and it works fine so there doesn't seem to be a fundamental problem with combining favorites from many sources.  There is a also no problem when 2 users have the same favorites, at first I thought this might be the problem.

here are the favorites database entries for the three users favorites:
USER 1:
Code: [Select]
YTo4NDp7aTowO2k6ODI5O2k6MTtpOjg0ODtpOjI7aTo4NDU7aTozO2k6ODQ5O2k6NTtpOjEwNjA7aTo2O2k6MTA3NDtpOjc7aToxMTIwO2k6ODtpOjExMTk7aTo5O2k6MTExMztpOjEwO2k6MTEwMztpOjEyO2k6MTA5NTtpOjEzO2k6MTE0ODtpOjE0O2k6MTE1MDtpOjE1O2k6OTY3O2k6MTY7aToxMjE2O2k6MTc7aToxMjM3O2k6MTg7aTo3OTM7aToxOTtpOjEyNjM7aToyMDtpOjEyNjQ7aToyMTtpOjEyNjE7aToyMjtpOjEyNTQ7aToyMztpOjEzMzI7aToyNDtpOjE0ODk7aToyNTtpOjE1Nzk7aToyNjtpOjE1Nzg7aToyNztpOjE1NTY7aToyODtpOjE1NjY7aToyOTtpOjE1NTE7aTozMDtpOj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To2NjU7aTo2O2k6ODExO2k6NztpOjg1NDtpOjg7aTozMTM2O2k6OTtpOjMwNTU7aToxMDtpOjEyNjE7aToxMTtpOjI4MjY7aToxMjtpOjMxNzg7aToxMztpOjE5MjE7aToxNDtpOjM0NzU7aToxNTtpOjEwNzg7aToxNjtpOjM3OTY7aToxNztpOjQ0ODg7fQ==

USER 3:
Code: [Select]
YToyOntpOjA7aTo0Nzg5O2k6MTtpOjQ2NTA7fQ==

any help with this would be awesome and will be put to use the second a solution is found.

Let me know if you would like any sample data or for me to do any testing for you

Cheers, Nick
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: another problem with new favs feature
« Reply #1 on: August 28, 2007, 12:45:45 pm »

any idea what might be causing this bug?

I don't mind having a go at a fix but right now I have no idea why it is happening...could you point me in the right direction :)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: another problem with new favs feature
« Reply #2 on: September 01, 2007, 09:24:51 am »

any idea what might be causing this bug?

I don't mind having a go at a fix but right now I have no idea why it is happening...could you point me in the right direction :)

First thing I would do is turn up the PHP error reporting.  PHP is fairly good about not just silently dying - but your web server may be causing it to not be as vocal as it would like.

Add something like this to the top of your PHP block

   error_reporting(E_ALL);
   ini_set('display_errors',1);

Maybe that will shed a clue

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: another problem with new favs feature
« Reply #3 on: September 01, 2007, 01:57:02 pm »

absolutely vuud...that does shed a lot of light....here is the error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 6 bytes) in /httpdocs/galleries/cpmfetch/cpmfetch_dao.php on line 1360

I'm going to look this up now :)


edit:
so i increased the memory_limit and max_post_size in php.ini

I think I doubled both from 8 to 16 and from 32 to 64

the error message remains but with slight changes:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2453 bytes) in /var/www/vhosts/amateurillustrator.com/httpdocs/galleries/cpmfetch/cpmfetch_dao.php on line 1360
« Last Edit: September 01, 2007, 02:16:15 pm by nickfzx »
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: another problem with new favs feature
« Reply #4 on: September 01, 2007, 02:45:36 pm »

i think the problem is that as members ad more and more favorites their favs string becomes so long that php finds it takes up too much memory to process these strings.

There are a few ways of dealing with this right...instead of processing the whole string we could add a limit...so that only the last 10 images from the string are processed or something?

Or a truncate string option or something...what do you think?


So there isn't a problem with the code of your favs feature...just a problem with it's efficiency when dealing with lot's of data.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.