Cannot restart Apache after Debian upgrade to Wheezy and php5.5

Discussion in 'Installation/Configuration' started by tjbcham, Jun 26, 2015.

  1. tjbcham

    tjbcham Member

    Debian Wheezy 7.8
    Apache version running: Apache/2.2.22 (Debian)
    PHP 5.5.26-1~dotdeb+7.4

    Hi,

    Just upgraded a live server to Wheezy from Debian 6 and wanted to also upgrade to php 5.5, but it seems the configuration files have got extremely messed up. Apache is running and serving up the sites on the server but I cannot restart Apache.

    I read somewhere that the upgrade of php 5.5 might also upgrade Apache 2.2 to Apache 2.4, however, Apache 2.2 is still running, but I cannot restart it and my ISPconfig is throwing out emails to me with errors:

    WARNING - Apache did not restart after the configuration change for website... Reverting the configuration.

    Reason for Apache restart failure: Syntax error on line 1 of /etc/apache2/conf.d/javascript-common.conf:
    Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration
    Action 'configtest' failed.
    The Apache error log may have more information.
    failed!
    When I check alias is enabled it is...
    # a2enmod alias
    Module alias already enabled

    Also get email with:

    WARNING - Could not check apache modules, apachectl did not return any data.​

    There is nothing in log/apache2/error.log

    Thanks.
     
  2. tjbcham

    tjbcham Member

    Now Apache is no longer running. It stopped by itself whilst sending the emails for ISPconfig.

    Still nothing in error.log
     
  3. tjbcham

    tjbcham Member

    When I first tried to restart I commented out two lines in the apache2.conf file which I had not gone back to uncomment out. When they are not commented out the error is:

    /etc/init.d/apache2 restart
    apache2: Syntax error on line 236 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php5_cgi.load: No such file or directory
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the file /etc/apache2/mods-enabled/php5_cgi.load is missing on your server.
     
  5. tjbcham

    tjbcham Member

    Thanks for the reply... but if I do
    ls -la /etc/apache2/mods-available/

    It says it is there:
    -rw-r--r-- 1 root root 1344 Jun 18 19:42 php5-cgi.conf
    -rw-r--r-- 1 root root 897 Jun 18 19:42 php5.conf
    -rw-r--r-- 1 root root 59 Mar 4 2013 php5.load
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    It is not there, please see exact file name from error message: php5_cgi.load
     
  7. tjbcham

    tjbcham Member

    So yes it is missing. Was getting tired from googling and reading as much as I could as fast as I could...
    In my frustration with googling I just upgraded to Jessie and everything restarted, Apache 2.4 started, all was good but then I hit reboot on the server (as per info I read) and then the server would not come back up . As it is remote I have no idea why it would not restart. Remotely hit the power switch which did nothing. Have access by Rescue, but as I have little to idea what I am doing I cannot seem tot do anything other than back up my files and reinstall the server.
     
  8. manarak

    manarak Member

    ok, I can chime in here as I had the same problem.

    I added packages.dotdeb.org wheezy-php56 to my sources list and then upgraded php to 5.6, all was still fine until I did update and upgrade again.
    Then a bunch of modules upgraded, including some apache I think and then it wouldn't start anymore with the same moan about php5_cgi.load missing.
    then I went on another server, thinking I could just copy the missing file over. looking into it, I discovered it just said "dummy file", lol.
    so I made a dummy file, restarted apache and the next problem was apache moaning about php5_cgi.conf missing. I took my chances and just renamed php5-cgi.conf into php5_cgi.conf and restarted.
    I got my apache back and everything seems OK.

    seems there is a quirk in the upgrade procedures.
     

Share This Page