1

I'm currently using ZendGData to get video IDs from channels on youtube. However, when the channel is quite large, I'm getting this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 
46 bytes)

If I could, I wouldn't use the library but I can't find a way to display all the videos from a channel on a single page (they're using Ajax to load more videos when you request it via a button). This would be the best because I could simply strip some tags to get IDs.

Does anyone have a solution?

Flyk
  • 245
  • 2
  • 8
  • 19
Simon
  • 364
  • 1
  • 5
  • 18
  • Please show the code you're using to load and display videos. – FoolishSeth Mar 28 '13 at 04:41
  • https://developers.google.com/youtube/2.0/developers_guide_php#Pagination I'm using the code shown there and in the foreach loop, I'm adding the video ID to an array. – Simon Mar 28 '13 at 12:58

1 Answers1

1

Your PHP runs out of memory since you're creating loads and loads of objects. What worked for me was setting the PHP memory limit to infinite. You can do this either in your php.ini or with ini_set('memory_limit', '-1');

CupOfTea696
  • 1,266
  • 3
  • 14
  • 29