Articles of PHP5

php5-geoip性能问题

我通过apt-get install php5-geoip在Ubuntu 10.04上安装了php5-geoip模块。 我已经更新了geocities.dat库 生产服务器性能下降,平均负载剧增。 在安装之前,对于相同的stream量级别,它不到1。 我怀疑geoip数据不是内存caching。 我怎样才能激活这个模块的内存caching?

apache 2.4是否对连接有严格的限制?

我用prefork使用Apache 2.4。 我的MPM指令设置如下: <IfModule mpm_prefork_module> MinSpareServers 200 MaxSpareServers 400 StartServers 200 ServerLimit 1300 MaxClients 1300 MaxRequestWorkers 1300 MaxRequestsPerChild 10000 </IfModule> 但是我的服务器状态页面显示: Parent Server Config. Generation: 1 Parent Server MPM Generation: 0 Server uptime: 34 minutes 54 seconds Total accesses: 551221 – Total Traffic: 11.8 GB CPU Usage: u8151.55 s2320.18 cu.02 cs.11 – 500% CPU load […]

在Debian 6中,不能从dotdeb源码安装php5-apc

我无法安装php5-apc: ~# apt-get install php5-apc Reading package lists… Done Building dependency tree Reading state information… Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. […]

PHP 5.2,Apache 2.2,Windows 8,PHP不parsing

我在Windows 8上安装了一个apache的httpd 2.2安装(使用安装程序,安装到C:/ Program Files(x86)/ Apache Software Foundation / Apache2.2)和php 5.2安装(使用.zip,安装到C: PHP)。 没有我的PHP文件parsing – 他们只是显示为纯文本。 <?php // Stop PHP from killing itself set_time_limit(0); // Log error messages ini_set('display_errors', 'On'); ini_set('log_errors', 'true'); ini_set('error_log', 'error_log'); …等等。 我的httpd.conf有所有必要的行(我认为) AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps (和底部:) PHPIniDir "C:/php" LoadModule php5_module "C:/php/php5apache2_2.dll" AddHandler application/x-httpd-php .php <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> […]

PHP会话文件不被删除(IIS 7)

我们的网站不显示,因为C:\ Windows \ Temp目录无法写入,因为C:\现在已经空间不足。 原因是:sess_230498230493240 [random hash]文件。 就像成千上万 php.ini被设置为使用C:\ Windows \ Temp作为临时会话文件,但是为什么这些被自动删除呢? 什么是正确的方法来处理这个?

Zend 1与Ubuntu的MSSQL不工作

有谁知道如何解决以下问题? 如果没有,有没有人知道如何在Linux上设置Zend 1与MSSQL服务器通信? 尝试使用freetds和pdo_dblib适配器时,我们在nginx日志中得到以下错误。 我们使用nginx 1.2.7在Ubuntu 12.04上运行Zend 1.2 2013/02/27 20:48:24 [error] 9057#0: *28 FastCGI sent in stderr: "PHP message: PHP Warning: include_once(Zend/Db/Adapter/Pdo/Dblib.php): failed to open stream: No such file or directory in /www/development/library/Zend/Loader.php on line 146 PHP message: PHP Warning: include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Dblib.php' for inclusion (include_path='/www/development/application/../library:/www/development/library:.:/usr/share/php:/usr/share/pear') in /www/development/library/Zend/Loader.php on line 146 PHP message: PHP […]

nginx / php + zurmo,重写或内部redirect周期

我试图让本地主机上的Debian Jessie系统上运行的Zurmo CRM。 我无法find一个例子nginxconfiguration和应用程序需要重写URLS,我做错了。 我也使用重写在Drupal,我认为这是Nginxconfiguration将工作,但没有运气。 server { server_name zurmo; listen 80; root /var/www/sites/zurmo; index index.php; location = / { root /var/www/sites/zurmo; index index.php; } location / { root /var/www/sites/zurmo; index index.php; if (!-f $request_filename) { rewrite ^(.*)$ /index.php/$1 last; break; } if (!-d $request_filename) { rewrite ^(.*)$ /index.php/$1 last; break; } } location ~ ^/(protected|framework|themes/\w+/views) […]

SuexecUserGroup不能在Apache 2.4中工作

我已经通过yum升级了我的PHP从5.3版本到5.4,这需要将Apache从2.2版本升级到2.4版本。 经过configuration后,事实certificate,userid和groupid仍在使用全局用户/组“apache”。 <VirtualHost *:80> ServerName example.com ServerAdmin [email protected] DocumentRoot "/path/to/webroot" …. …. <IfModule mod_fcgid.c> SuexecUserGroup user-name group-name <Directory "/path/to/webroot"> Options +ExecCGI AllowOverride All AddHandler fcgid-script .php FcgidWrapper /path/to/webroot/php-fcgi-scripts/php-fcgi-starter .php Order allow,deny Allow from all </Directory> </IfModule> …….. </VirtualHost> /etc/httpd/modules/base.conf: LoadModule suexec_module modules/mod_suexec.so 如果有人能build议我错过了什么,我将不胜感激。 谢谢。

使用Nginx和PHP FPM进行primefaces部署

我试图获得primefaces部署,我不想丢失/丢弃任何请求。 我使用Capistrano部署代码,经典的情况是你有一个'当前'目录,这是'release'文件夹中最新版本的符号链接。 我正在使用Nginx,带有Opcache的PHP 5.5 FPM。 遵循在Nginx中使用$ realpath_root的想法,我期望一个简单的nginx重载就足够了,但事实并非如此。 用nginx重新加载,似乎我没有丢失任何请求,但php-fpm仍在执行前一个旧目录中的代码。 如果我做了一个“PHP的FMP重新加载”,然后PHP FPM阅读新的目录,但我仍然可以看到,我失去了一些要求: 'recv()失败(104:连接重置对等),而从上游读取响应头“ 问题是: 我应该重新加载PHP FPM吗? 根据我的理解,nginx将path传递给php-fpm,并从nginxdebugging日志中看到,通过的path是正确的,但是php-fpm仍然执行旧path。 2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/current/web" 2014/09/23 17:13:22 [debug] 26234#0: *1742 posix_memalign: 00000000010517A0:4096 @16 2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "SCRIPT_FILENAME" 2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/ive/releases/20140923124417/web" 2014/09/23 17:13:22 [debug] 26234#0: *1742 […]

Nginx服务器块不能正常工作

免责声明:只是澄清,我是Linux的全新,但我已经通过谷歌search和个人研究configuration一切。 我有一个Debian Wheezy服务器,我打算使用LEMP堆栈作为域的主机。 我得到了DNS的工作,所以当我进入域,我得到“欢迎nginx”页面。 麻烦的出现是因为我已经创build了将要托pipe该站点的目录,并使用该站点的文件(index.php是主页面)填充该目录,并且还configuration了服务器块(/ etc / nginx / sites- available / example.com)如下所示: UPDATED Server block server { listen 80; server_name example.com www.example.com; root /var/www/example.com; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.html; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/example.com; } location ~ […]