PHP-FPM “Access Denied” on .phtml Files

a problem which took about 1h of research..

Some Weeks ago, i switched most of the webserver setups from custom spawn-fcgi init scritps to php-fpm and everything seems to work fine until today. The php-version of GitHubButtons won’t work anymore – just a text-message appears: “Access Denied.” First of all i thougt it was a problem with lighttpd and the fastcgi.map-extensions directive, but the error message doesn’t seem to be served by lighttpd…and well…it was a php-fpm related issue, beacause php-fpm only processes .php files by default!

You will not find these directive in the official FPM Documentation on php.net – it’s missing including tons of other directives. To get an overview about all possible php-fpm config keys, you should take a look into to default php-fpm.conf file included into the php-sources (sapi/fpm/php-fpm.conf) – also attached to this post!

Important: This directive can’t be used in global context, it’s a pool based config key!

Examle Pool: php-fpm.conf#

[pool-testwww]
; Limits the extensions of the main script FPM will allow to parse. This can
; prevent configuration mistakes on the web server side. You should only limit
; FPM to .php extensions to prevent malicious users to use other extensions to
; exectute php code.
; Note: set an empty value to allow all extensions.
; Default Value: .php
; Recommended: .php .phtml
security.limit_extensions = .php .php3 .php4 .php5 .phtml

GitHub “Star”-gazer Buttons with MooTools/jQuery/PHP

No iFrames required – just pure javascript/php

Show your Love to GitHub# GitHubButtons is a fork of the famous github-buttons from @mdo using the original styles with a complete new javascript part based on MooTools/jQuery without the need of iframes. It’s targeted on MooTools/jQuery/PHP-Users which are already using various stuff on their pages – all other users should use the original iframe […]

Howto: Content Navigation/Menu with WordPress

automatically generated navigation including anchors

State of the Art# There are a several ways how to deal with large content. The most common used method is to split the content in multiple pages, but this completely destroys the usability on tablets, big screens or other mobile devices and frustate your users. Furthermore, each sub-page causes an additional http-request and extra […]

Fixed Scroll Navigation with MooTools

sticky navigation bar that remains fixed on scrolling

The Goal# Currently a very popular and often used technique wich provides a great usability. There are a several jQuery plugins and code-snippets available which are providing this feature but they are sometimes very complex and didn’t work with MooTools based websites. This tutorial shows you how to create a sticky navigation bar that remains […]

Howto: Remove NextGen Gallery Version Meta-Tag

increase wordpress security, hide plugin version informations

Why ?# For Security Reasons it is not recommend to show any user the version of the software you are using. Since the NGG Version 1.9 a filter was added on my request, to hide the meta-tag with the version informations: Default HTML-Header Output of NextGenGallery# [html] <!– <meta name="NextGEN" version="1.9.2" /> –> [/html] Just […]

WordPress NextGen Gallery – Page Title

clean page titles containing album/gallery names

Titles# You like the NextGen Gallery Plugin for WordPress, but you want ‘nicer’ name based page titles instead of something like “Album 78”, “Gallery 12” ? Here is a simple solution, you just have to edit your theme files: Page Title# Mostly the title (<h1> Tag) ist set into your page.php file or alternative in […]

Universal PHP “spawn-fcgi” WrapperClass

spawn-fcgi utility, lighttpd, virtual hosting, a3non::platform application

Why don’t use the spawn script from the lighttpd wiki ?# Is Shell scripting so bad ? Well i dont’t like it when using it in complex environments. Currently i am building the A3non::Platform application (a simple, managed webhosting platform) and need some php cli based utilities to spawn php-fcgi processes via the famous spawn-fcgi […]

A3non::Tools – Javascript Password Generator

a3non tools, client side, helpfull utilities

Another One ?# You like password generators ? ok here is another one…but it is completly javascript based – the passwords are generated on your pc and not on a server which can log the generated passwords and track you by using methods like Evercookie. A3non::Tools# A3non::Tools – Password Generator A3non::Tools – other helpful stuff […]