怎样解决SSL证书图标连接不安全

2018年10月24日 由 Amon 没有评论 »

SSL证书部署以后,访问站点提示“连接不安全”。

因为SSL证书对网站代码的安全性要求很高,但许多用户网站中却使用了大量的外链,而这些外部的资源(图片或js)正是不安全的因素所在,因此用户在部署SSL证书后需要对网站代码进行调整,这样才能保障网站的安全。

可以使用谷歌浏览器(Google Chrome)排查问题:

1. 使用谷歌浏览器打开网站。

2. 按 Fn键 + F12键 查看。

3. 把发现存在的“http”链接进行处理。

所有图标意义介绍:https://support.mozilla.org/zh-CN/kb/%E7%AB%99%E7%82%B9%E6%A0%87%E8%AF%86%E6%8C%89%E9%92%AE

报错:DataTables warning: table id=tableLinkedAccounts – Invalid JSON response.

2018年10月18日 由 Amon 没有评论 »

在调试WHMCS时,遇见报错:

DataTables warning: table id=tableLinkedAccounts - Invalid JSON response. 

设置Full Friendly URL之后就OK了。

参考:https://whmcs.community/topic/290579-creating-api-credentials-generete-and-error/

怎样使用SMTP服务器发送邮件

2018年10月11日 由 Amon 没有评论 »

【问题】

如果2处发送人电邮地址不一致,报错:

There has been an error sending the message. The following From address failed: support@name.com : MAIL FROM command failed,mail from address must be same as authorization user ,501,SMTP server error: MAIL FROM command failed Detail: mail from address must be same as authorization user SMTP code: 501SMTP server error: MAIL FROM command failed Detail: mail from address must be same as authorization user SMTP code: 501 

如果失败,PHPMailer将无法发送电子邮件,报错:

SMTP connect() failed

【方法】

Ping:检查它在哪里?

即使服务器被禁用,所有的服务通常都会对简单的Ping做出响应,所以如果你知道你的DNS是好的,检查服务器是否真的存在:

ping smtp.gmail.com  

返回(按Ctrl + C停止它):

PING gmail-smtp-msa.l.google.com (74.125.133.108): 56 data bytes
64 bytes from 74.125.133.108: icmp_seq=0 ttl=43 time=72.636 ms
64 bytes from 74.125.133.108: icmp_seq=1 ttl=43 time=68.841 ms
64 bytes from 74.125.133.108: icmp_seq=2 ttl=43 time=68.500 ms

telnet:检查它是一个邮件服务器?

可能是某个其他服务正在您尝试连接的SMTP端口上运行。你可以使用这个telnet工具来检查这个(在提交服务端口上连接到gmail):

telnet smtp.gmail.com 587  

返回:

Trying 173.194.67.109...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
    220 mx.google.com ESMTP ex2sm16805587wjd.30 - gsmtp

如果端口587不起作用,您可以尝试使用端口465或端口25。但端口25通常不支持加密。

如果它没有输出或者没有输出220,那么你的服务器关闭了,或者你的服务器错了。

经过排查,25端口不通,但 587 端口 畅通,果断使用 587 + tls 。

【QQ邮箱SMTP】

实证成功。

QQ
SMTP
8bit
587
smtp.qq.com
username@qq.com
TOKEN
TLS

【Google邮箱SMTP】

实证未遂。

参考:https://blog.csdn.net/zdgdq/article/details/78518508

https://www.wpbeginner.com/plugins/how-to-send-email-in-wordpress-using-the-gmail-smtp-server/

https://console.developers.google.com/apis/api/gmail.googleapis.com/credentials
https://developers.google.com/gmail/imap/imap-smtp

The outgoing SMTP server, smtp.gmail.com, requires TLS. Use port 465, or port 587 if your client begins with plain text before issuing the STARTTLS command.

Outgoing Mail (SMTP) Server

smtp.gmail.com

Requires SSL: Yes

Requires TLS: Yes (if available)

Requires Authentication: Yes

Port for SSL: 465

Port for TLS/STARTTLS: 587
Full Name or Display Name Your name
Account Name, User name, or Email address Your full email address
Password Your Gmail password

【参考】

参考:https://www.fujieace.com/wordpress/smtp-connect-failed.html
参考:https://since1989.org/whmcs/qq-mail-smtp-error-ssl.html
参考:https://www.xxorg.com/archives/717
参考:https://www.xxorg.com/archives/188
参考:http://www.tuxingzhan.com/wpc/3758.html
参考:https://bbs.csdn.net/topics/391894148

