Zend Framework - Not Connecting to IMAP mail server - instead dumps empty php file
Hi guys I'm trying to connect to an imap mail server using zend frameworks Zend_Mail_Storage_Imap function. Its working with some accounts but with most ac开发者_C百科counts it just dies out. I'm connecting using:
$mail = new Zend_Mail_Storage_Imap(array('host' =>$current_dept->incoming_server,
'ssl' =>$current_dept->ssl,
'port'=>$current_dept->incoming_port,
'folder'=>$mbox_name,
'user' =>$current_dept->email,
'password' =>$current_dept->email_psd));
WIth some email accounts teh code doesn't go past this statement - and instead I'm prompted to 'download' the php file being run. Whats happening here - the mail server details are correct.
Did you disable error reporting? Usually you should get a helpful message when something goes wrong.
Use
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
phpSettings.error_reporting = E_ALL|E_STRICT
and/or
phpSettings.log_errors = 1
phpSettings.error_log = "/tmp/php-error.log"
in your configuration file (application.ini). Of course you can make this settings also in the php.ini.
By this an error should be displayed (or logged to /tmp/php-error.log) to help you with debugging.
If it offers you the PHP file for download (and you really receive the PHP code then when accepting the download), there is something wrong with your webserver configuration.
You must make sure that .php files are run properly.
精彩评论