No registo de erros aparece isto
Voltei a olhar e
[Tue Nov 01 15:40:13.835164 2016] [:error] [pid 11416:tid 1080] [client ::1:61570] PHP Warning: mail(): Failed to connect to mailserver at "ssl://smtp.gmail.com" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\\WebServer\\Apache24\\htdocs\\html\\www\\mail.php on line 11
[Tue Nov 01 15:43:43.823313 2016] [mpm_winnt:notice] [pid 1564:tid 556] AH00424: Parent: Received restart signal -- Restarting the server.
[Tue Nov 01 15:43:44.263621 2016] [ssl:warn] [pid 1564:tid 556] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 01 15:43:44.263621 2016] [mpm_winnt:notice] [pid 1564:tid 556] AH00455: Apache/2.4.23 (Win64) PHP/7.0.11 OpenSSL/1.0.2j configured -- resuming normal operations
[Tue Nov 01 15:43:44.263621 2016] [mpm_winnt:notice] [pid 1564:tid 556] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:43:51
[Tue Nov 01 15:43:44.263621 2016] [core:notice] [pid 1564:tid 556] AH00094: Command line: 'C:\\WebServer\\Apache24\\bin\\httpd.exe -d C:/WebServer/Apache24'
[Tue Nov 01 15:43:44.269625 2016] [mpm_winnt:notice] [pid 1564:tid 556] AH00418: Parent: Created child process 5284
[Tue Nov 01 15:43:44.964116 2016] [ssl:warn] [pid 5284:tid 488] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 01 15:43:44.965117 2016] [mpm_winnt:notice] [pid 5284:tid 488] AH00354: Child: Starting 64 worker threads.
[Tue Nov 01 15:43:45.824744 2016] [mpm_winnt:notice] [pid 11416:tid 488] AH00364: Child: All worker threads have exited.
[Tue Nov 01 15:43:57.216633 2016] [:error] [pid 5284:tid 1072] [client ::1:61697] PHP Warning: mail(): Failed to connect to mailserver at "ssl://smtp.gmail.com" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\\WebServer\\Apache24\\htdocs\\html\\www\\mail.php on line 11
[Tue Nov 01 15:44:17.866775 2016] [mpm_winnt:notice] [pid 1564:tid 556] AH00424: Parent: Received restart signal -- Restarting the server.
AH00112: Warning: DocumentRoot [C:/Apache24/htdocs] does not exist
AH00526: Syntax error on line 144 of C:/WebServer/Apache24/conf/extra/httpd-ssl.conf:
SSLCertificateFile: file 'C:/Apache24/conf/server.crt' does not exist or is empty
[Tue Nov 01 15:44:19.869320 2016] [mpm_winnt:notice] [pid 5284:tid 488] AH00364: Child: All worker threads have exited.
Para além de não saber qual o ficheiro onde está o tal documentroot (o meu é C:\WebServer\Apache24\htdocs\html\www) reparei que o tal ficheiro
como não encontro esse tal server.crt fui procurar como o encontrar, parece que vai ser mais complicado que parecia... :S (O DocumentRoot já foi alterado, como o apache não reinicia devido a erro ainda aparece o link errado)
Lembrei-me de correr o OpenSSL que descarreguei daqui http://slproweb.com/products/Win32OpenSSL.html na linha de comandos mas como Admin. Criou o certificado de acordo com os dados que dei. Obviamento tudo inventado xD Depois do certificado criado foi só colocar em C:\WebServer\Apache24\conf. Reiniciei o apache e desta vez sem problemas. Tudo ok. Quando fui novamente correr o mail.php através do localhost continua a dar este erro
Warning: mail(): Failed to connect to mailserver at "tls://smtp.gmail.com" port 587, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\WebServer\Apache24\htdocs\html\www\mail.php on line 10
↧