Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 php
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
klaus_harrer
n00b
n00b


Joined: 24 May 2004
Posts: 60

PostPosted: Sun Sep 25, 2005 4:40 pm    Post subject: Apache2 php Reply with quote

Hallo

Seitdem ich Apache2 geupdatet habe werden PHP Seiten nicht mehr geparst.

Musste erst einmal /etc/apache2/conf/apache2.conf löschen um apache2 zu starten(läuft nun von /etc/apache2/http.conf).

Was ich noch herausbekommen habe ist das VHOST läuft "APACHE2_OPTS="-D DEFAULT_VHOST".

Wäre schön wenn mir jemand weiterhelfen könnte.

MfG
Klaus
Back to top
View user's profile Send private message
tango
Apprentice
Apprentice


Joined: 24 Jan 2005
Posts: 251

PostPosted: Sun Sep 25, 2005 5:18 pm    Post subject: Reply with quote

Im Wiki stehen dazu viele Beiträge..

In /etc/apache2/httpd.conf muss PHP geladen werden und ebenso /etc/conf.d/apache2

Danach ein /etc/init.d/apache2 restart

Und schauen ob es funktioniert, ggf. Logfiles posten...

tango
Back to top
View user's profile Send private message
Hilefoks
l33t
l33t


Joined: 29 Jan 2003
Posts: 849
Location: Emden / Deutschland

PostPosted: Sun Sep 25, 2005 5:36 pm    Post subject: Re: Apache2 php Reply with quote

Moin,
klaus_harrer wrote:
Was ich noch herausbekommen habe ist das VHOST läuft "APACHE2_OPTS="-D DEFAULT_VHOST".

dahinter fehlt dann nur noch ein -D PHP (bzw. -D PHP5)

Mfg Hilefoks
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2953
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Sun Sep 25, 2005 5:49 pm    Post subject: Reply with quote

siehe auch https://forums.gentoo.org/viewtopic-p-2742624.html#2742624
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
klaus_harrer
n00b
n00b


Joined: 24 May 2004
Posts: 60

PostPosted: Thu Sep 29, 2005 12:14 pm    Post subject: Reply with quote

Hallo

Quote:

In /etc/apache2/httpd.conf muss PHP geladen werden und ebenso /etc/conf.d/apache2


Das ist doch eigentlich nicht ganz richtig, da ja mit "Include /etc/apache2/modules.d/*.conf" alle module geladen werden die im Verzeichnis "/etc/apache2/modules.d/" stehen.

Ich habe vhost entfernt "#Include /etc/apache2/vhosts.d/*.conf".

Leider werden die PHP Dateien immer noch nicht geparst.

Hier meine "70_mod_php.conf".

Code:

# vim: ft=apache sw=4 ts=4
<IfDefine PHP4>

        # Load the module first
        <IfModule !sapi_apache2.c>
                LoadModule php4_module    modules/libphp4.so
        </IfModule>

        # Set it to handle the files
        <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
                AddType application/x-httpd-php .phtml
                AddType application/x-httpd-php .php3
                AddType application/x-httpd-php .php4
                AddType application/x-httpd-php-source .phps
        </IfModule>

        # post-adding DirectoryIndex'es
        AddDirectoryIndex index.php index.php3 index.php4 index.phps index.phtml

        # Fix some bugs
        <Files *.php>
                # keep this the same size as post_max_size in php.ini
                # LimitRequestBody 8388608
        </Files>
        <Files *.php3>
                # keep this the same size as post_max_size in php.ini
                # LimitRequestBody 8388608
        </Files>
        <Files *.php4>
                # keep this the same size as post_max_size in php.ini
                # LimitRequestBody 8388608
        </Files>
        <Files *.phps>
                # keep this the same size as post_max_size in php.ini
                # LimitRequestBody 8388608
        </Files>
        <Files *.phtml>
                # keep this the same size as post_max_size in php.ini
                # LimitRequestBody 8388608
        </Files>

</IfDefine>


Und hier eine Fehlermeldung die ich nicht verstehe(/var/log/apache2/error_log):

