Hi! ,

5/10/01 6:15:19 PM, [EMAIL PROTECTED] wrote:

>...
>|| -> OR  ( || die(.. -> OR die(.. )

thanks!, it works now with OR. I understand the language operators precedence, but I 
still have two points
 to comment if you don't mind:

1. The sample at http://www.php.net/manual/en/function.imap-getmailboxes.php may lead 
to confusion.
2. could you please be so kind as to explain me why

$c1 = ociplogon("user","pwd","devunix");
$mbox = imap_open("{tux.comunet.es}","oituino","oituino",OP_HALFOPEN) || die("can't 
connect: ".imap_last_error());

fails and just:

$mbox = imap_open("{tux.comunet.es}","oituino","oituino",OP_HALFOPEN) || die("can't 
connect: ".imap_last_error());

works?. What has that first line to do with operators precedence? The ociplogon is a 
completely different line,
and the operator || is wrong anyway in both examples!. I'm relatively new to PHP and 
perhaps I'm not aware of 
some quirks PHP has.

Thanks for your time, Sniper and all the people there!

F.J. Ortiz

>
>http://www.php.net/manual/en/language.operators.precedence.php
>
>Previous Comments:
>---------------------------------------------------------------------------
>
>[2001-05-10 13:09:05] [EMAIL PROTECTED]
>just comment that using imap_listsubscribed or imap_listmailboxes instead using 
>imap_getmailboxes after a database connection also yields the same error (Warning: 
Unable to find stream pointer in ...)
>
>
>
>---------------------------------------------------------------------------
>
>[2001-05-10 12:20:56] [EMAIL PROTECTED]
>Now, this is a hard one I think, at least to explain:
>
>brief explanation: (full code later)
>
>imap_open + imap_getmailboxes -> works fine alone
>
>Database connection + imap_open + imap_getmailboxes -> generates this error: 
>
>Warning: Unable to find stream pointer in 
>/usr/local/apache/htdocs/folder/correo_carpetas.php on line 8 (where 
>imap_getmailboxes is)
>imap_getmailboxes failed: 
>Warning: Unable to find stream pointer in 
>/usr/local/apache/htdocs/folder/correo_carpetas.php on line 21 (where imap_close is)
>
>I tried with two database connections: against MSSQL 7.0 and Oracle8i. Just a call to 
>mssql_connect or OCIPLogon spoils the whole thing. Comment that line, and all 
the mailboxes will be listed fine.
>
>Full example:
>
><?php
>
>/* fails with Oracle8i + PHP (IIS/Win32 or Apache/Linux) */
>/* also fails with mssql_connect under IIS/Win32 */
>/* comment the next 3 lines and everything will go ok (it's just like the sample 
>provided in PHP manual ! */
>
>$c1 = ociplogon("myuser","mypwd","devunix");
>ocilogoff($c1);
>
>       $mbox = imap_open("{tux.comunet.es}","user","userpwd",OP_HALFOPEN) || 
>die("can't connect: ".imap_last_error());
>        
>       $list = imap_getmailboxes($mbox,"{tux.comunet.es}","*");
>       if(is_array($list)) {
>         reset($list);
>         while (list($key, $val) = each($list))
>         {
>           print "($key) ";
>           print imap_utf7_decode($val->name).",";
>           print "'".$val->delimiter."',";
>           print $val->attributes."<br>n";
>         }
>       } else
>         print "imap_getmailboxes failed: ".imap_last_error()."n";
>        
>       imap_close($mbox);                        
>
>?>
>
>I hope I made myself clear. Ask me whatever you need.
>
>Greetings,
>
>F.J. Ortiz
>
>
>---------------------------------------------------------------------------
>
>
>
>ATTENTION! Do NOT reply to this email!
>To reply, use the web interface found at http://bugs.php.net/?id=10796&edit=2
>
>
>-- 
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

___________________________________
Francisco Javier Ortiz Torre
ComuNET,S.A.
mailto:[EMAIL PROTECTED]

ComuNET, S.A
Gral. Concha 39,6º
48012 Bilbao España
Tel: +34 944 700 101 
Fax: +34 944 700 185 
http://www.comunet.es
___________________________________



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to