|
#1
|
|||
|
|||
|
Has anybody ever written a php script that does an imap_open() call on these cPanel shared servers? Mine fails miserably. What is the correct syntax for the "mailbox", and "user" arguments on cPanel shared servers?
I have tried: Code:
$mbox = imap_open("{localhost}","user@host.com", "password");
$mbox = imap_open("{localhost}INBOX","user@host.com", "password");
$mbox = imap_open("{host.com:143}INBOX","user@host.com", "password");
|
|
#2
|
||||
|
||||
|
I get:
Fatal error: Call to undefined function: imap_open() in /home/magican2/public_html/link/imap.php on line 11 Odd... |
|
#3
|
|||
|
|||
|
Serra, I think the issue on your (dedicated) server is different than mine (on a reseller box). I believe yours may be that your php is not compiled or configured for imap support.
If I call phpinfo(), I see: ----------------------- Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zip' '--with-zlib' -------------------------- imap IMAP c-Client Version 2001 SSL Support enabled Kerberos Support enabled ----------------------------- So it looks like my php is configured for imap support. I found some posts on WHT that imply that the "no response" I'm getting can result from the imap server login timing out due to wrong parameters to imap_open() I found lots of recipes in the WHT posts showing the "right" way, but none have worked for me. |
|
#4
|
||||
|
||||
|
Correct, I just checked, Imap is not supported on my box. I do have mod_imap for email, but php isn't configured for imap. Bummer.
|
|
#5
|
|||
|
|||
|
Well, it didn't work yesterday, but today it works fine!! Maybe the server or some service got rebooted?
It works fine with this syntax, but it is slower. PHP Code:
If you eliminate the name lookups, it works MUCH faster. PHP Code:
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
All times are GMT -5. The time now is 10:08 PM.