Code:
[Thu Sep 29 13:07:26 2005] [error] [client 127.0.0.1] File does not exist: /usr/htdocs
[Thu Sep 29 13:48:31 2005] [error] [client 127.0.0.1] File does not exist: /usr/htdocs
[Thu Sep 29 13:48:31 2005] [error] [client 127.0.0.1] File does not exist: /usr/htdocs
[Thu Sep 29 13:51:50 2005] [notice] caught SIGTERM, shutting down
[Thu Sep 29 13:51:54 2005] [notice] Digest: generating secret for digest authentication ...
[Thu Sep 29 13:51:54 2005] [notice] Digest: done
[Thu Sep 29 13:51:55 2005] [notice] Apache configured -- resuming normal operations
[Thu Sep 29 13:52:01 2005] [error] [client 127.0.0.1] File does not exist: /usr/htdocs


Ich habe schon in allen *.conf Dateien nach den String "/usr/htdocs" suchen lassen und es wurde nichts gefunden

MfG
Klaus
Back to top
View user's profile Send private message
himpierre
l33t
l33t


Joined: 31 Aug 2002
Posts: 867
Location: Berlin

PostPosted: Thu Sep 29, 2005 12:35 pm    Post subject: Reply with quote

Naja jedenfalls ist da irgendwas schief. Sichere doch mal Deine ConfigDateien und unmerge apache und mod_php, lösche /etc/apache2 und /usr/lib/apache2 und rödele apache2 und mod_php neu auf die Kiste. Das würde ich jedenfalls mal machen.

cheers
t.
Back to top
View user's profile Send private message
viper26
Tux's lil' helper
Tux's lil' helper


Joined: 24 Sep 2003
Posts: 132
Location: Brilon

PostPosted: Sat Oct 01, 2005 6:43 am    Post subject: Reply with quote

hallo,

dein fehler liegt so wie es ausschaut darin, das er die php file in /usr/htdocs/ sucht, oder hast du dein document verzeichnis auf /usr/htdocs gelegt?

hatte das gleiche problem wenn ich apache mit default_host gestatet hab, da konnte ich meine vhost nicht aus mysql ziehen, hab einfach default_host weggelassen,

1. brauch ich keine default host
2. zeihst er sich meine vhost aus mysql.

hab leider nicht rausbekommen wo apache sich den pfad /usr/htdocs herzieht.

hoffe habe etwas helfen können.

gruss

viper
Back to top
View user's profile Send private message
eXe
n00b
n00b


Joined: 28 Nov 2004
Posts: 11

PostPosted: Sat Oct 01, 2005 8:02 am    Post subject: Reply with quote

Hi,

ich hab auch so ein ähnliches Problem mit PHP4 und Apache2. Es werden zwar bestimmte Befehle von PHP geparst nur nicht meine eigens erzeugten Scripte (eig. Vars). Es geht z.b. ein ganz normales <? echo ...; ?> oder auch phpinfo();.

Nur sowas wie
Code:
<a href="?module=<? echo $module; ?>&expand=1&all=<? echo $all; ?>">


wird nicht geparst, obwohl es auf meinem Webspace ohne Probleme funktioniert.
Back to top
View user's profile Send private message
tam
Guru
Guru


Joined: 04 Mar 2003
Posts: 569

PostPosted: Sat Oct 01, 2005 7:40 pm    Post subject: Reply with quote

eXe wrote:
wird nicht geparst, obwohl es auf meinem Webspace ohne Probleme funktioniert.

Könnte an register_globals liegen.
_________________
http://tam.belchenstuermer.de/
Back to top
View user's profile Send private message
eXe
n00b
n00b


Joined: 28 Nov 2004
Posts: 11

PostPosted: Sat Oct 01, 2005 10:34 pm    Post subject: Reply with quote

Japp, das wars wohl auch. Nun gehts ohne Probleme 8)
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Sun Oct 02, 2005 8:07 am    Post subject: Reply with quote

klaus_harrer wrote:
Das ist doch eigentlich nicht ganz richtig, da ja mit "Include /etc/apache2/modules.d/*.conf" alle module geladen werden die im Verzeichnis "/etc/apache2/modules.d/" stehen.

Das sagt garnichts, da..

Code:
<IfDefine PHP4>
...
</IfDefine>


diese Abschnitte nur aktiviert und werden, wenn in der /etc/conf.d/apache2 der Parameter -D PHP4 gesetzt ist.
Das müsste dann z.B. so aussehen:

