Page 1 of 1

apache startet, php läuft nicht

Posted: 2003-11-26 19:29
by dirkv99
hallo zusammen!

ich würde mich freuen, wenn ihr mir bei folgenden problem helfen könnt:

ich kann zwar apache starten, jedoch wird php nicht geparst. html-files können ganz normal aufgerufen werden.

die error_log wirft folgendes aus:

[Wed Nov 26 19:14:13 2003] [notice] Apache/1.3.27 (Unix) (Red-Hat/Linux) configured -- resuming normal operations
[Wed Nov 26 19:14:13 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Nov 26 19:14:13 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
Processing config directory: /etc/appliance/apacheconf
Processing config file: /etc/appliance/apacheconf/apache
Processing config file: /etc/appliance/apacheconf/apacheconf
Processing config directory: /etc/httpd/conf/virtual
Processing config file: /etc/httpd/conf/virtual/site1
Processing config directory: /etc/httpd/conf/site1
Processing config file: /etc/httpd/conf/site1/cgi
Processing config file: /etc/httpd/conf/site1/sqmail
Processing config file: /etc/httpd/conf/site1/ssi
Processing config file: /etc/httpd/conf/site1/weblogs
.
.
.
Processing config file: /etc/httpd/conf/virtual/site6
Processing config directory: /etc/httpd/conf/site6
Processing config file: /etc/httpd/conf/site6/cgi
Processing config file: /etc/httpd/conf/site6/sqmail
Processing config file: /etc/httpd/conf/site6/ssi
Processing config file: /etc/httpd/conf/site6/weblogs
[Wed Nov 26 19:15:47 2003] [crit] (98)Address already in use: make_sock: could not bind to port 80


in messages (var/log/) finde ich auch folgenden eintrag, der während eines reboots erfolgt ist:

Nov 26 19:10:29 s15138647 webppliance: ocwhttpd shutdown failed


hat jemand eine idee? ich dachte auch schon an große logfile, aber die haben eine ganz normale größe. ist bind in irgendeiner form ein problem?

danke,
dirk

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:00
by blackdrum23
Hy,
gehen allgemein keine *.php Dateien oder nur eine index.php nicht

beim ersten wäre das Modul nicht geladen oder der AddType stimmt nicht.
Modul

Code: Select all

<IfDefine HAVE_PHP>
LoadModule php_module         modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module        modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module        modules/libphp4.so
</IfDefine>
AddType

Code: Select all

<IfModule mod_php3.c>
        AddType application/x-httpd-php3 .php3
        AddType application/x-httpd-php3-source .phps
    </IfModule>
    #
    # And for PHP 4.x, use:
    #
    <IfModule mod_php4.c>
        AddType application/x-httpd-php .php .php4 .php3 .phtml
        AddType application/x-httpd-php-source .phps
    </IfModule>

    #
    # For PHP/FI (PHP2), use:
    #
    <IfModule mod_php.c>
        AddType application/x-httpd-php .phtml
    </IfModule>

beim anderen ist der Directory Index nicht gesetzt

Code: Select all

DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:21
by dirkv99
hallo blackdrum!

danke für deine antwort.
php und php3 sind in der httpd.conf auskommentiert.

#LoadModule php_module modules/mod_php.so
#LoadModule php3_module modules/libphp3.so
<IfDefine vwh_php4_module>
LoadModule php4_module modules/libphp4.so
</IfDefine>


# Additional Modules, not included by default
#AddModule mod_php.c
#AddModule mod_php3.c
<IfDefine vwh_php4_module>
AddModule mod_php4.c
</IfDefine>

allerdings lief der server mit der gleichen konfiguration wochenlang einwandfrei. bei dem versuch, den server gestern neu zu starten, blieben unter anderem folgende einträge (boot.log):

httpd: httpd startup failed
webppliance: ocwhttpd shutdown failed
named: named shutdown failed

httpd: httpd startup failed


seit diesem zeitpunkt läuft php nicht mehr (quelltext wird angezeigt).

hast du noch eine idee?

gruß,
dirk

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:26
by blackdrum23
Hast du irgendwas geändert,
habe gesehen das du RedHat benutzt.
Evtl up2date ausgeführt.
Das hat manchmal die Angewohnheit eine neue config zu laden,
es sollte dann aber die alte noch vorhanden sein.

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:30
by dirkv99
nein, ich habe eigentlich überhaupt nichts geändert. gestern war der server allerdings sehr langsam und ich habe kein problem gefunden. also habe ich einen reboot gemacht, was auch zum erfolg geführt hat. der server lief wieder einwandfrei.

heute morgen musste ich nun die genannten probleme feststellen.

vor etwa vier wochen hatte ich schon das gleiche problem. damals hatte ich vemutet, es lag an großen log-files. auf mysteriöse weise lief der server später wieder, ohne dass ich das direkt mit dem löschen der logfiles in verbindung hätte bringen können.

wo kann ich noch nach fehlern suchen? (habe noch nicht viel erfahrung und den root nur notgedrungen genommen, da java bei managed servern nicht unterstützt wird)

gruß,
dirk

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:39
by blackdrum23
Hy,
für was ist den das webppliance sagt mir leider gar nichts

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:48
by dirkv99
um ehrlich zu sein, mir sagt es auch nichts... ich hoffe/denke, dass es nicht so viel damit zu tun hat...

Re: apache startet, php läuft nicht

Posted: 2003-11-26 20:55
by blackdrum23
Also habe das webppliance gerade gefunden.
Hast du deinen Server bei Schlund oder??
Mt dem machst du die Config für Domains und Mails, ich glaube das da irgenwo dein Fehler liegt.

Leider kann ich dir da nicht weiterhelfen, ich mache meine Config immer an der Console :cry:

Re: apache startet, php läuft nicht

Posted: 2003-11-26 21:13
by superuser1
Hi...

also was mich an dem Log schonmal stört:

[Wed Nov 26 19:15:47 2003] [crit] (98)Address already in use: make_sock: could not bind to port 80

Läuft da noch irgendwas, was na nicht hingehört?

Du hast suEXEC laufen und benutzt PHP als Modul? Hast du vielleicht noch eine CGI-Version von PHP auf dem Server laufen?

ansonsten mal die üblichen Tipps:
--------------------------------------
- alle Log-Files checken (Inhalt, Grösse etc. / läuft logrotate korrekt ?)
- mal ein 'top' oder 'ps -a' machen und nach laufenden prozessen schauen (gegebenenfalls abschiessen 'kill [pid]')
- Apache-Config mit den aus den FAQs oder Anleitungen vergleichen, nach möglichen Problemstellen durchsuchen

- evtl. Neuinstallation des Apachen/PHP ?!?

- schonmal im Ensim-Forum (http://www.ensim.com) nachgeschaut, bzw. gegoogelt ?

Re: apache startet, php läuft nicht

Posted: 2003-11-26 21:14
by dirkv99
ja, du hast recht. es ist ein schlund-server auf dem ensim webappliance läuft (das fiel mir auch gerade ein :roll: ). möglichweise liegt da wirklich der fehler.
trotzdem schon mal vielen dank für deine hilfe!
gruß,
dirk

Re: apache startet, php läuft nicht

Posted: 2003-11-26 21:27
by dirkv99
hallo,

ich denke auch, dass der eintrag

Code: Select all

(98)Address already in use: make_sock: could not bind to port 80 
das problem darstellt. ich habe auch schon alle httpd-prozesse gekillt (killall -9 httpd) und apache danach neu gestartet (etc/init.d/httpd restart).

suEXEC ist wohl von haus aus bei schlund installiert, um als reseller auftreten zu können. cgis sollen damit wohl nicht mit webserver-rechten laufen. (ich brauche es aber tatsächlich nicht - wie werde ich es los?)

kann man php noch auf andere weise nutzen? 8O php4 wird mit

Code: Select all

LoadModule php4_module modules/libphp4.so 
geladen.
logrotate läuft übrigens noch nicht korrekt, darum wollte ich mich noch kümmern. da die logfiles im moment (nach dem löschen) sehr klein sind, ist es im moment vielleicht nicht nötig (oder doch?).

ps -a liefert nur

Code: Select all

 1401 pts/0    00:00:00 ps
top liefert folgendes:

Code: Select all

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 1403 root      15   0  1092 1092   828 R     0.7  0.1   0:00 top
 1295 adrev     15   0 47824  46M  2748 S     0.3  4.6   0:00 java
 1277 adrev     15   0 47824  46M  2748 S     0.1  4.6   0:00 java
 1297 mysql     25  10  8616 8616  2232 S N   0.1  0.8   0:00 mysqld
    1 root      15   0   524  524   456 S     0.0  0.0   0:06 init
    2 root      0K   0     0    0     0 SW    0.0  0.0   0:00 migration_CPU0
    3 root      15   0     0    0     0 SW    0.0  0.0   0:00 keventd
    4 root      34  19     0    0     0 SWN   0.0  0.0   0:00 ksoftirqd_CPU0
    5 root      15   0     0    0     0 SW    0.0  0.0   0:00 kswapd
    6 root      15   0     0    0     0 SW    0.0  0.0   0:00 bdflush
    7 root      15   0     0    0     0 SW    0.0  0.0   0:00 kupdated
    8 root      25   0     0    0     0 SW    0.0  0.0   0:00 scsi_eh_0
    9 root      15   0     0    0     0 SW    0.0  0.0   0:00 kjournald
  122 root      15   0     0    0     0 SW    0.0  0.0   0:00 kjournald
  411 root      20   0   208  208   172 S     0.0  0.0   0:00 dhcpcd
  520 ntp       15   0  1920 1920  1700 S     0.0  0.1   0:00 ntpd
  633 root      15   0   592  592   488 S     0.0  0.0   0:00 syslogd
  651 root      15   0  1164 1164   444 S     0.0  0.1   0:00 klogd
  691 root      16   0   852  852   668 S     0.0  0.0   0:00 3dmd
  692 root      15   0   852  852   668 S     0.0  0.0   0:00 3dmd
da ich noch anfänger bin, schrecke ich etwas vor einer neuinstallation von php oder apache zurück. ich have es einmal für php mit einem vorgefertigten script probiert, was auch gut geklappt hat.

(bitte entschuldigt anfänger-fehler) 8)

dirk[/code]

Re: apache startet, php läuft nicht

Posted: 2003-11-26 21:40
by superuser1
Hm...

was spuckt denn ein 'netstat -plt' (:80 Problem) bei dir aus?

PHP sollte eigentlich, wenn als CGI, über suEXEC oder als Modulversion über suPHP (siehe auch FAQs) laufen.

In den Ensim-Foren findest du ähnliche Probleme (forum.ensim.com), schau mal da nach.

was bekommst du denn für Meldungen bei:

ps -lax

/etc/rc.d/init.d/webppliance start
/etc/rc.d/init.d/webppliance stop
/etc/rc.d/init.d/webppliance restart

/etc/rc.d/init.d/httpd restart

Re: apache startet, php läuft nicht

Posted: 2003-11-26 21:50
by dirkv99
netstat -plt bringt folgendes:

Code: Select all

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 *:imaps                 *:*                     LISTEN      813/xinetd          
tcp        0      0 *:pop3s                 *:*                     LISTEN      813/xinetd          
tcp        0      0 *:mysql                 *:*                     LISTEN      858/mysqld          
tcp        0      0 *:874                   *:*                     LISTEN      691/3dmd            
tcp        0      0 *:pop3                  *:*                     LISTEN      813/xinetd          
tcp        0      0 *:imap                  *:*                     LISTEN      813/xinetd          
tcp        0      0 *:http                  *:*                     LISTEN      1465/httpd          
tcp        0      0 *:19635                 *:*                     LISTEN      778/sshd            
tcp        0      0 *:ftp                   *:*                     LISTEN      1050/proftpd (accep 
tcp        0      0 s15138647.rootma:domain *:*                     LISTEN      735/named           
tcp        0      0 localhost.locald:domain *:*                     LISTEN      735/named           
tcp        0      0 *:19638                 *:*                     LISTEN      1121/ocwhttpd       
tcp        0      0 *:ssh                   *:*                     LISTEN      757/sshd            
tcp        0      0 s15138647.rootmast:8888 *:*                     LISTEN      1254/java           
tcp        0      0 *:socks                 *:*                     LISTEN      691/3dmd            
tcp        0      0 *:smtp                  *:*                     LISTEN      898/sendmail: accep 
tcp        0      0 localhost.localdom:rndc *:*                     LISTEN      735/named           
/etc/rc.d/init.d/webppliance ...

Code: Select all

[root@s15138647 /]# /etc/rc.d/init.d/webppliance start 
Starting webppliance:                                      [  OK  ]
[root@s15138647 /]# /etc/rc.d/init.d/webppliance stop 
Shutting down webppliance:                                 [  OK  ]
[root@s15138647 /]# /etc/rc.d/init.d/webppliance restart
Shutting down webppliance:                                 [  OK  ]

...und!!! du bist ein held!!!!

das dritte war der fehler!!!!

es war keine httpd_app.conf vorhanden!!! wieso das denn?!?!?

ich danke dir!!


was hätte ich ohne dieses forum getan!!! danke! dirk

Re: apache startet, php läuft nicht

Posted: 2003-11-26 21:58
by superuser1
bitte bitte ;)

dazu noch folgendes:

http://www.astrahosting.com/ensim-upgrade/Page0036.htm

:roll:

Re: apache startet, php läuft nicht

Posted: 2003-11-27 10:19
by cy
Schade das ich das nicht vorher gesehen habe, habe nämlich das gleiche System und auch Ensim und genau das gleiche Problem vor ein paar Wochen. :)
Bei mir was das Logfile vom JK_Modul zu groß, und deswegen ist Apache nicht mehr gestartet nach nem Reboot. Ich hatte allerdings Apache per Hand gestartet und vergessen die Direktiven zu den Modulen anzugeben.
cheers
Cy