synox / disposable-mailbox

self-hosted disposable email service (php) using catch-all and imap
GNU General Public License v3.0
390 stars 147 forks source link

index.php not loading correctly #70

Closed dave90dave closed 5 years ago

dave90dave commented 5 years ago

Hello, I tried to install the disposable mail system and followed the instructions on the github page, the details if've filled in are all correct but when loading the index.php it only shows a $_GET link in the url bar with the generated email box. But the page stays blank. Is there something that has to be changed, my server meets the requirements.

regards Dave

joshp23 commented 5 years ago

Consider providing more information, such as system setup, browser, log detail, etc.

dave90dave commented 5 years ago

Hello Josh, I got it running on PHP 7.2 I tested the Imap function and it says it is installed PHP errors are enabled, but there are no errors shown on the website. Browser: Firefox 62.0.3 (tried chromium too) My website: www.davehulst.nl (you can take a look here) Should there be a log somewhere around, and is it possible to install this software without composer?

joshp23 commented 5 years ago

You can check the webserver's log file. With apache it's in /var/log

joshp23 commented 5 years ago

You might consider turning on the developer console in FF and see if there is anything there.

mernoid commented 5 years ago

I have exactly the same issue. I am using SIteground with Imap and everything. Domain: https://www.distempmail.com/

There are no relevant errors in the error log or in the console.

dave90dave commented 5 years ago

In my error log are just 2 lines saying that the config.php was not found, and thats right because i didn't set my config file then. That is my full log

joshp23 commented 5 years ago

Seems like you should set your config.php... please don't forget to close this issue.

synox commented 5 years ago

@joshp23 thanks for the support!

synox commented 5 years ago

71 should improve this

dave90dave commented 5 years ago

I'm sorry, but this was not the problem, i already have set this config, moved it to /private directory. And I changed the index/json api too. But even then it doesn't work. I reinstalled it right now and problem is still not solved. I tried an old version of this software too just now, and doesn't work too. :/ Am I doing something wrong?

In my error log are just 2 lines saying that the config.php was not found, and thats right because i didn't set my config file then. That is my full log

joshp23 commented 5 years ago

check your permissions on config.php, and make sure the path settings are correct in index/json

dave90dave commented 5 years ago

Thats very stupid from me, I didn't get any errors because the ini_set & error reporting function where commented out. Now I get the following error message: Fatal error: Uncaught PhpImap\Exception: Connection error: Certificate failure for imap.transip.email: self signed certificate in certificate chain: /C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root in /www/backend-libs/php-imap/php-imap/src/PhpImap/Mailbox.php:67 Stack trace: #0 /www/backend-libs/php-imap/php-imap/src/PhpImap/Mailbox.php(58): PhpImap\Mailbox->initImapStream() #1 /www/imap_client.php(19): PhpImap\Mailbox->getImapStream() #2 /www/controller.php(159): ImapClient->get_emails(Object(User)) #3 /www/index.php(22): DisplayEmailsController->invoke(Object(ImapClient)) #4 {main} thrown in /www/backend-libs/php-imap/php-imap/src/PhpImap/Mailbox.php on line 67 Notice: Unknown: Certificate failure for imap.transip.email: self signed certificate in certificate chain: /C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root (errflg=2) in Unknown on line 0

It looks like the SSL certificate is self signed, do I need to add a php mail tag or something to let the php application connect to the imap server with self signed certificate?

By the way: Is it not more handy if the error log is enabled by default? It makes it easier by first installation.

dave90dave commented 5 years ago

I have exactly the same issue. I am using SIteground with Imap and everything. Domain: https://www.distempmail.com/

There are no relevant errors in the error log or in the console.

Did you enable the following flags in the config.php by removing the comment // like this?

// enable while testing:
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

That should enable the error log

dave90dave commented 5 years ago

Found the solution: add novalidate-cert to the imap url in config like this: $mbox = imap_open('{mail.domain.com:143/novalidate-cert}INBOX', 'user@domain.com', 'userpass');

joshp23 commented 5 years ago

Why not just use letsencrypt certificates?

dave90dave commented 5 years ago

Why not just use letsencrypt certificates?

I was using Lets encrypt, but since I protect my domain with cloudflare the cloudflare certificate will be used :/

nraikm commented 5 years ago

@dave90dave Did you mean ('{mail.domain.com:143/ssl/novalidate-cert}?

nraikm commented 5 years ago

This issue showed up as a 500 Error for me