Results 1 to 21 of 21
  1. #1
    Join Date
    Aug 2007
    Posts
    263

    httpd faild to start

    [[email protected] ~]# service httpd start
    Starting httpd: httpd: Syntax error on line 16 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory
    may i know what happen? how to solve this ?

  2. #2
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by seachen View Post
    may i know what happen? how to solve this ?
    Hello,
    Is this a cPanel server?
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  3. #3
    Join Date
    Aug 2007
    Posts
    263
    Quote Originally Posted by KDisk View Post
    Hello,
    Is this a cPanel server?
    this is directadmin server

  4. #4
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by seachen View Post
    this is directadmin server
    Hello,
    What Linux Distro are you running?
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  5. #5
    Join Date
    Aug 2007
    Posts
    263
    Quote Originally Posted by KDisk View Post
    Hello,
    What Linux Distro are you running?
    OS: Centos 5 32bit

  6. #6
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by seachen View Post
    OS: Centos 5 32bit
    Thanks,
    Can you run the following command as root and post the output.
    Code:
    yum list php\* | grep installed
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  7. #7
    Join Date
    Jul 2009
    Posts
    69
    What's on line 16 of httpd.conf?

    To get around it, edit httpd.conf and comment out the respective line?

    pico /etc/httpd/conf/httpd.conf

  8. #8
    Join Date
    Aug 2007
    Posts
    263
    Quote Originally Posted by KDisk View Post
    Thanks,
    Can you run the following command as root and post the output.
    Code:
    yum list php\* | grep installed
    it show this.

    [[email protected] ~]# yum list php\* | grep installed
    Error: No matching Packages to list
    [[email protected] ~]#

  9. #9
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by TimC View Post
    What's on line 16 of httpd.conf?

    To get around it, edit httpd.conf and comment out the respective line?

    pico /etc/httpd/conf/httpd.conf
    Hello,
    The problem with that is it will break any PHP Scripts that his users may be running. It is best to take a few moments to fix the problem.
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  10. #10
    Join Date
    Aug 2007
    Posts
    263
    Quote Originally Posted by TimC View Post
    What's on line 16 of httpd.conf?

    To get around it, edit httpd.conf and comment out the respective line?

    pico /etc/httpd/conf/httpd.conf
    result as below:

    #
    # This is the main Apache HTTP server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
    # In particular, see
    # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
    # for a discussion of each configuration directive.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.

    ServerRoot "/etc/httpd"
    Listen 80

    LoadModule php5_module modules/libphp5.so
    AddType application/x-httpd-php .php

    LoadModule dummy_module /usr/lib/apache/mod_dummy.so
    # LoadModule php5_module /usr/lib/apache/libphp5.so
    LoadModule php5_module /usr/local/apache2/modules/libphp5.so
    #Load Module php5_module /usr/lib/apache/libphp5.so

    Include /etc/httpd/conf/extra/httpd-phpmodules.conf

    User apache
    Group apache

    ServerAdmin [email protected]
    DocumentRoot "/var/www/html"

    <Directory /home/*>
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>

    <Directory />
    Options All
    AllowOverride All
    </Directory>

    <Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    <IfModule mod_suphp.c>
    suPHP_Engine On
    ##suPHP_UserGroup webapps webapps
    SetEnv PHP_INI_SCAN_DIR
    </IfModule>
    </Directory>

    <IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
    </IfModule>

    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </FilesMatch>

    ErrorLog /var/log/httpd/error_log
    LogLevel warn

    <IfModule log_config_module>
    #replace %b with %O for more accurate logging
    <IfModule mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%O" bytes

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    CustomLog /var/log/httpd/access_log common
    </IfModule>

    <IfModule alias_module>
    # Include some DirectAdmin alias
    Include conf/extra/httpd-alias.conf
    </IfModule>

    <Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>

    DefaultType text/plain

    <IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-gzip .tgz
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi
    AddHandler type-map var
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType video/x-ms-asf .avi
    AddType video/mpeg .mpg
    AddType video/mpeg .mpeg
    AddType video/quicktime .mov
    AddType video/x-ms-wmv .wmv
    </IfModule>

    #EnableMMAP off
    #EnableSendfile off

    #######################################################################################
    # Do not change anything in included files, because they are rewritten by DirectAdmin #
    #######################################################################################

    # This is needed for PHP
    Include conf/extra/httpd-php-handlers.conf

    # Server-pool management (MPM specific)
    Include conf/extra/httpd-mpm.conf

    # Multi-language error messages
    Include conf/extra/httpd-multilang-errordoc.conf

    # Fancy directory listings
    Include conf/extra/httpd-autoindex.conf

    # Language settings
    Include conf/extra/httpd-languages.conf

    # User home directories
    #Include conf/extra/httpd-userdir.conf

    # Real-time info on requests and configuration
    Include conf/extra/httpd-info.conf

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf

    # Distributed authoring and versioning (WebDAV)
    Include conf/extra/httpd-dav.conf

    # Various default settings
    Include conf/extra/httpd-default.conf

    # Secure (SSL/TLS) connections
    Include conf/extra/httpd-ssl.conf

    # Deflate module settings
    Include conf/extra/httpd-deflate.conf

    # All the DirectAdmin vhosts
    Include conf/extra/directadmin-vhosts.conf

    # All suPHP directives
    Include conf/extra/httpd-suphp.conf

    # For user configurations not maintained by DirectAdmin. Empty by default.
    Include conf/extra/httpd-includes.conf

    #######################################################################################
    # End of included files that are rewritten by DirectAdmin #
    #######################################################################################

    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>

  11. #11
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by seachen View Post
    it show this.
    Thanks,
    Try running the following commands as root.

    Code:
    yum remove php
    yum remove php-common
    yum install php
    reboot
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  12. #12
    Join Date
    Jul 2009
    Posts
    69
    Quote Originally Posted by KDisk View Post
    Hello,
    The problem with that is it will break any PHP Scripts that his users may be running. It is best to take a few moments to fix the problem.
    Sure, however Apache being down is a little worse than a number of broken PHP scripts, no?

  13. #13
    Join Date
    Aug 2007
    Posts
    263
    Quote Originally Posted by KDisk View Post
    Hello,
    The problem with that is it will break any PHP Scripts that his users may be running. It is best to take a few moments to fix the problem.
    this server is empty. i just do the clean installation of DA.

  14. #14
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by seachen View Post
    this server is empty. i just do the clean installation of DA.
    You should be able to fix it with the lines above, I would try that first if possible
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  15. #15
    Join Date
    Aug 2007
    Posts
    263
    Quote Originally Posted by KDisk View Post
    Thanks,
    Try running the following commands as root.

    Code:
    yum remove php
    yum remove php-common
    yum install php
    reboot
    [[email protected] ~]# yum remove php
    Loaded plugins: fastestmirror
    Setting up Remove Process
    No Match for argument: php
    No Packages marked for removal
    [[email protected] ~]# yum remove php-common
    Loaded plugins: fastestmirror
    Setting up Remove Process
    No Match for argument: php-common
    No Packages marked for removal
    [[email protected] ~]# yum install php
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.primusdatacentre.com.au
    * updates: mirror.nus.edu.sg
    * addons: mirror.primusdatacentre.com.au
    * extras: mirror.primusdatacentre.com.au
    base | 1.1 kB 00:00
    updates | 951 B 00:00
    addons | 951 B 00:00
    extras | 1.1 kB 00:00
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    Parsing package install arguments
    No package php available.
    Nothing to do
    [[email protected] ~]# reboot

    Broadcast message from root (pts/0) (Mon Oct 5 00:38:06 2009):

    The system is going down for reboot NOW!
    [[email protected] ~]#
    after reboot, i check with httpd status, it show as below:

    [[email protected] ~]# service httpd status
    httpd is stopped
    [[email protected] ~]# service httpd start
    Starting httpd: httpd: Syntax error on line 16 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory

    [[email protected] ~]#
    seen like not working too

  16. #16
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by TimC View Post
    Sure, however Apache being down is a little worse than a number of broken PHP scripts, no?
    Hello,
    Not exctly. I would perfer Apache being down then PHP being disabeled. This can pose a MASSIVE security risk.

    Example : If you have a wordpress install with PHP Off, a user can browse to http://somedomain.com/wp-config.php and download the plain text config file (containing the database password)
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  17. #17
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    19,185
    Quote Originally Posted by seachen View Post
    after reboot, i check with httpd status, it show as below:



    seen like not working too
    Wow,
    Last resort before you re-image :
    Code:
    sudo yum install php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Geek Survival Guide - Reviews and Advice for Geeks

  18. #18
    Join Date
    May 2009
    Location
    On a Speck!!!!!
    Posts
    216
    Hi,

    Do the following step and restart Apache.

    yum install php php-devel

  19. #19
    Join Date
    Aug 2008
    Location
    Right behind you.
    Posts
    410
    Quote Originally Posted by Thomas Manning View Post
    Hi,

    Do the following step and restart Apache.

    yum install php php-devel


    Mind, its a DA server and following the above will break the entire configurations.

    Please try below to rebuild apache on a DA server.


    cd /usr/local/directadmin/custombuild

    ./build all
    http://we3cares.com/
    Seven years in server management!!.
    Performance exceeds expectation.

  20. #20
    Join Date
    Aug 2007
    Posts
    263
    i have been solve the problem by copying the httpd.conf from another vps and paste it at current have problem 1. now problem solve.

    thanks a lot for above member who willing to teach me.

  21. #21
    Join Date
    Jul 2008
    Location
    Seminole, OK
    Posts
    1,575
    A fresh installed normally does work but I would suggest fixing the problem instead of fresh install for experience. What happens if this happens again in the future. I would try what he said above

    Keep in mind I have never messed with DA server so I could mess up the DA configuration.
    # yum remove php php-common
    # yum install php
    # shutdown -r now
    Then
    # service httpd status
    or at user level
    /etc/init.d/httpd status
    If it says running test it out.

    I didn't see you pst above that you got it working.
    Great job.
    Last edited by jcarney1987; 10-04-2009 at 03:26 PM.
    Inode Hosting - Reliable Web Hosting for the right price.
    Shared & Reseller hosting featuring the industry leading cpanel
    99.9% Uptime Guarantee ,30 Day Money Back Guarantee ,24/7 Support
    Established since 2011

Similar Threads

  1. apache start: faild
    By hichkas in forum Hosting Security and Technology
    Replies: 4
    Last Post: 07-01-2009, 06:34 AM
  2. httpd start faild Please help
    By bogmail in forum Hosting Security and Technology
    Replies: 3
    Last Post: 01-06-2006, 01:09 PM
  3. Replies: 28
    Last Post: 10-04-2004, 03:35 AM
  4. HELP: httpd start faild
    By host911 in forum Hosting Security and Technology
    Replies: 4
    Last Post: 08-28-2002, 12:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •