Tag Info

New answers tagged

0

if you have a systemd service on CentOs7 you need to stop the service and enable it again to have it fixed systemctl stop httpd vi /usr/lib/systemd/system/httpd.service Add this: [Service] UMask=0002 Save the file with esc ZZ. Enable and start apache again: systemctl enable httpd systemctl start httpd Then the funny part is that i have chmod 774 ...


0

You need to use $is_args for question mark & $args or $query_string for query string afterwards question mark. here it's the last combination. try_files $uri $uri/ /index.php$is_args$query_string; Also be sure that you have set fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; ...


0

A query string starts with a question mark. Then set in the second block : fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Remove include /etc/nginx/fastcgi_params; in the first block since you don't have any fastcgi_pass directive here.


0

if you hard drive is on local RAID - check if the battery status is fine - and the local cache is enabled - otherwise your writes are going to be much slower also use mpstat -P ALL to see if all the cores are equally busy at peak time


0

Thanks to this thread I found a method that worked for me. Putting the timeout and connectiontimeout= on the same line as the ProxyPassMatch works like so: ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9009/var/www/$1 timeout=3600 connectiontimeout=3600


2

Normally if you have scripts that need more time there are a few solution. You can increase the fastcgi_read_timeout and reqest_terminate_timeout. But the problem is you shouldn't set the value too high. If you have a lot of processes that blocks each other they are open for a long time and its possible that your server can't deliver your content anymore. ...


1

There are two directives involved here, one at nginx fastcgi_read_timeout as described here, the other is at php-fpm.conf reqest_terminate_timeout, you can set this to 0 to disable timeout. At nginx set fastcgi_read_timeout to any arbitrary large value as answered in my first link, you can set this inside any specific location.


0

Are you sure about your assumption for the rsyslog.conf? That is, are you sure all such syslog messages are tagged with lower-case "php"? Try setting syslog.facility to something like local2 (or local1, or local7) and replacing your rsyslog.conf config-line accordingly: local2.* /var/log/php-fpm/error.log


0

1 request = 1 location You will need to duplicate your regex location so one is found per prefix location you have. That is the most efficient way of doing it. Do not be frightened of copy-pasting! those few extra bytes in configuration will make nginx configuration more readable, scalable and running more efficiently. location / { root /var/www/html; ...


-1

Its spelt out in the manual page on setting up process pools - use environment cars to append to the disable_functions ini setting.


0

The problem is pm.max_children too low (perhaps 200 is better). It was also recommended to me to change pm to ondemand instead of dynamic. And to set pm.process_idle_timeout to 1s so it will cycle them out. The problem is the ajax requests were taking up the 5 available workers so then subsequent requests can't go anywhere.


0

uuid = unique user idnetifier that means one per user just add a password to the php account and make it able to log in then add it to the ftp users I have never done it because I'm sure it adds tone of security holes, and it is likely that this will break a few things but if you really want to...


0

I've found the problem after many tests : On one server, there is APC v3.1.3 and on the other it's v3.1.13. To make it work fine, I have to play with the "M" defining sizes (putting "M" or not), like this : v3.1.3 : apc.shm_size = 256 apc.max_file_size = 2M v3.1.13 : apc.shm_size = 256M apc.max_file_size = 2M


2

Since CentOS 6.6, SELinux policies that applied to Apache are now also applied to nginx and php-fpm in the same way. Thus you need to use the right SELinux boolean to allow the web server to send mail. setsebool -P httpd_can_sendmail 1


0

SELinux was enabled and preventing all filesystem access for the user that PHP-FPM was running as. Changing this resolved the issue. This was visible by checking /var/log/audit/audit.log as suggested in the comments by Michael Hampton.


3

That person did everything right, I don't see why you say it's "bad". Your performance problem most likely lives in your code and the sysadmin can't fix crappy code. You need to profile your code and see where the bottlenecks are. Once that's done and the issues are fixed you can enable OPCache for a little extra performance boost. About the articles you ...


0

A partially educated self-response. php-fpm, unlike suphp, does not allow running as the script owner but instead allows setting up pools that specify a user and group to run as. In Centos 7 with Apache 2.4, I found these declarations in /etc/php-fpm.d as www.conf. I created a duplicate of this file and put in one virtual hosts's username as user and ...


3

Your server block doesn't have a root directive defined. Instead it seems to be in one of your location blocks. This is one of the most common nginx mistakes. Move it under the server block instead.


1

The log is being written to ./var/log/upstart/php5-fpm.log This was ridiculously annoying to find. Thanks to Luigi (in the comments) for pointing this out.



Top 50 recent answers are included