I've solved my initial memory problem, but it's only lead to another! Please see the next post.
First off, I'm using the PHP class version of the API (CMBase.php). I need to get an array of all the subscribers on all the lists. I'm getting errors like this when I try to use the subscribersGetActive method:
[28-May-2010 10:36:12] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 41 bytes) in /Applications/MAMP/htdocs/test/inc/CMBase.php on line 362
I think I'm calling the method correctly (no thanks to the poor API documentation). Here's how I am calling it:
$test = $cm->subscribersGetActive( 0, $list_id );
I have all of the list IDs in an array, which I loop through to get the subscribers for each one. I am trying to store the returned array of subscribers in another array. The thing is, when I try to use the subscribersGetActive method, it breaks :(
I don't think there are too many people in the list, as I've tried the method by itself on one list, and I still get the memory error. I've also tried running it on a couple different servers, as well as the MAMP "server" on my local machine.
Is there any way to fix this?
OK! I have discovered that I get the memory errors on lists that have a lot of members. I am using the subscribersGetActive() method to get all the emails from a list. It worked on a list of 5238 members, but failed on a list of 8401 members, so the limit must be between those numbers somewhere.
Anyway, how can I retrieve the emails from a really big list without a memory error? I've looked at the souce file, but I can't seem to find a way to limit what subscribersGetActive() retrieves. Then again, I'm only familiar with PHP, and not any of the cURL, POST, Soap, or whatever the source code is translating the PHP into.
It sounds like a developer should take a look at this for you. Can you contact us with the specific account and list information and a developer can take a look on Monday when they get back into the office? Thanks.
Please keep this post updated as we are running into the same issue! Thanks a lot.
I talked to yammez via support recently and we concluded that this was a problem with either his PHP setup or the PHP wrapper itself.
We weren't seeing any errors occurring on our servers for the calls he was making as described above. The calls returned successful responses in all cases. The problem was the way the results were being processed.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free