Updating Apache broke server

14 posts / 0 new
Last post
#1 Mon, 04/26/2010 - 08:20
CedSha

Updating Apache broke server

Hi all,

After updating the Apache server Virtualmin send me back the following message. (See under) Then the web servers does not work anymore. I had to restart it manually but then when accessing the web page it always ask to open PHTML file. After investigate on google I also discover that my httpd.conf file was totally empty (gloups..! no backup !).
Is there anyway to recreate / regenerate this configuration file ?
If not is there a way to install again without breaking the existing site and mail server ?
Tks for any help on this matter
CedSha

Now updating apache2 ..
Installing package(s) with command apt-get -y install apache2 ..

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
apache2-mpm-worker apache2.2-common
The following packages will be REMOVED:

apache2-mpm-prefork libapache2-mod-php5
The following NEW packages will be installed:
apache2-mpm-worker
The following packages will be upgraded:
apache2 apache2.2-common
2 upgraded, 1 newly installed, 2 to remove and 8 not upgraded.
Need to get 1115kB of archives.
After this operation, 6173kB disk space will be freed.
Get:1 http://software.virtualmin.com virtualmin-hardy/main apache2 2.2.8-12vm.ubuntu0.14 [45.0kB] Get:2 http://software.virtualmin.com virtualmin-hardy/main apache2.2-common 2.2.8-12vm.ubuntu0.14 [816kB]
Get:3 http://software.virtualmin.com virtualmin-hardy/main apache2-mpm-worker 2.2.8-12vm.ubuntu0.14 [254kB]
Fetched 1115kB in 5s (215kB/s)
(Reading database ... 67995 files and directories currently installed.)
Preparing to replace apache2 2.2.8-10vm (using .../apache2_2.2.8-12vm.ubuntu0.14_all.deb) ...
Unpacking replacement apache2 ...
(Reading database ... 67992 files and directories currently installed.)
Removing libapache2-mod-php5 ...
Module php5 disabled; run /etc/init.d/apache2 force-reload to fully disable.
dpkg: apache2-mpm-prefork: dependency problems, but removing anyway as you request:
mailman depends on apache2 | httpd; however:
Package apache2 is not configured yet.
Package apache2-mpm-prefork which provides apache2 is to be removed.
Package httpd is not installed.
Package apache2-mpm-prefork which provides httpd is to be removed.
virtualmin-base depends on apache2; however:
Package apache2 is not configured yet.
Package apache2-mpm-prefork which provides apache2 is to be removed.
mailman depends on apache2 | httpd; however:
Package apache2 is not configured yet.
Package apache2-mpm-prefork which provides apache2 is to be removed.
Package httpd is not installed.
Package apache2-mpm-prefork which provides httpd is to be removed.
Removing apache2-mpm-prefork ...
* Stopping web server apache2
...done.
(Reading database ... 67983 files and directories currently installed.)
Preparing to replace apache2.2-common 2.2.8-10vm (using .../apache2.2- common_2.2.8-12vm.ubuntu0.14_amd64.deb) ...
Unpacking replacement apache2.2-common ...
Selecting previously deselected package apache2-mpm-worker.
Unpacking apache2-mpm-worker (from .../apache2- mpm-worker_2.2.8-12vm.ubuntu0.14_amd64.deb) ...
Setting up apache2.2-common (2.2.8-12vm.ubuntu0.14) ...
Installing new version of config file /etc/apache2/mods-available/disk_cache.conf ...
Installing new version of config file /etc/apache2/mods-available/autoindex.conf ...

Setting up apache2-mpm-worker (2.2.8-12vm.ubuntu0.14) ...
* Starting web server apache2
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
...fail!
invoke-rc.d: initscript apache2, action "start" failed.

Setting up apache2 (2.2.8-12vm.ubuntu0.14) ...

Mon, 04/26/2010 - 09:23
andreychek

Howdy,

If you're an Ubuntu user, your httpd.conf file should be empty :-)

In Ubuntu, it uses /etc/apache2/apache2.conf, and the individual VirtualHosts go in /etc/apache2/sites-enabled.