报错汇编:php-compile-errors

2018年10月11日 由 Amon 没有评论 »

参考:http://www.123tweak.com/how-to-fix-php-compile-errors/
参考:http://www.cnblogs.com/smallstong/p/3267060.html

Some library errors when compile Php 5 on CentOS

checking for BZip2 support… yes
checking for BZip2 in default path… not found
configure: error: Please reinstall the BZip2 distribution

Fix:
yum install bzip2-devel

checking for cURL support… yes
checking if we should use cURL for url streams… no
checking for cURL in default path… not found
configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

Fix:
yum install curl-devel

checking for curl_multi_strerror in -lcurl… yes
checking for QDBM support… no
checking for GDBM support… no
checking for NDBM support… no
configure: error: DBA: Could not find necessary header file(s).

Fix:
yum install db4-devel

checking for fabsf… yes
checking for floorf… yes
configure: error: jpeglib.h not found.

Fix:
yum install libjpeg-devel

checking for fabsf… yes
checking for floorf… yes
checking for jpeg_read_header in -ljpeg… yes
configure: error: png.h not found.

Fix:
yum install libpng-devel

checking for png_write_image in -lpng… yes
If configure fails try –with-xpm-dir=

configure: error: freetype.h not found.

Fix: Reconfigure your PHP with the following option.
–with-xpm-dir=/usr

checking for png_write_image in -lpng… yes
configure: error: libXpm.(a|so) not found.

Fix:
yum install libXpm-devel

checking for bind_textdomain_codeset in -lc… yes
checking for GNU MP support… yes
configure: error: Unable to locate gmp.h

Fix:
yum install gmp-devel

checking for utf8_mime2text signature… new
checking for U8T_DECOMPOSE…
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

Fix:
yum install libc-client-devel

checking for LDAP support… yes, shared
checking for LDAP Cyrus SASL support… yes
configure: error: Cannot find ldap.h

Fix:
yum install openldap-devel

checking for mysql_set_character_set in -lmysqlclient… yes
checking for mysql_stmt_next_result in -lmysqlclient… no
checking for Oracle Database OCI8 support… no
checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!

Fix:

yum install unixODBC-devel

checking for PostgreSQL support for PDO… yes, shared
checking for pg_config… not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

Fix:
yum install postgresql-devel

checking for sqlite 3 support for PDO… yes, shared
checking for PDO includes… (cached) /usr/local/src/php-5.3.7/ext
checking for sqlite3 files in default path… not found
configure: error: Please reinstall the sqlite3 distribution

Fix:
yum install sqlite-devel

checking for utsname.domainname… yes
checking for PSPELL support… yes
configure: error: Cannot find pspell

Fix:
yum install aspell-devel

checking whether to enable UCD SNMP hack… yes
checking for default_store.h… no

checking for kstat_read in -lkstat… no
checking for snmp_parse_oid in -lsnmp… no
checking for init_snmp in -lsnmp… no
configure: error: SNMP sanity check failed. Please check config.log for more information.

Fix:
yum install net-snmp-devel

checking whether to enable XMLWriter support… yes, shared
checking for xml2-config path… (cached) /usr/bin/xml2-config
checking whether libxml build works… (cached) yes
checking for XSL support… yes, shared
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

Fix:
yum install libxslt-devel

configure: error: xml2-config not found. Please check your libxml2 installation.

Fix:
yum install libxml2-devel

checking for PCRE headers location… configure: error: Could not find pcre.h in /usr

Fix:
yum install pcre-devel

configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!

Fix:
yum install mysql-devel

checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!

Fix:
yum install unixODBC-devel

checking for pg_config… not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

Fix:

yum install postgresql-devel

configure: error: Cannot find pspell

Fix:
yum install pspell-devel

configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.

Fix:
yum install net-snmp-devel

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

Fix:
yum install libxslt-devel

怎样注册.LI域名

2018年10月11日 由 Amon 没有评论 »

【资质】

.LI是列支敦士登的国家域名后缀。

【资质】

SWITCH复制管理 .LI 和 .CH 2个国别后缀。

参考:https://www.nic.li/registrars/becomeregistrar/
协议:https://www.nic.li/export/shared/.content/files/Agreement_en.pdf