Articles of php fpm

Munindynamicgraphics缩放(dynazoom)不起作用(Nginx,PHP-FPM)

Debian 7.5 Nginx / 1.6.0 PHP 5.6.0RC2(fpm-fcgi)(built:Jul 11​​ 2014 08:17:52)Munin v2.0.21-2 我在网上search了几天来解决我的问题,但似乎没有人知道该怎么做。 我得到了穆宁和运行,但穆宁dynamicgraphics变焦(dynazoom)不工作,它似乎是一个CGI问题我已经用lighttpd和Apache使用spawnfcgitesting穆宁和一切工作正常,但不是与php5-fpm。 在缩放屏幕上显示的graphics,但不是与php5-fpm它只是显示一个破碎的图像链接就像这张图片http://serversupportforum.de/forum/attachments/monitoring/4901d1373968950-munin-dynazoom-funktioniert-nicht-1592281191 .png “Munindynamicgraphics缩放(dynazoom)” 现在很多人都在用php-fpm来使用Nginx,所以我认为这对很多人来说都是很有帮助的。 例如: https : //stackoverflow.com/questions/18645812/munin-dynamic-graph-zoom-dynazoom-not-working-centos6-nginx-php-fpm 这是我的nginxconfiguration文件: user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens […]

在Nginx中禁用FastCGI读取超时?

有没有办法来禁止FastCGI读取超时? (fastcgi_read_timeout) 将其设置为零不起作用,只会导致立即超时。 Nginx 1.0.5 PHP-FPM 5.3.6-13ubuntu3.6 我需要解决超时的原因是由于我们使用的系统生成报告的方式。 由于在PHP-FPM中分叉是不可能的(pctnl_fork()被禁用),报告处理在请求被发送后立即完成。 这会导致读取挂起,直到系统完成处理。

PHP处理程序(CGI vs FastCGI vs Mod_PHP vs suPHP)有什么区别?

我知道有四个不同的PHP处理程序(AFAIK)。 CGI(php-cgi) FastCGI(php-fpm) mod_php的 suPHP 我需要知道这些处理程序的优缺点,以及哪些环境适合于哪些环境? 例如,如果我正在运行一个共享的托pipe服务器上面哪个处理程序适合我? 或者,如果我pipe理私人服务器?

有没有限制在php-fpm中设置php_admin_value?

我正在尝试在php-fpm中设置一个池的configuration,但是在某些时候,它只是不能启动了。 php_admin_value[disable_functions] = dl,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,pcntl_exec,include,include_once,require,require_once,posix_mkfifo,posix_getlogin,posix_ttyname,getenv,get_current_use,proc_get_status,get_cfg_va,disk_free_space,disk_total_space,diskfreespace,getcwd,getlastmo,getmygid,getmyinode,getmypid,getmyuid,ini_set,mail,proc_nice,proc_terminate,proc_close,pfsockopen,fsockopen,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,fopen,tmpfile,bzopen,gzopen,chgrp,chmod,chown,copy,file_put_contents,lchgrp,lchown,link,mkdi,move_uploaded_file,rename,rmdi,symlink,tempnam,touch,unlink,iptcembed,ftp_get,ftp_nb_get,file_exists,file_get_contents,file,fileatime,filectime,filegroup,fileinode,filemtime,fileowne,fileperms,filesize,filetype,glob,is_di,is_executable,is_file,is_link,is_readable,is_uploaded_file,is_writable,is_writeable,linkinfo,lstat,parse_ini_file,pathinfo,readfile,readlink,realpath,stat,gzfile,create_function 当试图重新启动php-fpm时失败,并显示以下消息: Stopping php-fpm: [ OK ] Starting php-fpm: [20-Oct-2013 22:31:52] ERROR: [/etc/php-fpm.d/codepad.conf:235] value is NULL for a ZEND_INI_PARSER_ENTRY [20-Oct-2013 22:31:52] ERROR: Unable to include /etc/php-fpm.d/codepad.conf from /etc/php-fpm.conf at line 235 [20-Oct-2013 22:31:52] ERROR: failed to load configuration file '/etc/php-fpm.conf' [20-Oct-2013 22:31:52] ERROR: FPM initialization failed [FAILED] 当我删除最后一个禁用的function( create_function )它再次开始。 我也尝试了其他函数,但是这给出了相同的错误,所以它与create_function函数无关。 目前的string大小只有1KB以上,所以看起来我已经达到了极限了。 […]