The error you're getting though -- is that for all domains on your server, or just one of them?

Also, was it your intention to switch from Apache's prefork mode to mpm-worker? It looks like that occurred during your update. That should, in theory, be okay, but it's a possible thing to look into :-)

However, what I'd suggest doing is looking in the Apache logs after you attempt to view your website... look in /var/log/apache2/error_log, and $HOME/logs/error_log, for any clues as to why you're seeing that problem. There may be some relevant error messages showing up in the logfiles.

-Eric

Mon, 04/26/2010 - 23:42 (Reply to #2)
CedSha

Hi Eric,

Tks for fast answer ...!

Yes Ubuntu (Hummm seem I did not search enough about this httpd.conf...)

The error comes on all domain of the server, however I try to display a simple HTML page without any php/mysql stuff and this one work well. As far as I understand Apache now cannot run PHP script.

I had no intention to switch prefork all this append automatically while updating Apache. This is during package update suggested by Virtualmin. I try to back to
apache2-mpm-prefork and libapache2-mod-php5
but without any success.

The logs files do not send informations when accessing these pages !

I try to add in the the /etc/apache2/apache2.conf file :
AddType application/x-httpd-php .php .phtml
AddHandler cgi-script .pl
Also without success.

-CedSha

Mon, 04/26/2010 - 23:59 (Reply to #3)
CedSha

Hi again,

I noticed the module PHP5 to be unchecked on
WEBMIN>Servers>Apache Web Server>Global configuration>Configure Apache modules
which should not be the case as I use PHP. I try to check back then I get an error message :
httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down.
I was already having this message at the end of Apache update. According to
http://seanbehan.com/apache/fun-with-apache2-httpd-not-running-trying-to... it should be related to some SSL problem but I do not use SSL.

Then I restart Apache again without any change this time it start well
I am still wondering what happens during this Apache update as it was very usual update.

Many thanks Eric for your support. Knowing someone is behind me help me more than you could never imagine.

-CedSha

Wed, 04/28/2010 - 17:17
lassochist

I had a similar problem with Ubuntu 8.04 LTS today, updating to the latest apache from within virtualmin but, in my case, it actually wiped out the php module entirely. I found this message on the Ubuntu boards and was successful in fixing it up:

http://ubuntuforums.org/showthread.php?t=1439483&highlight=apache2+php+p...

Not sure if the problem was at all webmin/virtualmin related but, the other poster mentions having updated apache from within webmin as well.

Thu, 04/29/2010 - 01:01 (Reply to #5)
CedSha

When you check the log of the installation (see 1st original message) you will find the following

Removing libapache2-mod-php5 ...

So to be sure there is a problem at this step. I have also installed back this module before my recovery.

-- CedSha

www.lineaire.net
www.exalibur.com.cn

Thu, 04/29/2010 - 04:37
janderk

I had the exact same problem. PHP5 was removed after upgrading Apache2 on Debian Lenny through webmin. I had to reinstall PHP5 and libapache2-mod-php5.

It only seems to happen to people who use webmin.

Is this a bug in webmin?

Or would it also have happened if I used aptitude instead?

Jan Derk

Sat, 05/08/2010 - 15:42
eagleon

Well, I had to shutdown my whole server because of this. Since apache wasn't responding to /etc/init.d/apache2 stop.

This is a serious security problem... because all the PHP source code is downloaded as HTML. Anyone can easily get our mysql passwords, private code, etc... ... now that the server is shutdown, this means my e-mail is also down!!! this is very frustrating.

I have been unsuccessful and resolving this. I reinstalled libapache2-mod-php5 ... restarted apache2 ... with no luck. Since the server is offline, I can't even try things out ... I have to figure out a solution before I can put it online and then apply it as quickly as possible and hope that no one tries to access the site during that time... wow, this is a good lesson. Never run an update without making a manual backup first.

You can imagine how frustrated my clients are right now, I have about 20 sites hosted on this server including my own.

What worked for you guys? Any help will be so greatly appreciated! I'm running debian 4 x64.

:( :( :( This really sucks!!!!!

Edit: manually killed apache2 process using killall so I can try to fix this.

Sat, 05/08/2010 - 21:50 (Reply to #8)
andreychek

The problem you're describing is much different than the other folks in this thread... the other folks had a problem where mod_php was disabled upon upgrading, which causes Apache to fail to start.

That particular problem is fixable by re-enabling mod_php.

The problem you're describing is one where PHP is not executing PHP scripts. When did the problem start? Had anything changed around that time? And do any errors show up in the Apache error logs?

-Eric

Sun, 05/09/2010 - 21:17 (Reply to #9)
eagleon

Hi Eric,

Thanks for the reply, I didn't realize that apache failed to start for the others. My case is certainly very different in that case.

Apache2 ran and worked fine for me after the update. Only the php problem was observed. The only other thing I meddled around with on the server was a BIND DNS setting, and is completely unrelated.

I looked in the apache2 logs. Nothing related was there, just some 403 errors from me trying to access domains that I had not put index files into.

Basically, in my case the php module was not only disabled, it was removed altogether. In addition, APACHE2-MPM-PREFORK was also removed. I installed this and LIBAPACHE2-MOD-PHP5 twice, and manually added a config file to parse php scripts in the apache conf.d area. I had to enable to php5 module again as well. I couldn't stop apache2 using the init.d scripts, so I had killed the process so that my PHP scripts were not directly downloaded as HTML in plain text. Anyway, after doing all this the problem was solved earlier today. After doing the final reboot, it worked fine.

Then my squid3 proxy had cached the PHP scripts as HTML textfiles so I had to completely wipe the cache as well. This recent problem has made me feel very uncomfortable with my server. Why did this happen?

Here is my apt log by the way:

Log started: 2010-05-08  13:54:00
(READING DATABASE ... 75841 FILES AND DIRECTORIES CURRENTLY INSTALLED.)
REMOVING LIBAPACHE2-MOD-PHP5 ...
MODULE PHP5 DISABLED.
RUN '/ETC/INIT.D/APACHE2 RESTART' TO ACTIVATE NEW CONFIGURATION!
(READING DATABASE ... 75840 FILES AND DIRECTORIES CURRENTLY INSTALLED.)
PREPARING TO REPLACE APACHE2 2.2.9-10+LENNY6 (USING .../APACHE2_2.2.9-10+LENNY7_ALL.DEB) ...
UNPACKING REPLACEMENT APACHE2 ...
DPKG: APACHE2-MPM-PREFORK: DEPENDENCY PROBLEMS, BUT REMOVING ANYWAY AS YOU REQUEST:
 MAILMAN DEPENDS ON APACHE2 | HTTPD; HOWEVER:
  PACKAGE APACHE2 IS NOT CONFIGURED YET.
  PACKAGE APACHE2-MPM-PREFORK WHICH PROVIDES APACHE2 IS TO BE REMOVED.
  PACKAGE HTTPD IS NOT INSTALLED.
  PACKAGE APACHE2-MPM-PREFORK WHICH PROVIDES HTTPD IS TO BE REMOVED.
 VIRTUALMIN-BASE DEPENDS ON APACHE2; HOWEVER:
  PACKAGE APACHE2 IS NOT CONFIGURED YET.
  PACKAGE APACHE2-MPM-PREFORK WHICH PROVIDES APACHE2 IS TO BE REMOVED.
 MAILMAN DEPENDS ON APACHE2 | HTTPD; HOWEVER:
  PACKAGE APACHE2 IS NOT CONFIGURED YET.
  PACKAGE APACHE2-MPM-PREFORK WHICH PROVIDES APACHE2 IS TO BE REMOVED.
  PACKAGE HTTPD IS NOT INSTALLED.
  PACKAGE APACHE2-MPM-PREFORK WHICH PROVIDES HTTPD IS TO BE REMOVED.
(READING DATABASE ... 75837 FILES AND DIRECTORIES CURRENTLY INSTALLED.)
REMOVING APACHE2-MPM-PREFORK ...
STOPPING WEB SERVER: APACHE2 ... WAITING .
(READING DATABASE ... 75831 FILES AND DIRECTORIES CURRENTLY INSTALLED.)
PREPARING TO REPLACE APACHE2.2-COMMON 2.2.9-10+LENNY6 (USING .../APACHE2.2-COMMON_2.2.9-10+LENNY7_AMD64.DEB) ...
UNPACKING REPLACEMENT APACHE2.2-COMMON ...
SELECTING PREVIOUSLY DESELECTED PACKAGE APACHE2-MPM-WORKER.
UNPACKING APACHE2-MPM-WORKER (FROM .../APACHE2-MPM-WORKER_2.2.9-10+LENNY7_AMD64.DEB) ...
SETTING UP APACHE2.2-COMMON (2.2.9-10+LENNY7) ...
SETTING UP APACHE2-MPM-WORKER (2.2.9-10+LENNY7) ...
STARTING WEB SERVER: APACHE2WARNING: MAXCLIENTS (10) MUST BE AT LEAST AS LARGE
 AS THREADSPERCHILD (25). AUTOMATICALLY
 INCREASING MAXCLIENTS TO 25.
.
SETTING UP APACHE2 (2.2.9-10+LENNY7) ...
Log ended: 2010-05-08  13:54:13
 
Log started: 2010-05-08  13:54:19
(Reading database ... 75840 files and directories currently installed.)
Preparing to replace libclamav6 0.95.3+dfsg-1~volatile1 (using .../libclamav6_0.96+dfsg-4~volatile1_amd64.deb) ...
Unpacking replacement libclamav6 ...
Preparing to replace clamav 0.95.3+dfsg-1~volatile1 (using .../clamav_0.96+dfsg-4~volatile1_amd64.deb) ...
Unpacking replacement clamav ...
Setting up libclamav6 (0.96+dfsg-4~volatile1) ...
Setting up clamav (0.96+dfsg-4~volatile1) ...
Log ended: 2010-05-08  13:54:21
 
Log started: 2010-05-08  13:54:40
(Reading database ... 75840 files and directories currently installed.)
Preparing to replace clamav-daemon 0.95.3+dfsg-1~volatile1 (using .../clamav-daemon_0.96+dfsg-4~volatile1_amd64.deb) ...
Stopping ClamAV daemon: clamd.
Unpacking replacement clamav-daemon ...
Preparing to replace clamav-base 0.95.3+dfsg-1~volatile1 (using .../clamav-base_0.96+dfsg-4~volatile1_all.deb) ...
Unpacking replacement clamav-base ...
Setting up clamav-base (0.96+dfsg-4~volatile1) ...
Replacing config file /etc/clamav/clamd.conf with new version
Setting up clamav-daemon (0.96+dfsg-4~volatile1) ...
Installing new version of config file /etc/init.d/clamav-daemon ...
Starting ClamAV daemon: clamd .
Log ended: 2010-05-08  13:54:47
 
Log started: 2010-05-08  13:54:51
(Reading database ... 75840 files and directories currently installed.)
Preparing to replace clamav-docs 0.95.3+dfsg-1~volatile1 (using .../clamav-docs_0.96+dfsg-4~volatile1_all.deb) ...
Unpacking replacement clamav-docs ...
Setting up clamav-docs (0.96+dfsg-4~volatile1) ...
Log ended: 2010-05-08  13:54:52
 
Log started: 2010-05-08  13:54:55
(Reading database ... 75843 files and directories currently installed.)
Preparing to replace clamav-freshclam 0.95.3+dfsg-1~volatile1 (using .../clamav-freshclam_0.96+dfsg-4~volatile1_amd64.deb) ...
Stopping ClamAV virus database updater: freshclam.
Unpacking replacement clamav-freshclam ...
Setting up clamav-freshclam (0.96+dfsg-4~volatile1) ...
Installing new version of config file /etc/init.d/clamav-freshclam ...
Replacing config file /etc/logrotate.d/clamav-freshclam with new version
Replacing config file /etc/clamav/freshclam.conf with new version
Starting ClamAV virus database updater: freshclam.
Log ended: 2010-05-08  13:54:58
 
Log started: 2010-05-08  13:55:04
(Reading database ... 75843 files and directories currently installed.)
Preparing to replace clamav-testfiles 0.95.3+dfsg-1~volatile1 (using .../clamav-testfiles_0.96+dfsg-4~volatile1_all.deb) ...
Unpacking replacement clamav-testfiles ...
Setting up clamav-testfiles (0.96+dfsg-4~volatile1) ...
Log ended: 2010-05-08  13:55:05
 
Log started: 2010-05-08  13:55:12
(Reading database ... 75883 files and directories currently installed.)
Preparing to replace usermin 1.430 (using .../archives/usermin_1.440_all.deb) ...
Unpacking replacement usermin ...
Setting up usermin (1.440) ...
Usermin install complete. You can now login to https://xxxxxxxxxxxxxxxxxx.com:20000/
as any user on the system.
Log ended: 2010-05-08  13:55:30
 
Log started: 2010-05-08  13:55:44
Selecting previously deselected package libapt-pkg-perl.
(Reading database ... 75886 files and directories currently installed.)
Unpacking libapt-pkg-perl (from .../libapt-pkg-perl_0.1.22+b1_amd64.deb) ...
Selecting previously deselected package apt-show-versions.
Unpacking apt-show-versions (from .../apt-show-versions_0.15_all.deb) ...
Preparing to replace webmin 1.500 (using .../webmin_1.510-2_all.deb) ...
Unpacking replacement webmin ...
Setting up libapt-pkg-perl (0.1.22+b1) ...
Setting up apt-show-versions (0.15) ...
** initializing cache. This may take a while **
Setting up webmin (1.510-2) ...
Webmin install complete. You can now login to https://xxxxxxxxxxxxxxxxx.com:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
Log ended: 2010-05-08  13:56:29
 
Log started: 2010-05-08  13:56:38
(Reading database ... 75969 files and directories currently installed.)
Preparing to replace webmin-virtual-server 3.77.gpl (using .../webmin-virtual-server_3.78.gpl_all.deb) ...
Unpacking replacement webmin-virtual-server ...
Setting up webmin-virtual-server (3.78.gpl) ...
 
Log ended: 2010-05-08  13:56:59
 
Log started: 2010-05-08  14:13:47
(Reading database ... 75993 files and directories currently installed.)
Preparing to replace dpkg 1.14.28 (using .../dpkg_1.14.29_amd64.deb) ...
Unpacking replacement dpkg ...
Setting up dpkg (1.14.29) ...
(Reading database ... 75993 files and directories currently installed.)
Preparing to replace libkrb53 1.6.dfsg.4~beta1-5lenny2 (using .../libkrb53_1.6.dfsg.4~beta1-5lenny3_amd64.deb) ...
Unpacking replacement libkrb53 ...
Preparing to replace apache2-doc 2.2.9-10+lenny6 (using .../apache2-doc_2.2.9-10+lenny7_all.deb) ...
Unpacking replacement apache2-doc ...
Preparing to replace apache2-utils 2.2.9-10+lenny6 (using .../apache2-utils_2.2.9-10+lenny7_amd64.deb) ...
Unpacking replacement apache2-utils ...
Preparing to replace libcurl3 7.18.2-8lenny3 (using .../libcurl3_7.18.2-8lenny4_amd64.deb) ...
Unpacking replacement libcurl3 ...
Preparing to replace curl 7.18.2-8lenny3 (using .../curl_7.18.2-8lenny4_amd64.deb) ...
Unpacking replacement curl ...
Preparing to replace dselect 1.14.28 (using .../dselect_1.14.29_amd64.deb) ...
Unpacking replacement dselect ...
Preparing to replace libpng12-0 1.2.27-2+lenny2 (using .../libpng12-0_1.2.27-2+lenny3_amd64.deb) ...
Unpacking replacement libpng12-0 ...
Preparing to replace libimlib2 1.4.0-1.2 (using .../libimlib2_1.4.0-1.2+lenny1_amd64.deb) ...
Unpacking replacement libimlib2 ...
Preparing to replace libpng3 1.2.27-2+lenny2 (using .../libpng3_1.2.27-2+lenny3_all.deb) ...
Unpacking replacement libpng3 ...
Preparing to replace linux-libc-dev 2.6.26-21lenny3 (using .../linux-libc-dev_2.6.26-21lenny4_amd64.deb) ...
Unpacking replacement linux-libc-dev ...
Preparing to replace php5-dev 5.2.6.dfsg.1-1+lenny6 (using .../php5-dev_5.2.6.dfsg.1-1+lenny8_amd64.deb) ...
Unpacking replacement php5-dev ...
Preparing to replace apache2-suexec-custom 2.2.9-10+lenny6 (using .../apache2-suexec-custom_2.2.9-10+lenny7_amd64.deb) ...
Unpacking replacement apache2-suexec-custom ...
Setting up libkrb53 (1.6.dfsg.4~beta1-5lenny3) ...
Setting up apache2-doc (2.2.9-10+lenny7) ...
Reloading web server config: apache2Setting up apache2-utils (2.2.9-10+lenny7) ...
Setting up libcurl3 (7.18.2-8lenny4) ...
Setting up curl (7.18.2-8lenny4) ...
Setting up dselect (1.14.29) ...
Setting up libpng12-0 (1.2.27-2+lenny3) ...
Setting up libimlib2 (1.4.0-1.2+lenny1) ...
Setting up libpng3 (1.2.27-2+lenny3) ...
Setting up linux-libc-dev (2.6.26-21lenny4) ...
Setting up php5-dev (5.2.6.dfsg.1-1+lenny8) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Setting up apache2-suexec-custom (2.2.9-10+lenny7) ...
Log ended: 2010-05-08  14:13:56
 
Log started: 2010-05-08  14:31:19
dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you request:
 apache2 depends on apache2-mpm-worker (>= 2.2.9-10+lenny7) | apache2-mpm-prefork (>= 2.2.9-10+lenny7) | apache2-mpm-event (>= 2.2.9-10+lenny7); however:
  Package apache2-mpm-worker is to be removed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
(Reading database ... 75990 files and directories currently installed.)
Removing apache2-mpm-worker ...
Stopping web server: apache2WARNING: MaxClients (10) must be at least as large
 as ThreadsPerChild (25). Automatically
 increasing MaxClients to 25.
 ... waiting .
Selecting previously deselected package apache2-mpm-prefork.
(Reading database ... 75984 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.9-10+lenny7_amd64.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.2.6.dfsg.1-1+lenny8_amd64.deb) ...
Setting up apache2-mpm-prefork (2.2.9-10+lenny7) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Starting web server: apache2.
Setting up libapache2-mod-php5 (5.2.6.dfsg.1-1+lenny8) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Reloading web server config: apache2.
Log ended: 2010-05-08  14:31:25
 
Log started: 2010-05-08  15:55:15
(Reading database ... 75997 files and directories currently installed.)
Preparing to replace php5 5.2.6.dfsg.1-1+lenny8 (using .../php5_5.2.6.dfsg.1-1+lenny8_all.deb) ...
Unpacking replacement php5 ...
Setting up php5 (5.2.6.dfsg.1-1+lenny8) ...
Log ended: 2010-05-08  15:55:16
 
Log started: 2010-05-08  15:57:41
(Reading database ... 75997 files and directories currently installed.)
Preparing to replace apache2 2.2.9-10+lenny7 (using .../apache2_2.2.9-10+lenny7_all.deb) ...
Unpacking replacement apache2 ...
Setting up apache2 (2.2.9-10+lenny7) ...
Log ended: 2010-05-08  15:57:42
 
Log started: 2010-05-08  15:58:10
(Reading database ... 75997 files and directories currently installed.)
Preparing to replace libapache2-mod-php5 5.2.6.dfsg.1-1+lenny8 (using .../libapache2-mod-php5_5.2.6.dfsg.1-1+lenny8_amd64.deb) ...
Unpacking replacement libapache2-mod-php5 ...
Setting up libapache2-mod-php5 (5.2.6.dfsg.1-1+lenny8) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Reloading web server config: apache2Log ended: 2010-05-08  15:58:12
 
Log started: 2010-05-08  16:43:48
(Reading database ... 75994 files and directories currently installed.)
Removing libapache2-mod-php5 ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Module php5 already disabled
dpkg: apache2-mpm-prefork: dependency problems, but removing anyway as you request:
 apache2 depends on apache2-mpm-worker (>= 2.2.9-10+lenny7) | apache2-mpm-prefork (>= 2.2.9-10+lenny7) | apache2-mpm-event (>= 2.2.9-10+lenny7); however:
  Package apache2-mpm-worker is not installed.
  Package apache2-mpm-prefork is to be removed.
  Package apache2-mpm-event is not installed.
Removing apache2-mpm-prefork ...
Stopping web server: apache2.
Selecting previously deselected package apache2-mpm-worker.
(Reading database ... 75984 files and directories currently installed.)
Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.2.9-10+lenny7_amd64.deb) ...
Setting up apache2-mpm-worker (2.2.9-10+lenny7) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Starting web server: apache2WARNING: MaxClients (10) must be at least as large
 as ThreadsPerChild (25). Automatically
 increasing MaxClients to 25.
.
Log ended: 2010-05-08  16:43:52
 
Log started: 2010-05-08  16:45:41
dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you request:
 apache2 depends on apache2-mpm-worker (>= 2.2.9-10+lenny7) | apache2-mpm-prefork (>= 2.2.9-10+lenny7) | apache2-mpm-event (>= 2.2.9-10+lenny7); however:
  Package apache2-mpm-worker is to be removed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
(Reading database ... 75990 files and directories currently installed.)
Removing apache2-mpm-worker ...
Stopping web server: apache2WARNING: MaxClients (10) must be at least as large
 as ThreadsPerChild (25). Automatically
 increasing MaxClients to 25.
.
Selecting previously deselected package apache2-mpm-prefork.
(Reading database ... 75984 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.9-10+lenny7_amd64.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.2.6.dfsg.1-1+lenny8_amd64.deb) ...
Setting up apache2-mpm-prefork (2.2.9-10+lenny7) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Starting web server: apache2.
Setting up libapache2-mod-php5 (5.2.6.dfsg.1-1+lenny8) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Log ended: 2010-05-08  16:45:47
Tue, 05/11/2010 - 13:12 (Reply to #10)
janderk

The problem you're describing is much different than the other folks in this thread... the other folks had a problem where mod_php was disabled upon upgrading, which causes Apache to fail to start.

I had the same problem as eagleon. In my case Apache worked just fine. The problem was that php5 was removed when upgrading through virtualmin, causing PHP scripts to be downloaded as text.

I had to reinstall in php5 and libapache2-mod-php5.

Tue, 05/25/2010 - 06:24
everisk

Help~!

I have the same problem. PHP is not parsed. I tried sudo aptitude install php5 libapache2-mod-php5 apache2-mpm-prefork and still it's not working. I have the config back-up but restoring it's not helping. What do I do??

Tue, 05/25/2010 - 08:50 (Reply to #12)
andreychek

So you're getting what error specifically?

There's a few different problems described in this thread, with a few different ways of solving each of them :-)

The issue with PHP directives being in the Apache config should certainly be fixed by enabling mod_php though. If that's the problem you're having, and installing mod_php didn't fix it, it may mean mod_php isn't being enabled when Apache starts up. You may want to verify that the module is both installed as well as enabled.

-Eric

Fri, 05/28/2010 - 13:58
curt_fehr

Older thread, but I thought I would share how I got mine working again. This should work if your running apache2 on any version of linux.

Connect to your server via SSH and type

a2enmod php5

OR if your using php4

a2enmod php4

Then restart apache with

/etc/init.d/apache2 force-reload

Worked for me, and if you get an error, that would probably be easier to find answers if you google the error message direct from the server, and not from a web based server admin system.

Topic locked