apache not working

Discussion in 'Server Operation' started by cruz, Oct 19, 2007.

  1. cruz

    cruz New Member

    I posted this someware else and I do not know if it was suppose to post it in this area. Anyhow. I changed the file /home/admispconfig/ispconfig/lib/config.inc.php. because I was getting errors on the php log
    HTML:
     an unknown filter was not added: PHP
    I added the string that was told in this posting.
    HTML:
    This has already been fixed many releases ago. You will just have to change the line from:
    
    $go_info["server"]["apache2_php"] = 'both'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)
    
    
    to:
    
    $go_info["server"]["apache2_php"] = 'addtype'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)
    
    
    in the file /home/admispconfig/ispconfig/lib/config.inc.php
    
    I do not know if this is what caused the web server not to work, but after I changed this it stoped working. I had copied the file before I changed it, so I recopied it back to the server. But it did not fix it. I looked into apache file and can see red marks on two files. php4.conf and php4.load. this is the error message I get when booting the server.
    HTML:
    syntac error on line 185 of/etc/apache2/apache2.config could not open configuration file /etc/apache2/mods-enable/php4.load no such file or directory
    Now I have php5 on here. Why is it trying to load php4? Please help, my server is down. But I can login to the servers ispconfig councal, but my website is down. Thanks

    P.S. new info. I went to the files that had the red marks and tried to open them with winSCP and it is telling me. can't open remote file.then it has the path to the files (php4.config php4.load) I hope this helps. thanks
     
    Last edited: Oct 19, 2007
  2. giganet

    giganet New Member

    Have you tried powering down the server after first re-storing original files, then re-powering it?
     
  3. cruz

    cruz New Member

    yes I tried that 4 times. I found this when I tried to open the files I mentioned.
    Cannot open remote file '/etc/apache2/mods-enabled/php4.conf'.
    No such file or directory.
    Error code: 2
    Error message from server: No such file
    Request code: 3
    It seems the files are gone.
     
  4. cruz

    cruz New Member

    How can I reload these directory's? They are gone. or can I? Thanks for the help
     
  5. giganet

    giganet New Member

    Hmm, have you tried to re-install PHP5?


    When you say you are able to get to ISPConfig- are you accessing it VIA IP or domain?

    When you are logged into ISPConfig and select the Services tab what does ISPConfig report there?
     
  6. cruz

    cruz New Member

    I can login to ispconfig, but the when I click on servic, the web-sever is offline. I can see php5.config and php5.load. I open them up and they are small text code. I am getting the error from the php4, not 5. I don;t understand half this stuff. If I can replace the two files, I think it will work, but I do not know what code to put in them.
     
  7. giganet

    giganet New Member

    what does the server return when you run 'php -v' ?

    Try to restart ISPConfig '/etc/init.d/ispconfig_server restart'
     
  8. cruz

    cruz New Member

    php -v command

    take a look at this.
    HTML:
    server1:~# php -v
    PHP Warning:  Module 'json' already loaded in Unknown on line 0
    PHP 5.2.0-8+etch7 (cli) (built: Jul  2 2007 21:46:15)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    what is json? this is what I get when I restart ispconfig
    HTML:
    server1:~# /etc/init.d/ispconfig_server restart
    Shutting down ISPConfig system...
    /root/ispconfig/httpd/bin/apachectl stop: httpd stopped
    ISPConfig system stopped!
    Starting ISPConfig system...
    /root/ispconfig/httpd/bin/apachectl startssl: httpd started
    ISPConfig system is now up and running!
    server1:~#
    
     
  9. giganet

    giganet New Member

    I have been Googling the PHP module 'json', this module is used by a variety of differing applications.

    Here's what I Googled for you:

    Instead of restarting Lighhttpd your will restart apache2:
    '/etc/init.d/apache2 restart'

    Please view the source of the above: http://agaricdesign.com/projects/sites/wsf2008

    Google Search Term: php -v command shows module json loaded
     
  10. cruz

    cruz New Member

    this is what i get

    I folowed everything and when I restarted apache, this is the error message I got.
    HTML:
    server1:~# /etc/init.d/apache2 restart
    Forcing reload of web server (apache2)...grep: /etc/apache2/mods-enabled/php4.load: No such file or directory
    grep: /etc/apache2/mods-enabled/php4.conf: No such file or directory
    grep: /etc/apache2/mods-enabled/php4.load: No such file or directory
    grep: /etc/apache2/mods-enabled/php4.conf: No such file or directory
    apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
     failed!
    
    these are the files that I was telling you that are gone for some reason. I can not figure it out. can I do a debian perfect setup onanother pc and get the files from it and replace the ones that have the red marks on them? I have to get my site back online. Boy I need a backup plan in case this ever happens again. I thank you for the info.
     
  11. giganet

    giganet New Member

    Can you open '/etc/apache2/apache2.conf' and see what you have on line '185'?
     
  12. cruz

    cruz New Member

    Yes I was thinking of that. Here is the line.

    Include /etc/apache2/mods-enabled/*.load

    It wants to load the files that are RED marked. the files that I talked above are in this file. It can not load them because they are not there. Well they are, but it tells me that they are missing when I try to open them. DOse anyone on here know how to replace the two files that are missing? Thanks for all the help.
     
  13. giganet

    giganet New Member

    So lines 184, 185, and 186 are populated with
    # Include module configuration:
    Include /etc/apache2/mods-enabled/*.load
    Include /etc/apache2/mods-enabled/*.conf

    You must have quite a few special directives at the top of your apache2.conf file?
    The above lines in my server are at lines 115, 116, and 117


    Move to 'etc/apache2/mods-available/' and run 'cat php5.conf'- the results should look like this:
    Code:
    <IfModule mod_php5.c>
    #  AddType application/x-httpd-php .php .phtml .php3
    #  AddType application/x-httpd-php-source .phps
    </IfModule>
    
    Now run 'cat php5.load' which should look like the following:
    Code:
    LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
    
     
  14. giganet

    giganet New Member

    OOPs, dual post- please ignore
     
  15. cruz

    cruz New Member

    Yes it came out just like yours did. What dose that mean? The ones in question are the php4, not php5. I do not know why it needs to load php4 when I have php5 installed. You wuld think that it would load the php5 files.

    take a look at this

    server1:~# httpd -t
    httpd: Syntax error on line 185 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
    When I ran http -t I get this. HELP ANYONE THAT KNOWS HOW TO FIX THIS :{
     
    Last edited: Oct 20, 2007
  16. giganet

    giganet New Member

    I can only suspect something within'/etc/apache2/apache2.conf' is wrong to be calling PHP4?

    Hey, did some digging right here at HTF and found a very intersting article which just might help get you back on track- take a crack at this and be sure to follow the instructions to the letter and it seems you would be able to re-store server function within an hour, give or take...
    http://www.howtoforge.com/apache2_with_php5_and_php4

    Give it a shot, it's worth the try!
     
  17. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/apache2/mods-enabled
    and
    Code:
    ls -la /etc/apache2/mods-available
    ?
     
  18. cruz

    cruz New Member

    output

    HTML:
    server1:~# ls -la /etc/apache2/mods-enabled
    total 8
    drwxr-xr-x 2 root root 4096 2007-10-18 15:42 .
    drwxr-xr-x 8 root root 4096 2007-10-04 15:05 ..
    lrwxrwxrwx 1 root root   28 2007-10-04 13:59 alias.load -> ../mods-available/ali                                             as.load
    lrwxrwxrwx 1 root root   33 2007-10-04 13:59 auth_basic.load -> ../mods-availabl                                             e/auth_basic.load
    lrwxrwxrwx 1 root root   33 2007-10-04 13:59 authn_file.load -> ../mods-availabl                                             e/authn_file.load
    lrwxrwxrwx 1 root root   36 2007-10-04 13:59 authz_default.load -> ../mods-avail                                             able/authz_default.load
    lrwxrwxrwx 1 root root   38 2007-10-04 13:59 authz_groupfile.load -> ../mods-ava                                             ilable/authz_groupfile.load
    lrwxrwxrwx 1 root root   33 2007-10-04 13:59 authz_host.load -> ../mods-availabl                                             e/authz_host.load
    lrwxrwxrwx 1 root root   33 2007-10-04 13:59 authz_user.load -> ../mods-availabl                                             e/authz_user.load
    lrwxrwxrwx 1 root root   32 2007-10-04 13:59 autoindex.load -> ../mods-available                                             /autoindex.load
    lrwxrwxrwx 1 root root   26 2007-10-04 13:59 cgi.load -> ../mods-available/cgi.l                                             oad
    lrwxrwxrwx 1 root root   26 2007-10-04 13:59 dir.conf -> ../mods-available/dir.c                                             onf
    lrwxrwxrwx 1 root root   26 2007-10-04 13:59 dir.load -> ../mods-available/dir.l                                             oad
    lrwxrwxrwx 1 root root   26 2007-10-04 13:59 env.load -> ../mods-available/env.l                                             oad
    lrwxrwxrwx 1 root root   30 2007-10-04 14:03 include.load -> ../mods-available/i                                             nclude.load
    lrwxrwxrwx 1 root root   27 2007-10-04 13:59 mime.load -> ../mods-available/mime                                             .load
    lrwxrwxrwx 1 root root   34 2007-10-04 13:59 negotiation.load -> ../mods-availab                                             le/negotiation.load
    lrwxrwxrwx 1 root root   37 2007-10-18 15:42 php4.conf -> /etc/apache2/mods-avai                                             lable/php4.conf
    lrwxrwxrwx 1 root root   37 2007-10-18 15:42 php4.load -> /etc/apache2/mods-avai                                             lable/php4.load
    lrwxrwxrwx 1 root root   27 2007-10-04 14:01 php5.conf -> ../mods-available/php5                                             .conf
    lrwxrwxrwx 1 root root   27 2007-10-04 14:01 php5.load -> ../mods-available/php5                                             .load
    lrwxrwxrwx 1 root root   30 2007-10-04 14:03 rewrite.load -> ../mods-available/r                                             ewrite.load
    lrwxrwxrwx 1 root root   31 2007-10-04 13:59 setenvif.load -> ../mods-available/                                             setenvif.load
    lrwxrwxrwx 1 root root   26 2007-10-04 14:03 ssl.conf -> ../mods-available/ssl.c                                             onf
    lrwxrwxrwx 1 root root   26 2007-10-04 14:03 ssl.load -> ../mods-available/ssl.l                                             oad
    lrwxrwxrwx 1 root root   29 2007-10-04 13:59 status.load -> ../mods-available/st                                             atus.load
    lrwxrwxrwx 1 root root   29 2007-10-04 14:03 suexec.load -> ../mods-available/su                                             exec.load
    
    That is ls -la /etc/apache2/mods-enabled

    HTML:
    total 320
    drwxr-xr-x 2 root root 4096 2007-10-04 14:04 .
    drwxr-xr-x 8 root root 4096 2007-10-20 17:29 ..
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 actions.load
    -rw-r--r-- 1 root root   62 2007-06-17 13:12 alias.load
    -rw-r--r-- 1 root root   60 2007-06-17 13:12 asis.load
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 auth_basic.load
    -rw-r--r-- 1 root root   74 2007-06-17 13:12 auth_digest.load
    -rw-r--r-- 1 root root   74 2007-06-17 13:12 authn_alias.load
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 authn_anon.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 authn_dbd.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 authn_dbm.load
    -rw-r--r-- 1 root root   78 2007-06-17 13:12 authn_default.load
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 authn_file.load
    -rw-r--r-- 1 root root   90 2007-06-17 13:12 authnz_ldap.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 authz_dbm.load
    -rw-r--r-- 1 root root   78 2007-06-17 13:12 authz_default.load
    -rw-r--r-- 1 root root   82 2007-06-17 13:12 authz_groupfile.load
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 authz_host.load
    -rw-r--r-- 1 root root   74 2007-06-17 13:12 authz_owner.load
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 authz_user.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 autoindex.load
    -rw-r--r-- 1 root root   62 2007-06-17 13:12 cache.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 cern_meta.load
    -rw-r--r-- 1 root root   68 2007-06-17 13:12 cgid.conf
    -rw-r--r-- 1 root root   60 2007-06-17 13:12 cgid.load
    -rw-r--r-- 1 root root   58 2007-06-17 13:12 cgi.load
    -rw-r--r-- 1 root root   76 2007-06-17 13:12 charset_lite.load
    -rw-r--r-- 1 root root   36 2007-06-17 13:12 dav_fs.conf
    -rw-r--r-- 1 root root   79 2007-06-17 13:12 dav_fs.load
    -rw-r--r-- 1 root root   58 2007-06-17 13:12 dav.load
    -rw-r--r-- 1 root root   68 2007-06-17 13:12 dav_lock.load
    -rw-r--r-- 1 root root   58 2007-06-17 13:12 dbd.load
    -rw-r--r-- 1 root root  107 2007-06-17 13:12 deflate.conf
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 deflate.load
    -rw-r--r-- 1 root root  145 2007-10-04 14:02 dir.conf
    -rw-r--r-- 1 root root   58 2007-06-17 13:12 dir.load
    -rw-r--r-- 1 root root  554 2007-06-17 13:12 disk_cache.conf
    -rw-r--r-- 1 root root   89 2007-06-17 13:12 disk_cache.load
    -rw-r--r-- 1 root root   64 2007-06-17 13:12 dump_io.load
    -rw-r--r-- 1 root root   58 2007-06-17 13:12 env.load
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 expires.load
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 ext_filter.load
    -rw-r--r-- 1 root root   89 2007-06-17 13:12 file_cache.load
    -rw-r--r-- 1 root root   64 2007-06-17 13:12 filter.load
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 headers.load
    -rw-r--r-- 1 root root   62 2007-06-17 13:12 ident.load
    -rw-r--r-- 1 root root   68 2007-06-17 13:12 imagemap.load
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 include.load
    -rw-r--r-- 1 root root   60 2007-06-17 13:12 info.load
    -rw-r--r-- 1 root root   60 2007-06-17 13:12 ldap.load
    -rw-r--r-- 1 root root   76 2007-06-17 13:12 log_forensic.load
    -rw-r--r-- 1 root root  185 2007-06-17 13:12 mem_cache.conf
    -rw-r--r-- 1 root root   87 2007-06-17 13:12 mem_cache.load
    -rw-r--r-- 1 root root   60 2007-06-17 13:12 mime.load
    -rw-r--r-- 1 root root   89 2007-06-17 13:12 mime_magic.conf
    -rw-r--r-- 1 root root   72 2007-06-17 13:12 mime_magic.load
    -rw-r--r-- 1 root root   74 2007-06-17 13:12 negotiation.load
    -rw-r--r-- 1 root root  135 2007-10-04 14:04 php5.conf
    -rw-r--r-- 1 root root   59 2007-07-02 14:46 php5.load
    -rw-r--r-- 1 root root   87 2007-06-17 13:12 proxy_ajp.load
    -rw-r--r-- 1 root root  103 2007-06-17 13:12 proxy_balancer.load
    -rw-r--r-- 1 root root  589 2007-06-17 13:12 proxy.conf
    -rw-r--r-- 1 root root   95 2007-06-17 13:12 proxy_connect.load
    -rw-r--r-- 1 root root   87 2007-06-17 13:12 proxy_ftp.load
    -rw-r--r-- 1 root root   89 2007-06-17 13:12 proxy_http.load
    -rw-r--r-- 1 root root   62 2007-06-17 13:12 proxy.load
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 rewrite.load
    -rw-r--r-- 1 root root   68 2007-06-17 13:12 setenvif.load
    -rw-r--r-- 1 root root  298 2007-06-17 13:12 sick-hack-to-update-modules
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 speling.load
    -rw-r--r-- 1 root root 1781 2007-06-17 13:12 ssl.conf
    -rw-r--r-- 1 root root   58 2007-06-17 13:12 ssl.load
    -rw-r--r-- 1 root root   64 2007-06-17 13:12 status.load
    -rw-r--r-- 1 root root   64 2007-06-17 13:12 suexec.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 unique_id.load
    -rw-r--r-- 1 root root  293 2007-06-17 13:12 userdir.conf
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 userdir.load
    -rw-r--r-- 1 root root   70 2007-06-17 13:12 usertrack.load
    -rw-r--r-- 1 root root   66 2007-06-17 13:12 version.load
    -rw-r--r-- 1 root root   74 2007-06-17 13:12 vhost_alias.load
    
    ls -la /etc/apache2/mods-available
    I can not see php4 in here, but there are two files on the server that have red marks on them I can not remove them . I tried to move them off the server so that the php5 files may load. Man will I ever lear this stuff? thanks for all the help. I created another debian etch server. I was reading on how to backing up everything onto it so I can get online again. I don't want to get stuck like this again. I made the 2nd server with the same domain, but used server2. my main server is server1. Is that how it is to be setup?
     
  19. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You have PHP5 installed, not PHP4. Do you need PHP5 or PHP4?
     
  20. cruz

    cruz New Member

    server install

    I setup the server with The Perfect Setup - Debian Etch (Debian 4.0). the error I am getting is comming from two files that are php4. I think I am running 5. It dose not note that it is php5 on the install page for my install. I guess I need 5. It was working great affter the install.

    these are the ones that are trying to load.
    lrwxrwxrwx 1 root root 37 2007-10-18 15:42 php4.conf -> /etc/apache2/mods-avai lable/php4.conf
    lrwxrwxrwx 1 root root 37 2007-10-18 15:42 php4.load -> /etc/apache2/mods-avai
     
    Last edited: Oct 21, 2007

Share This Page