【问题标题】:Tectite formmail php script error when migrating to https://迁移到 https:// 时出现 Tectite formmail php 脚本错误
【发布时间】:2017-08-24 09:44:00
【问题描述】:

Tectite formmail 迁移到 https:// 时出错

提交表单后,浏览器转到:

https://test.harrieboerhof.nl/templates/HB-home/forms/fmbadhandler.php?insession=1&vuyk=790dg132pl9sm33qcla6ho7dn5

并给出带有此消息的白页:

"insession specified, but no data found in session "

我收到一封主题为“FormMail 脚本错误”的邮件和消息:

mail_failed ********** 错误=发送电子邮件失败

加上主题为“FormMail 脚本错误”的邮件和消息:

套接字错误0::

在浏览器中使用https://www.harrieboerhof/templates/HB-home/forms/formmail-aanvraag-tuinontwerpgesprek.php?testalert=1 进行测试时会显示一条消息:

已发送测试消息。查看你的邮件。

然后收到一封邮件:

这是一条测试警报消息 加载的语言是英文(内置) PHP 版本是 7.0.22-0ubuntu0.16.04.1 FormMail 版本是 8.24 服务器 类型:非Windows

DOCUMENT_ROOT:/var/www/testhtml SCRIPT_FILENAME: /var/www/testhtml/templates/HB-home/forms/formmail-zend-uw-bericht-test.php PATH_TRANSLATED:-未设置- REAL_DOCUMENT_ROOT:/var/www

SERVER_NAME 是 localhost REQUEST_URI 是 /templates/HB-home/forms/formmail-zend-uw-bericht-test.php?testalert=1

用户 IP 地址为 81.206.125.28 用户代理为 Mozilla/5.0(Windows 新台币 6.1;哇64; rv:55.0) Gecko/20100101 Firefox/55.0

表单的html:

<form action="https://test.harrieboerhof.nl/templates/HB-home/forms/formmail-zend-uw-bericht-test.php" enctype="multipart/form-data" method="post">
  <input name="recipients" type="hidden" value="harrie" >
  <input type="hidden" name="bcc" value="mail@domain.nl" />
  <input name="conditions" type="hidden" value="conditions" >
  <input name="subject" type="hidden" value="Contactformulier van website" >
  <input name="mail_options" type="hidden" value="HTMLTemplate=https://test.harrieboerhof.nl/templates/HB-home/forms/zend-ons-uw-bericht.htm, NoPlain, FromAddr=noreply@harrieboerhof.nl,TemplateMissing=-, CharSet=utf-8 " >
  <input name="good_url" type="hidden" value="https://test.harrieboerhof.nl/nl/zend-ons-uw-bericht-bedankt/" >
  <input name="bad_url" type="hidden" value="https://test.harrieboerhof.nl/templates/HB-home/forms/fmbadhandler.php" >
  <input name="this_form" type="hidden" value="https://test.harrieboerhof.nl/nl/contact-met-uw-tuinman-hovenier-uit-drenthe/contactformulier/" />
  <input name="bad_template" type="hidden" value="https://test.harrieboerhof.nl/nl/onvolledige-contactaanvraag/" />

当我使用 http:// 版本的测试站点时,一切正常。 我在谷歌上搜索过这种情况,但这似乎是第一次发生这种情况,希望有人知道可能是什么问题?

编辑:接受的答案并不完全是答案,请查看下面的 cmets。

【问题讨论】:

    标签: php https formmail


    【解决方案1】:

    我怀疑问题在于 PHP 会话在您的 https://test 站点上无法正常工作。

    “vuyk”似乎是会话名称。

    你也有

    $SESSION_NAME = "vuyk";

    在 FormMail 和 FMBadHandler 中?

    如果是这样,那么您的https://test 站点的会话配置可能存在问题。

    【讨论】:

    • 是的,$SESSION_NAME 在两个文件中都设置为“vuyk”。奇怪的是,当使用 http:// 进行测试时,一切正常。我在test.harrieboerhof.nl/info.php 上做了一个 phpinfo()
    • 好的,我们将把它离线并直接处理它。
    • 发现及解决办法:根本原因是TEMPLATEURL的设置结合nginx的配置。 “Socket”错误是由 FormMail 尝试访问电子邮件模板引起的,并且由于 TEMPLATEURL 设置为“localhost”而失败。 Nginx 未配置 SSL 访问 localhost,这导致无法加载模板。由于未能打开模板,FormMail 随后发送了“发送电子邮件失败”警报消息。会话错误与实际问题无关。
    • 将脚本升级到更适合php7的最新版本后,消息“insession specified, but no data found in session”消失了
    猜你喜欢
    • 2023-03-23
    • 2015-10-10
    • 2016-10-03
    • 1970-01-01
    • 2023-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-10
    相关资源
    最近更新 更多