0

I have some issues with a server that I have recently upgraded from Debian Squeeze to Debian Wheezy.

When I call a php-page only the php-source-code of the page is beeing show but not interpretated as script.

The php is configured as fcgid:

    <IfModule mod_fcgid.c>
            SuexecUserGroup my-client my-client
            FcgidIOTimeout 240
            <Directory /var/www/my-client.de/www/>
                    Options +ExecCGI
                    AllowOverride All
                    AddHandler fcgid-script .php
                    FCGIWrapper /var/www/my-client.de/php-fcgi-scripts/php-fcgi-starter .php
                    Order allow,deny
                    Allow from all
            </Directory>
    </IfModule>

I am aware if this post, but the solution doesn't work for me. I tried to rename FCGIWrapper to FcgidWrapper which didn't help. Beside I have another server running Wheezy with FCGIWrapper absolutely fine. So I doubt this solution.

Running apachectl -t -D DUMP_MODULES gives me this result:

Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 mpm_worker_module (static)
 http_module (static)
 so_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgid_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 fastcgi_module (shared)
 fcgid_module (shared)
 headers_module (shared)
 include_module (shared)
 jk_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 proxy_module (shared)
 proxy_html_module (shared)
 proxy_http_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 status_module (shared)
 suexec_module (shared)
Syntax OK

The entry fcgid_module (shared) tells me that the fcgid-module should be loaded and thus fullfill the condition <IfModule mod_fcgid.c> from the hostfile.

Futhermore I have checked file /var/www/my-client.de/php-fcgi-scripts/php-fcgi-starter:

#!/bin/sh
PHPRC=/var/www/my-client.de/php
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
exec /usr/lib/cgi-bin/php

The directory /var/www/my-client.de/php and the binary /usr/lib/cgi-bin/php are both accessible.

grep -Hrv ";" /etc/php5 | grep -i "extension=" gives me:

/etc/php5/mods-available/pdo_mysql.ini:extension=pdo_mysql.so
/etc/php5/mods-available/mysqli.ini:extension=mysqli.so
/etc/php5/mods-available/gd.ini:extension=gd.so
/etc/php5/mods-available/mcrypt.ini:extension=mcrypt.so
/etc/php5/mods-available/mysql.ini:extension=mysql.so
/etc/php5/mods-available/pdo.ini:extension=pdo.so
/etc/php5/mods-available/curl.ini:extension=curl.so

dpkg -l | grep ^ii | grep -i fcgi gives me:

ii  libapache2-mod-fcgid                 1:2.3.6-1.2+deb7u1               i386         an alternative module compat with mod_fastcgi

dpkg -l | grep ^ii | grep -i php gives me:

ii  dh-make-php                          0.3.0                            all          Creates Debian source packages for PHP PEAR and PECL extensions
ii  php-pear                             5.4.4-14+deb7u14                 all          PEAR - PHP Extension and Application Repository
ii  php5-cgi                             5.4.4-14+deb7u14                 i386         server-side, HTML-embedded scripting language (CGI binary)
ii  php5-cli                             5.4.4-14+deb7u14                 i386         command-line interpreter for the php5 scripting language
ii  php5-common                          5.4.4-14+deb7u14                 i386         Common files for packages built from the php5 source
ii  php5-curl                            5.4.4-14+deb7u14                 i386         CURL module for php5
ii  php5-dev                             5.4.4-14+deb7u14                 i386         Files for PHP5 module development
ii  php5-gd                              5.4.4-14+deb7u14                 i386         GD module for php5
ii  php5-mcrypt                          5.4.4-14+deb7u14                 i386         MCrypt module for php5
ii  php5-mysql                           5.4.4-14+deb7u14                 i386         MySQL module for php5

So I am out of ideas how to resolve this issue. Any help would be appreciated very much!

1 Answer 1

3

The issue was caused by php5_cgi.

To resolve this issue, deactivate php5_cgi:

a2dismod php5_cgi

More information can be found here and here.

1
  • thank you, this was really helpful especially the links.
    – Kyle
    Jun 27, 2016 at 1:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .