Re: [Components] FW: ezcDbFactory - Oracle
On Thu, 24 Jul 2008, eddier waldir gallego rios wrote: but when a try whit ez components it's not perform, I think the Oracle service name is the problem or the server name localhost $dbparams = array( 'type' = 'oracle', 'dbname' = 'EWG', 'user' = 'ARIESW', 'pass' = 'ariesW' ); $db = ezcDbFactory::create($dbparams ); Or $db = ezcDbFactory::create('oracle://ARIESW:[EMAIL PROTECTED]/ewg' ); Sometimes I feel limit whit my english and is hard to explain what i did. I don't know, but in our case ezctest is both the name of the service *and* service. You're not mentioning which error you're getting though so it's hard to say what is going wrong. regards, Derick -- eZ components Product Manager eZ systems | http://ez.no -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components
[Components] using fetchFromOffset when there are 0 messages
Hey Gang...I use EZ to parse incoming messages on my server... I was using this to pull my messages $set = $pop3-fetchAll(); but found an issue when my server had a problem and my mail got backed up. When EZcomponents tried to fetch all messages, there were too many and I had memory exhaustion problems (I had been away on vacation and didnt get a chance to see the problem for a few days.. so the messages built upYIKES!) So I thought to use this to only get the first 50 (my script is called every 2 minutes, so that should be fine) $set = $pop3-fetchFromOffset( 1, 50 ); But the problem is that if there are no messages on the server I get an offset error. Fatal error: Uncaught exception 'ezcMailOffsetOutOfRangeException' with message 'The offset '1' is outside of the message subset '1', '50'.' in /usr/include/php/ezcomponents-2008.1/Mail/src/transports/ pop3/pop3_transport.php:800 Stack trace: #0 /var/www/vhosts/ mydomain.com/httpdocs/_maintenance/phpcgi/inboxManager.php5(76): ezcMailPop3Transport-fetchFromOffset(1, 50) #1 {main} thrown in/usr/ include/php/ezcomponents-2008.1/Mail/src/transports/pop3/ pop3_transport.php on line 800 I figure I can check to see if there are messages first, is that a good idea? which is the better way to do that? $messages = $pop3-listMessages(); and check the length of the array or using $pop3-status( $num, $size ); and check the value of $num? would this be slower? Is there a better method I should be using here? I would have to call $pop3-delete() to delete each message as I cycle through them. is there an attribute I can use such as true that I can add to fetchFromOffset() to delete messages as I cycle through it. Thanks, Fish -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components