Docker + nginx + Php-FPM 502错误的网关

我试图通过docker安装php-fpm和nginx,我有一个nginx的问题,它返回了502错误的网关错误,但是当我尝试去任何HTML文件只显示正确。 我必须做什么,以一个PHP文件正常工作与这个系统? Nginxconfiguration网站: server { listen 80; server_name api.local.dev; access_log /var/log/nginx/api.access.log; error_log /var/log/nginx/api.error.log; root /www; charset utf-8; index index.php index.html index.htm; location / { index index.php index.html index.htm; } location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } Dockerfile FROM ubuntu:13.10 # Keep upstart from complaining RUN dpkg-divert –local […]

php-fpm和nginx @高CPU使用率?

我的服务器与DigitalOcean的计划如下: 2 Core Processor 2 GB Memory 我的网站正在接受成千上万的访问者,但是,两个CPU核心都是@ 100%: 这个问题似乎与php-fpm和nginx: worker process 。 我已经对服务器做了很多优化,但是我仍然无法让它冷静下来。 这是我的nginx.conf : user www-data; worker_processes 2; pid /run/nginx.pid; events { worker_connections 2048; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; server_tokens off; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # server_names_hash_bucket_size […]

Nginx / PHP-FPM长日志行被截断

我不确定这是一个Nginx或PHP-FPM设置,但长日志行被截断。 有没有增加最大日志行长度的设置?

连接上游时资源暂时不可用(php5-fpm)

当〜+ 10K连接(netstat -an | grep 80 | wc -l)时,我经常在随机页面上出现这个错误。 发生这种情况时,仍有+ 10GB的可用内存,服务器负载小于3。 我的相关configuration: /etc/php5/fpm/php.ini memory_limit = 1024M default_socket_timeout = 120 /etc/php5/fpm/pool.d/www.conf pm = dynamic pm.max_children = 30 pm.start_servers = 5 pm.min_spare_servers = 2 pm.max_spare_servers = 5 ;pm.max_requests =20000 #uncommented with any value didn't fixed request_terminate_timeout = 120s 我还把上述的一些线索(即60个孩子,10个开始,10个最大的服务器)翻了一番,没有用。 /etc/nginx/nginx.conf worker_connections 4024; keepalive_timeout 10; 支持Varnish和memcached的Nginx本身是启用的。 一般页面渲染速度相当快。 这似乎是一个很常见的问题,我找不到任何有用的解决scheme,甚至分析可能的原因。 […]

无法连接到PostgreSQL unix域套接字

我试图从PHP Web应用程序连接到PostgreSQL Unix域套接字。 相关系统组件: CentOS 7 x64(强制执行SELinux) postgresql93 9.3.5-2PGDG.rhel7 nginx 1.6.2-1.el7.ngx php-common 5.4.16-23.el7_0.3 php-fpm 5.4.16-23.el7_0.3 php-pdo 5.4.16-23.el7_0.3 php-pgsql 5.4.16-23.el7_0.3 PostgreSQL正在监听标准端口5432,我没有问题通过TCP / IP在127.0.0.1:5432,但是当我尝试连接到它的Unix域套接字,我有一个以下错误: Cannot connect to database: SQLSTATE[08006] [7] could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 文件/tmp/.s.PGSQL.5432存在,我可以连接使用psql : $ psql […]

Nginx使用php-fpm返回空白的HTML页面

我通过Nginx使用php-fpm。 我的nginx.conf可以在这里find: http : //pastebin.com/Nu9iD8Km 它包含一个在这里find的文件: http : //pastebin.com/ece4cwXF 我的php-fpm.conf可以在这里find(所有的选项都省略了): http : //pastebin.com/70fBE30E 我的fastcgi_params文件类似于默认的,但增加了这一行,遵循networking上的build议: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 我不断得到空白页,而不是PHP脚本,但静态的东西加载罚款。 有什么奇怪的是,我没有得到404错误 – 我的浏览器告诉我,状态代码是200 OK。 nginx或者php-fpm的日志都不会引起任何有趣的事情。 什么可能造成这个? 我怎样才能解决这个问题?