Articles of PHP

从源代码升级在Apache的openssl并设置为默认

我已经将openssl从源代码版本升级到安装在/ usr / local / ssl / bin / openssl下的Apache OpenSSL 1.0.1s版本,并更改​​符号链接将其指向新的安装目录并运行以下命令。 $openssl version OpenSSL 1.0.1s 1 Mar 2016 它显示了新的升级版本,但使用php或检查phpinfo()时,它仍然显示旧版本。 phpinfo()函数: OpenSSL support enabled OpenSSL Library Version OpenSSL 1.0.1k-fips 8 Jan 2015 OpenSSL Header Version OpenSSL 1.0.1k-fips 8 Jan 2015 Openssl default config /etc/pki/tls/openssl.cnf 请build议我如何使这个新版本在所有地方都有效,我也在我的网站上安装了ssl,我还需要重新生成CSR和私钥,并重新颁发ssl证书。 提前致谢。

Laravel EC2 Nginx PHP 7脚本下载而不是执行

php脚本在安装了nginx的Amazon EC2服务器上下载,而不是被执行。 这是我的nginx conf文件: user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { log_format main '$remote_addr – $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; # Load modular configuration files from the […]

ownCloud在反向代理configuration中失败

我的设置是,ownCloud在192.168.200.1的内部服务器上运行。 在43.23.104.153有一个公共的Apache与mod_proxy将请求转发到内部服务器: ProxyPass /edward https://192.168.200.1/owncloud/ ProxyPassReverse /edward https://192.168.200.1/owncloud/ 根据反向代理支持手册configurationowncloud: $CONFIG = array ( […] 'trusted_domains' =>. array ( 0 => '192.168.200.1', ), # 'trusted_proxies' => [ '43.23.104.153'], 'overwritehost' => 'external.tld', 'overwritewebroot' => '/edward', ); 我可以在https://192.168.200.1/owncloud没有任何问题的情况下访问这个站点。 但是,当我导航到https://external.tld/edward ,login后,我得到一个内部服务器错误。 日志文件包含: {"reqId":"d5K1uNLeJyGSC8LUQXgM","remoteAddr":"43.23.104.153","app":"index","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"The requested uri(\\\/owncloud \\\/index.php\\\/apps\\\/files\\\/) cannot be processed by the script '\\\/owncloud\\\/\\\/index.php')\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/ba se.php(837): OC\\\\AppFramework\\\\Http\\\\Request->getRawPathInfo()\\n#1 \\\/var\\\/www\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#2 […]

如何在运行重要的基准之前validationnetworking质量?

我在世界各地有多个CentOS服务器。 他们都运行一个PHP脚本,每分钟testing一次服务的延迟。 问题是,有时这些服务器有本地问题,并错误地将远程服务标记为closures或巨大的延迟。 是否有某种testing我可以在主基准之前运行,以确保本地服务器/networking没有任何问题,并不会影响基准? PS我没有运行像服务一样的Pingdom,所以我不能做一个不同的服务器的结果validation。 我必须信任每台服务器发送有效数据,并且所有数据validation必须在每台服务器上都是本地的。

弹性Beanstalk和Worker Tier? (PHP)

我试图设置我的应用程序,这是在EB上托pipe一个工作,将运行一些基本的cron作业,为应用程序消耗的数据提供一个RDS数据库。 我首先部署了这个cron.yaml : version: 1 cron: – name: "count" url: "/api/dostuff" schedule: "* * * * *" – name: "fetch" url: "/api/dootherstuff" schedule: "*/10 * * * *" 这给了我一个有严重健康问题的工人 100.0 % of the requests are erroring with HTTP 4xx. login到我的工作者ec2实例我注意到这在我的access_log 127.0.0.1 (-) – – [23/May/2016:08:54:13 +0000] "POST /api/dostuff HTTP/1.1" 404 207 "-" "aws-sqsd/2.3" 显然,它没有find端点。 我的印象是,工作人员与我的主要应用程序接口,并试图进行调查。 […]

我安装了PHP 7.x后,phpinfo仍然显示较老的PHP 5.x

我安装了PHP 7.x后,phpinfo仍然显示较老的PHP 5.x 我应该清除旧版本? 或者是什么? 谢谢

Apache为gzip压缩204响应返回无效的Content-Length

当apache返回带有204响应代码的gzip压缩响应,而空主体服务器返回无效头Content-Length: 20而不是Content-Length: 0 。 如果没有gzip压缩(没有Accept-Encoding标头)服务器返回有效的头Content-Length: 0 。 压缩请求和响应: 0 % curl -v http://mta.dev/api/wtf/\?id\=09102 –compressed * Hostname was NOT found in DNS cache * Trying 172.17.0.2… * Connected to mta.dev (172.17.0.2) port 80 (#0) > GET /api/wtf/?id=09102 HTTP/1.1 > User-Agent: curl/7.38.0 > Host: mta.dev > Accept: */* > Accept-Encoding: deflate, gzip > < HTTP/1.1 204 No […]

PHP“mysqli.so:undefined symbol:mysqlnd_connect in Unknown on line 0”

我一直试图让PHP CLI(Ubuntu上的7.0.7)与mysqli一起工作,但没有成功。 我在启动时收到相同的错误信息: mysqli.so: undefined symbol: mysqlnd_connect in Unknown on line 0 这是来自php -i的一些输出(清楚地显示两者都被加载): mysqli MysqlI Support => enabled Client API library version => mysqlnd 5.0.12-dev – 20150407 – $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $ Active Persistent Links => 0 Inactive Persistent Links => 0 Active Links => 0 Directive => Local Value => Master Value mysqli.allow_local_infile => […]

PHP:没有映射的Unicode字符…,特定的希腊字符

我有一个Windows IIS服务器与PHP工作。 用户通过HTML表单插入一个单词,然后转到PHP,然后PHP调用一个COM dll(vb6)函数,将该单词作为utf8string传递给该函数。 一切都很好,直到input包含大写希腊字母与dialytika,如http://unicode-table.com/en/03AA/ 当发生这种情况时,PHP警告告诉我: [07-Jul-2016 14:15:50 Europe/Athens] PHP Warning: Unknown: Could not convert string to unicode: No mapping for the Unicode character exists in the target multi-byte code page. 和一个不同的混乱的string通过。 例如,单词μαϊου将工作正常,但μαΪου这个词会产生警告。 这里是.dll函数在这两种情况下看到的内容: 我试着玩了一些PHP设置,但没有改变。 php.ini的当前设置(我从默认更改为以下 – 但仍然没有): default_charset = "utf-8" com.code_page="utf-8" mbstring.internal_encoding = UTF-8 我不知道我必须做些什么来解决这个问题。 提前感谢您的任何见解。

如何解决Apache2 w / suPHP扫描正确的.ini目录?

Apache2正在读取/ etc / php5 / apache2中的php.ini的正确区域,直到suPHP被添加到系统。 在/etc/apache2/mods-available/suphp.conf中configurationsuPHP_ConfigPath将加载正确的php.ini,但不会更正要扫描的目录。 我如何以及在哪里修复这个问题,以便Apache从/ etc / php5 / apache2目录加载/扫描/使用PHP? 编辑1:这也打破了“应用程序/ x-httpd-php”,特别是localhost / phpmyadmin /。 Edit2: 运行phpmyadmin和suphp可以解决phpMyAdmin和其他所有使用/ usr / share /的问题。 ==== michael@local [~/public_html]# pwd /home/michael/public_html michael@local [~/public_html]# alias relub alias relub='cat /etc/os-release && uname -a' michael@local [~/public_html]# relub NAME="Ubuntu" VERSION="14.04.5 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.5 LTS" VERSION_ID="14.04" HOME_URL="www.ubuntu.com/" SUPPORT_URL="help.ubuntu.com/" […]