1

I'm somewhat of a Ubuntu newb and have recently set-up a ubuntu VPS (on the azure network). I am using webmin / virtualmin as a means to administer the server and quickly * easily create and administer virtual hosting accounts.

After doing some package updayes via the webmin interface, the system rebooted. On relaunching webmin i could see that the apache server wasn't running. When I tried to restart it, webmin displayed the following error:

Failed to start service :

  • Starting web server apache2
      • The apache2 configtest failed. Output of config test was: AH00526: Syntax error on line 40 of /etc/apache2/sites-enabled/apn.codeclinic.de.conf: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information.

If I comment out this line it just fails at the next php reference, and if I comment this one out it simply fails on the config file for the next virtual server(website).

So looking at the command shell I ran

sudo apt-get -f install

Which gives me the following areas of interest(it prints out a huge list of things but these are the most notable errors to me):

dpkg: error processing package php5-cgi (--configure):

subprocess installed post-installation script returned error exit status 1

dpkg: dependency problems prevent configuration of php5:

php5 depends on libapache2-mod-php5 (>= 5.5.9+dfsg-1ubuntu4.7) | libapache2-mod-php5filter (>= 5.5.9+dfsg-1ubuntu4.7) | php5-cgi (>= 5.5.9+dfsg-1ubuntu4.7) | php5-fpm (>= 5.5.9+dfsg-1ubuntu4.7); however:

Package libapache2-mod-php5 is not configured yet.

Package libapache2-mod-php5filter is not installed.

Package php5-cgi is not configured yet.

Package php5-fpm is not installed.

dpkg: error processing package php5 (--configure): dependency problems - leaving unconfigured

No apport report written because MaxReports is reached already

No apport report written because MaxReports is reached already

Errors were encountered while processing:

php5-cli

php5-readline

libapache2-mod-php5

linux-cloud-tools-common

php-pear

php5-cgi

php5

E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried

sudo apt-get install --reinstall php5 -y

But get the following output:

Reading package lists... Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. 7 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for php5:amd64

I'm now really stuck as all my clients websites are down, and stupidly it seems my backup schedule was never setup properly.

So I know I'm stupid, but please help. ;-)

8
  • Try sudo dpkg --configure -a.
    – Jos
    Mar 20, 2015 at 14:11
  • @jos doesn-t work. just returns the same Mar 20, 2015 at 14:40
  • You will need to solve the dependencies first or otherwise you will never be able to use apt-get again. At this point it may be wise to completely uninstall php5 and rerun my command, then try to install php5.
    – Jos
    Mar 20, 2015 at 14:47
  • Just to limit my chances of messing it up even further, how do i 'completely uninstall php5' ? Mar 20, 2015 at 15:07
  • So, i did 'sudo apt-get purge php5 -y' followed by 'sudo dpkg --configure -a' and that gives the same output essentially. Mar 20, 2015 at 15:13

1 Answer 1

1

Setting up a LAMP server, I go in the following order; 1. Apache, 2. PHP, 3. MySQL

So for you I would run the following commands:

sudo apt-get install --reinstall apache2
sudo apt-get install --reinstall php5

It won't remove the current configurations for either Apache or PHP but should at least be a bit more specific to troubleshoot then dpkg --configure -a as depending on which fails first Apache or PHP, you can then focus on where the problem lies.

You must log in to answer this question.

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