Questions tagged [php5]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

865 questions
4
votes
3 answers

nginx 404 instead of 403 for empty directory

I have the following config for my nginx server: server { listen 80 default_server; server_name example.com www.example.com; root /var/www/example.com/web; index index.php index.html; location / { # try to serve file…
Slava Fomin II
  • 1,701
  • 4
  • 17
  • 23
4
votes
1 answer

FPM sometimes serving from wrong pool

I am using nginx + php5-fpm with multiple sites & pools. Every pool in the fpm is chrooted. Normally everything works as expected. But sometimes (every 1/20th request), especially if I requested Site B before, site A serves the content of site B. I…
Sapd
  • 141
  • 1
4
votes
1 answer

Is there an equivalent to Debian's cli/php.ini on Redhat?

How do you configure the command line version of PHP to have different settings on a Redhat system? On Debian based systems, php has a separate command-line version config file: /etc/php5/cli. On Redhat, there's /etc/php.ini and various additional…
Zxaos
  • 496
  • 3
  • 6
  • 18
4
votes
2 answers

PHP5 is installed, but Apache is displaying PHP as uninterpreted text. How can I get it to process it as PHP?

In a Drupal installation, it's displaying the root PHP file as plain text below. a2enmod says that php5 is enabled, aptitude says libapache2-mod-php5 is installed, mods-enabled/ has php5.conf and php5.load, the VirtualHost has DirectoryIndex and…
Christos Hayward
  • 1,162
  • 3
  • 16
  • 35
4
votes
1 answer

What's causing so many "httpd:
    " entries in /var/log/messages?

    On a low-powered VPS I maintain, which also functions as a production server, I keep an eye on logs to crisis-manage should a site get an influx of traffic or something goes haywire (tail a bunch of log files, top, iostat etc). This is infrequent,…
    Chris Woods
    • 398
    • 3
    • 22
    4
    votes
    2 answers

    PHP5-FPM and 'ondemand'

    I've set up a server with Nginx and PHP5-FPM, and things are running fine. However, as I add more and more sites to the server I see that the memory usage steadily increases, and I've come to the conclusion that PHP5-FPM is to "blame". What I…
    sbrattla
    • 1,578
    • 4
    • 28
    • 52
    4
    votes
    3 answers

    php5-gd shows in "php -i | grep -i gd" but not in phpinfo();

    I am trying to enable GD in my installation of Apache2, PHP5 and MySQL on my Ubuntu server. I installed php5-gd with: apt-get install php5-gd And when I run php -i I get: gd GD Support => enabled GD Version => 2.0 FreeType Support =>…
    Qzen
    • 43
    • 1
    • 4
    4
    votes
    2 answers

    PHP-FPM chroot with chdir

    I am trying to setup a site inside of a PHP-FPM chroot. My paths are as follows: chroot = /var/www/ chdir = www/ The chroot works just fine without chdir. But when I add chdir I get this error on php-fpm startup: ERROR: [pool www] the chdir path…
    nwalke
    • 643
    • 2
    • 12
    • 32
    4
    votes
    1 answer

    APC and "apc.gc_ttl" :: How Low is Too Low?

    I currently have my apc.gc_ttl set to 600 to help keep fragmentation down. Since apc.gc_ttl just sets the time on cache for garbage collection, I don't see any harm in keeping it this low. However, I'm new to APC, and have seen many configurations…
    tacotuesday
    • 1,389
    • 1
    • 16
    • 27
    4
    votes
    1 answer

    How to free PHP-FPM memory?

    There are several discussions complaining high memory usage of PHP-FPM, without any practical approach to overcome. As I explored the problem with numerous tests, the problem is related to the age of PHP-FPM age. Imagine we have pm.max_children =…
    Googlebot
    • 1,047
    • 2
    • 15
    • 30
    4
    votes
    3 answers

    Hide STRICT errors on PHP 5.4

    I've upgraded from PHP 5.3 to PHP 5.4 today. Now my script is displaying a lot of error messages. How to hide them without using error_reporting(0); inside php file ? I use this: error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
    Spacedust
    • 568
    • 5
    • 13
    • 28
    4
    votes
    2 answers

    Installing PHP on linux

    I'm trying to setup php with oci8 support. I think I've configured all correctly before starting with oci, here is how I tried to start the install : ./configure -prefix=/common_share/APACHE/server --with-apxs2=/common_share/APACHE/server/bin/apxs…
    London
    • 181
    • 6
    4
    votes
    3 answers

    Enabling phar on Dreamhost shared hosting?

    So, i'm trying to use Silex on my dreamhost account and I'm getting an error Fatal error: Class 'Phar' not found in blah blah blah... when I try to include the Silex.phar file. When I look at phpinfo(), there isn't a section for Phar, even though…
    Paul Wicks
    • 211
    • 2
    • 6
    4
    votes
    1 answer

    Monit is restarting apache2, should I fix the monit config, or the server config?

    Monit is restarting apache2 frequently, based on the totalmem > 200m test in my apache2 stanza. I'm not sure that I actually have a problem, or if I should increase the totalmem test in my monit config. This configuration was fine until we added a…
    marfarma
    • 281
    • 1
    • 3
    • 11
    4
    votes
    5 answers

    Upgrade Centos 5 tot PHP 5.2 or 5.3 [recommended way?]

    We are using Zend Framework and in version 2, php 5.2 will be the minimum requirement. We love CentOS and we'd like to keep using it, but PHP 5.1 just won't do anymore when developing web applications with Zend framework. I found several links to…
    solsol
    • 1,121
    • 8
    • 21
    • 31