/etc/conf.d/apache2 wrote:
...
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP4"
...


klaus_harrer wrote:
Und hier eine Fehlermeldung die ich nicht verstehe(/var/log/apache2/error_log):

Code:
[Thu Sep 29 13:07:26 2005] [error] [client 127.0.0.1] File does not exist: /usr/htdocs

Da ist was ganz falsch. /usr/htdocs/ wirst du so wohl auch als String in den Konfigurationsdateien nicht finden. - Wie genau bist du denn mit dem Updaten/Anpassen der Konfigurationen vorgegangen? Einfach die alte apache.conf gelöscht? Du benutzt keine vhosts, sagtest du?

Sicherlich wäre es am besten, wenn du die Konfigurationsdateien (zunächst /etc/conf.d/apache2, /etc/apache2/httpd.conf, /etc/apache2/vhosts.d/*) irgendwo bereitstellen könntest, damit wir uns ein besseres Bild davon machen können.
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
Heinzelmännchen
Apprentice
Apprentice


Joined: 11 Mar 2004
Posts: 179
Location: MV, Germany

PostPosted: Thu Oct 06, 2005 11:56 am    Post subject: Reply with quote

Hi zusammen,

ich habe so das ähnlich Problem und kann mir derzeitig noch keinen Reim drauf machen. Ich habe mir die neuen Version vom Apache2 und PHP 4.4.0-r3 besorgt.

Als die beiden fertig kompiliert waren, habe ich die /etc/conf.d/apache2 bearbeitet und die Zeile von APACHE2_OPTS abgeändert.
[edit]
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP4 -D PERL"

Danach habe ich den Apache über /etc/init.d/apache2 gestartet. Doch Sobald ich eine php Datei über einen Browser aufrufe, bekomme ich diese als Download angeboten.

Mittlerweile habe ich jetzt schon PERL 1.99 zum System hinzugefügt und getestet, doch hier ergibt sich kein Problem. Dies funktioniert prima über mod_perl.[/edit]

In /var/log/apache2 befindet sich nur folgender Inhalt:
Code:
[Thu Oct 06 13:33:32 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Thu Oct 06 13:33:33 2005] [notice] Digest: generating secret for digest authentication ...
[Thu Oct 06 13:33:33 2005] [notice] Digest: done
[Thu Oct 06 13:33:33 2005] [notice] Apache configured -- resuming normal operations

Die /etc/apache2/modules.d/70_mod_php.conf schaut wie folgt aus:
Code:
# vim: ft=apache sw=4 ts=4
<IfDefine PHP4>

        # Load the module first
        <IfModule !sapi_apache2.c>
                LoadModule php4_module    modules/libphp4.so
        </IfModule>

        # Set it to handle the files
        <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
                AddType application/x-httpd-php .phtml
                AddType application/x-httpd-php .php3
                AddType application/x-httpd-php .php4
                AddType application/x-httpd-php-source .phps
        </IfModule>

        AddDirectoryIndex index.php index.phtml
</IfDefine>



Die libphp4.so befindet sich im folgenden Verzeichnis:
Code:
/usr/lib/apache2/modules/libphp4.so


Die Standardseite vom frisch aufgesetzen Apache ist aber zusehen. Nur PHP funktioniert derzeit nicht.

Komme da auch nicht so wirklich weiter mit.

MfG
Heinzelmännchen
_________________
Gute Dinge, will Weile haben!
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Thu Oct 06, 2005 3:25 pm    Post subject: Reply with quote

Hast du die httpd.conf denn so belassen, wie sie vom Update kam? Wird denn /etc/apache2/modules.d/*.conf in der httpd.conf inkludiert (s.u.)?

Code:
...
Include /etc/apache2/modules.d/*.conf
...

_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
Heinzelmännchen
Apprentice
Apprentice


Joined: 11 Mar 2004
Posts: 179
Location: MV, Germany

PostPosted: Thu Oct 06, 2005 6:48 pm    Post subject: Reply with quote

Hallo,

nachdem ich nochmal zurück auf mod_php-4.4.0-r1 gegangen bin und dann wieder auf 4.4.0-r3 funktioniert das ganze auch wieder.

Manchmal steckt man eben nicht drin.

MfG
Heinzelmännchen
_________________
Gute Dinge, will Weile haben!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum