【问题标题】:multiple php.ini on fastcgi php5.2.17 on debian wheezy 64 bits and apachefastcgi 上的多个 php.ini debian wheezy 64 位和 apache 上的 php5.2.17
【发布时间】:2014-05-27 04:55:22
【问题描述】:

有人可以告诉我有关 fastcgi 上的多 php.ini 的线索

我已经编译好php5.2.17 php5.2.17======>>>http://museum.php.net/php5/php-5.2.17.tar.bz2

php52补丁===>>>http://php52-backports.googlecode.com/files/php52-backports-security-20130717.patch 配置:

./configure --prefix=/usr/share/php52 --datadir=/usr/share/php52   --mandir=/usr/share/man   --bindir=/usr/bin/php52   --with-libdir=lib64   --includedir=/usr/include   --sysconfdir=/etc/php52/apache2   --with-config-file-path=/etc/php52/cli   --with-config-file-scan-dir=/etc/php52/conf.d   --localstatedir=/var   --disable-debug   --with-regex=php   --disable-static   --disable-posix   --with-pear=/usr/share/php52  --enable-bcmath   --with-bz2   --enable-mbstring  --enable-sockets  --with-libxml-dir=/usr   --with-zlib    --enable-soap   --enable-zip   --with-mhash   --with-exec-dir=/usr/lib/php52/libexec   --without-mm   --with-curl=shared,/usr   --with-zlib-dir=/usr  --with-jpeg-dir=shared,/usr   --with-png-dir=shared,/usr    --with-pgsql=shared,/usr    --with-xsl=shared,/usr --with-tidy=shared,/usr  --enable-pdo=shared   --without-pdo-dblib   --with-pdo-pgsql=shared,/usr  --with-pdo-dblib=shared,/usr --with-libdir=/lib/x86_64-linux-gnu    --with-mcrypt  --without-pdo-sqlite --without-sqlite --disable-filter --with-pcre-regex --enable-fastcgi --sysconfdir=/etc/php52/apache2
make; make install

完美的工作 安装后的文件:

/usr/lib/cgi-bin/php52-cgi

#!/bin/sh
PHPRC="/etc/php52/apache2/"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php52/php-cgi

我想在这里使用一个包装器来表达类似使用当前用户的 php.ini ~/php.ini 但是....不适合我...

其他文件是 /etc/apache2/php52.conf

# Include file for virtual hosts that need to run PHP 5.2

<FilesMatch "\.php">
   SetHandler application/x-httpd-php5
</FilesMatch>

ScriptAlias /php52-cgi /usr/lib/cgi-bin/php52-cgi
Action application/x-httpd-php5 /php52-cgi

有什么帮助吗?

【问题讨论】:

    标签: php fastcgi php-5.2


    【解决方案1】:

    我修复它...对于我所做的 apache2 配置上的每个网站

    文件:默认站点可用

     <FilesMatch "\.php">
        SetHandler application/x-httpd-php5
     </FilesMatch>
    
     ScriptAlias /php52-cgi /home/{{user}}/php52-cgi
    
     Action application/x-httpd-php5 /php52-cgi
     AddHandler application/x-httpd-php5 .php
    

    所以现在我为每个用户设置了不同的 CGI

    文件:php52-cgi

     #!/bin/sh
     PHPRC="/etc/php52/apache2/"
     export PHPRC
     PHP_FCGI_CHILDREN=4
     export PHP_FCGI_CHILDREN
     PHP_FCGI_MAX_REQUESTS=5000
     export PHP_FCGI_MAX_REQUESTS
     exec /usr/bin/php52/php-cgi  -c path/to/my/php/ini
    

    【讨论】:

      猜你喜欢
      • 2014-10-09
      • 1970-01-01
      • 1970-01-01
      • 2016-09-07
      • 2014-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多