Ver Mensaje Individual
  #12 (permalink)  
Antiguo 09/03/2009, 18:49
scorpionhack
 
Fecha de Ingreso: noviembre-2007
Mensajes: 229
Antigüedad: 16 años, 5 meses
Puntos: 0
Cita:
Iniciado por GatorV Ver Mensaje
Parece ser un bug con algunas instalaciones de PHP / OpenSSL Sobre Windows, te recomendaría probar el código en una plataforma Unix.

Saludos
pufff no tengo ninguna plataforma unix para probarlo... no hay ninguna otra forma de hacerlo o algo?

he descubierto que si pongo un arroba antes de imap_open me cambia el mensaje de error...

Código PHP:
<?php
$mbox 
= @imap_open("{imap.gmail.com:993/imap/ssl}""javiersi****@gmail.com""****"OP_HALFOPEN)
      or die(
"can't connect: " imap_last_error());

$list imap_list($mbox"{imap.gmail.com:993/imap/ssl}""*");
if (
is_array($list)) {
    foreach (
$list as $val) {
        echo 
imap_utf7_decode($val) . "\n";
    }
} else {
    echo 
"imap_list failed: " imap_last_error() . "\n";
}

imap_close($mbox);
?>

el error es este...
Código HTML:
can't connect: Can't open mailbox {imap.gmail.com:993/imap/ssl}: invalid remote specification
Notice: (null)(): Can't open mailbox {imap.gmail.com:993/imap/ssl}: invalid remote specification (errflg=2) in Unknown on line 0
estas son las extensiones que tengo activas en php por si sirve de algo...

Código HTML:
   apache  [ fonctions ]
       bcmath  [ fonctions ]
       calendar  [ fonctions ]
       com  [ fonctions ]
       ctype  [ fonctions ]
       ftp  [ fonctions ]
       gd  [ fonctions ]
       imap  [ fonctions ]
       mysql  [ fonctions ]
       odbc  [ fonctions ]
       openssl  [ fonctions ]
       overload  [ fonctions ]
       pcre  [ fonctions ]
       session  [ fonctions ]
       standard  [ fonctions ]
       tokenizer  [ fonctions ]
       wddx  [ fonctions ]
       xml  [ fonctions ]
       zlib  [ fonctions ]

graciasss

he encontrado esto que dice como arreglarlo pero no lo entiend bien alguien que tenga mas conocimientos sabe explicarmelo?

Gracias

http://bugs.php.net/bug.php?id=29036

Código HTML:
Description:
------------
The php_imap extension is unable to connect over ssl to an imap server.
The reason is because the ssl engine is not initialized: 
In php_imap.c Line 435 the function 
  ssl_onceonlyinit ();
is not called on windows systems. 

The following fix will correct this:
*** php_imap.c.org	Thu Jan 15 01:36:08 2004
--- php_imap.c	Thu May 06 13:28:30 2004
***************
*** 427,438 ****
  #ifndef PHP_WIN32
  	auth_link(&auth_log);		/* link in the log authenticator */
  	auth_link(&auth_md5);       /* link in the cram-md5 authenticator */

  #if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
  	auth_link(&auth_gss);		/* link in the gss authenticator */
  #endif
  
  #ifdef HAVE_IMAP_SSL
  	ssl_onceonlyinit ();
- #endif
  #endif

--- 427,438 ----
  #ifndef PHP_WIN32
  	auth_link(&auth_log);		/* link in the log authenticator */
  	auth_link(&auth_md5);       /* link in the cram-md5 authenticator */

  #if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
  	auth_link(&auth_gss);		/* link in the gss authenticator */
  #endif
+ #endif
  
  #ifdef HAVE_IMAP_SSL
  	ssl_onceonlyinit ();
  #endif

Última edición por GatorV; 09/03/2009 a las 21:54