PHP as FastCGI Authorizer

From: Date: Mon, 10 Mar 2014 17:31:22 +0000
Subject: PHP as FastCGI Authorizer
Groups: php.internals 
Request: Send a blank email to internals+get-73053@lists.php.net to get a copy of this message
Dear All! Is there any chance to use php as FastCGI authorizer? As i see, php-fpm has no options to use predefined script and support only Responder role. I tried php-cgi as authorizer as following: 1. Configure apache to use php-cgi as FastCGIServer (php-cgi under FastCGI process management), than start php-cgi as "php-cgi -f .../authscript.php". I see this in sapi/cgi/cgi_main.c line 2246: if (script_file) { /* override path_translated if -f on command line */ So i used -f switch. There no output (including errors) in any log and no evidence that script was launched. May be there is a broken magic in determination of fastcgi mode: sapi/cgi/fastcgi.c if (getpeername(0, (struct sockaddr *)&sa, &len) != 0 && errno == ENOTCONN) { fcgi_setup_signals(); return is_fastcgi = 1; } else { return is_fastcgi = 0; } Because of fcgi_listen contain unambiguous: is_fastcgi = 1; i tried next variant: 2. Configure apache to use php-cgi as FastCGIExternalServer. Php used as "php-cgi -b .../gsock -f .../authscript.php" Socket is created, FastCGI report that connection is done. But, again, no output in any log and no evidence that script was launched. In every apache configuration script included as FastCGIAuthorizer , of course. Any suggestion? -- Best regards, Anthony mailto:ant_mail@inbox.ru

« previous php.internals (#73053) next »