Apache failed after restart

Discussion in 'Apache' started by Mbpotin, Oct 13, 2008.

  1. #1
    Hi,

    I'm runing a VPS on Debian OS.
    It's seems that I manage to mess up my apache when I try to restart it I receive the following:

    vps:/etc/apache2/sites-available# /etc/init.d/apache2 restart
    Forcing reload of web server (apache2).../etc/init.d/apache2: line 78: kill: (15746) - No such process
    apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
    failed!

    Please advice thanks,
    Tal
     
    Mbpotin, Oct 13, 2008 IP
  2. Mbpotin

    Mbpotin Peon

    Messages:
    68
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok so we have the following errors:



    1. Forcing reload of web server (apache2).../etc/init.d/apache2: line 78: kill: (15746) - No such process

    Line78:

    if [ "${PID}" ]; then
    # in this case it is everything nice and dandy
    # and we kill apache2
    Line78: kill $PID


    2. apache2: Syntax error on line 185 of /etc/apache2/apache2.conf:

    Line185:

    # Include module configuration:
    Include /etc/apache2/mods-enabled/*.load
    Line 185: Include /etc/apache2/mods-enabled/*.conf


    3. Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory

    Line 1:

    LoadModule php5_module /usr/lib/apache2/modules/libphp5.so


    Thanks Again
     
    Mbpotin, Oct 13, 2008 IP
  3. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The first error is most probably caused by Apache crashing at some stage and leaving a pid file lying around with a pid in it that doesn't belong to a running process. The shell script grabs the pid out of the pid file and tries to kill the process with that pid and then gets the error message "No such process". You can fix this by deleting the pid file. The full path to the pid file will be somewhere in the /etc/init.d/apache2 shell script.

    The second error is simply caused by the third error. There isn't actually a syntax error on line 185 of apache2.conf.

    The third error is almost self-explanatory. If you type the command:
    ls -l /usr/lib/apache2/modules/libphp5.so
    Code (markup):
    on your server you will get the error message "No such file or directory". This will happen because the file simply isn't there.

    You should either type
    locate libphp5.so
    Code (markup):
    or
    find / -name libphp5.so
    Code (markup):
    to find where the file is. I'm not sure whether you would be better changing line 1 of the php5.load file or moving the libphp5.so file to where the php5.load file expects it to be. You will have to make that judgement based on where you find it.
     
    Ladadadada, Oct 14, 2008 IP
  4. genius24k

    genius24k Active Member

    Messages:
    114
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Try tolocate it, do an updatedb first if thi sis the first time you use locate

    locate libphp5.so
     
    genius24k, Oct 14, 2008 IP