Welcome! Log In Create A New Profile

Advanced

Re: prepend a php script in all requests

Reinis Rozitis
September 25, 2014 05:46PM
> Once i have nginx installed with php fastcgi. Is it possible to preppend a
> php script to be executed when serving any request? (similar to apache
> prepend function). If yes could I please have an example. Thanks

PHP itself has such functionality
http://php.net/manual/en/ini.core.php#ini.auto-prepend-file .

If you want to change it from nginx you can add following line to your
particular php/fastcgi block:

fastcgi_param PHP_VALUE "auto_prepend_file=/path/to/your/file.php";


rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

prepend a php script in all requests

Alex Flex September 25, 2014 02:06PM

Re: prepend a php script in all requests

Francis Daly September 25, 2014 05:30PM

Re: prepend a php script in all requests

Reinis Rozitis September 25, 2014 05:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 224
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready