Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LAMPP aber es kommt nur Speichern Unter
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
computerfrau
n00b
n00b


Joined: 02 Mar 2023
Posts: 20
Location: Kiel

PostPosted: Sun May 28, 2023 8:58 am    Post subject: LAMPP aber es kommt nur Speichern Unter Reply with quote

Halli, ich möchte PHP Dateien bearbeiten und ausführen. Daher hab ich Apache installiert und konfiguriert. Er ist erfolgreich gestartet. Ich bin in der Gruppe Apache. localhost ist per ping erreichbar. Im /var/www/localhost/htdocs liegt eine index.php und eine index.html

Wo kann das Prob liegen?
Back to top
View user's profile Send private message
fndark
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2012
Posts: 107
Location: irgendwo in Sachsen

PostPosted: Sun May 28, 2023 10:53 am    Post subject: Reply with quote

Hi und schöne Pfingsten,

Quote:
Daher hab ich Apache installiert und konfiguriert.


Deine Überschrift sagt allerdings

Quote:
LAMPP aber es kommt nur Speichern Unter


Da ergeben sich einpaar Fragen die Du nicht so recht beantwortest ->

    Hast Du nun Apache oder Lampp als Webserversoftware?
    Wie sieht die Fehlermeldung aus die Du bekommst?


Ich gehe mal davon aus das Du den Apache nutzt da Du schreibst das Du in der Apachegruppe dich befindest, weiterhin nehme ich an (da nichts näher bekannt ist) das deine PHP-Datei nicht aufgerufen wird (ich bin kein Angler und fische trotzdem mal im drüben Gewässer) kann das eventuel sein das ein Module wie beispielsweise "mod_php" nicht geladen ist / wird?

Lg, Sven
_________________
Wortmann Terra Server Hardwareinfos

[url=http://www.sysprofile.de/id57101][img]http://www.sysprofile.de/images/userbar.png[/img]
Back to top
View user's profile Send private message
computerfrau
n00b
n00b


Joined: 02 Mar 2023
Posts: 20
Location: Kiel

PostPosted: Sun May 28, 2023 12:02 pm    Post subject: Reply with quote

Moin Sven, dank dir.
Ich bekomme keinen Fehler es wird nur nicht die Datei angezeigt sonder ein Speichern unter wenn ich die Datei mit dem Browser öffne.
Der Fehler mit dem Modul ist wahrscheinlich. Aber ich brauch mal deine Hilfe. Er findet das Modul nicht ...
Ich habe nur Apache und PHP installiert. Mir war auch nicht bekannt das es über emerge das ganze lampp zusammen gibt ..

sysvorOrt /home/michi # php -v
PHP 8.2.5 (cli) (built: May 17 2023 19:24:03) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies

sysvorOrt /home/michi # cd /etc/apache2/modules.d/
sysvorOrt /etc/apache2/modules.d # ls
00_default_settings.conf 00_mod_mime.conf 41_mod_http2.conf
00_error_documents.conf 00_mod_status.conf 45_mod_dav.conf
00_languages.conf 00_mod_userdir.conf 46_mod_ldap.conf
00_mod_autoindex.conf 00_mpm.conf 70_mod_php5.conf
00_mod_info.conf 10_mod_mem_cache.conf
00_mod_log_config.conf 40_mod_ssl.conf

sysvorOrt /etc/apache2/modules.d # lsmod | grep php
sysvorOrt /etc/apache2/modules.d # modprobe php
modprobe: FATAL: Module php not found in directory /lib/modules/6.1.9-gentoo-x86_64
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5180

PostPosted: Sun May 28, 2023 12:22 pm    Post subject: Reply with quote

fndark wrote:
Hi und schöne Pfingsten,

Quote:
Daher hab ich Apache installiert und konfiguriert.


Deine Überschrift sagt allerdings

Quote:
LAMPP aber es kommt nur Speichern Unter


Da ergeben sich einpaar Fragen die Du nicht so recht beantwortest ->

    Hast Du nun Apache oder Lampp als Webserversoftware?
    Wie sieht die Fehlermeldung aus die Du bekommst?

LAMP ist eine Abkürzung für "Linux Apache Mysql PHP" Und bezeichnet einen Stack mit Weserver, Datenbank und PHP.
Eine kurze suche nach dem begriff hätte dir die Information auch geliefert ;)

@computerfrau.

Scheinbar schmeist du einiges hier zusammen was nicht zusammen gehört.
apache module sind keine kernel module daher ist die verwendung von modprobe falsch

Leider sind die meisten Anleitungen im internet im zusammenhang mit gentoo und dem LAMP stack stark veraltet.
Was ich finden konnte ist diese Anleitung.
Nur ob du damit klar kommst keine Ahnung
https://netslovers.com/post/lamp-stack-on-gentoo-linux/

Die konfiguration des LAMP stack selbst ist weitestgehend unabhängig der verwendeten Linux distribution.
Daher könnte diese Anleitung zusätzlich helfen.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
computerfrau
n00b
n00b


Joined: 02 Mar 2023
Posts: 20
Location: Kiel

PostPosted: Sun May 28, 2023 12:53 pm    Post subject: Reply with quote

Dank dir, aber ich bin trotzdem nicht weiter. Der HTML Code wird über localhost/index.php angezeigt. Der PHP-Info Teil nicht
<html>
<body>
<?php phpinfo(); ?>
</body>
</html>


Test
</body></html>



>>> Completed (2 of 2) www-servers/apache-2.4.57::gentoo

* Messages for package www-servers/apache-2.4.57:

*
* Selected default threaded MPM: event
*
* Please note that you need SysV IPC support in your kernel.
* Make sure CONFIG_SYSVIPC=y is set.
*
* Attention: cgi and cgid modules are now handled via APACHE2_MODULES flags
* in make.conf. Make sure to enable those in order to compile them.
* In general, you should use 'cgid' with threaded MPMs and 'cgi' otherwise.

* GNU info directory index is up-to-date.

!!! existing preserved libs:
>>> package: dev-lang/ghc-9.0.2-r4
* - /usr/lib64/ghc-9.0.2/process-1.6.13.2/libHSprocess-1.6.13.2-ghc9.0.2.so
* used by /usr/bin/c2hs (dev-haskell/c2hs-0.28.8)
* used by /usr/lib64/x86_64-linux-ghc-9.0.2/libHSlanguage-c-0.8.3-CItfxBxr2Kd6VpdOMdW0wq-ghc9.0.2.so (dev-haskell/language-c-0.8.3-r1)
* used by /usr/sbin/haskell-updater (app-admin/haskell-updater-1.3.2-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries

* IMPORTANT: config file '/etc/apache2/httpd.conf' needs updating.
* See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
* sections of the emerge man page to learn how to update config files.

* IMPORTANT: 20 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.

sysvorOrt /home/michi # etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/apache2/httpd.conf (1)
Please select a file to edit by entering the corresponding number.
(don't use -3, -5, -7 or -9 if you're unsure what to do)
(-1 to exit) (-3 to auto merge all files)
(-5 to auto-merge AND not use 'mv -i')
(-7 to discard all updates)
(-9 to discard all updates AND not use 'rm -i'): 1


File: /etc/apache2/._cfg0000_httpd.conf
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again
5) Save update as example config
Please select from the menu above (-1 to ignore this update): 1
Replacing /etc/apache2/httpd.conf with /etc/apache2/._cfg0000_httpd.conf
mv: '/etc/apache2/httpd.conf' überschreiben? y

Exiting: Nothing left to do; exiting. :)
sysvorOrt /home/michi # apache2ctl -M
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.2.31. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_event_module (static)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_anon_module (shared)
authn_core_module (shared)
authn_dbd_module (shared)
authn_dbm_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_dbm_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_owner_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
cgid_module (shared)
dbd_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
ext_filter_module (shared)
filter_module (shared)
headers_module (shared)
include_module (shared)
info_module (shared)
log_config_module (shared)
logio_module (shared)
mime_module (shared)
mime_magic_module (shared)
negotiation_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
speling_module (shared)
ssl_module (shared)
unique_id_module (shared)
unixd_module (shared)
usertrack_module (shared)
vhost_alias_module (shared)

sysvorOrt /home/michi # cd /etc/apache2/modules.d/
sysvorOrt /etc/apache2/modules.d # ls
00_default_settings.conf 00_mod_info.conf 00_mod_userdir.conf 41_mod_http2.conf
00_error_documents.conf 00_mod_log_config.conf 00_mpm.conf 45_mod_dav.conf
00_languages.conf 00_mod_mime.conf 10_mod_mem_cache.conf 46_mod_ldap.conf
00_mod_autoindex.conf 00_mod_status.conf 40_mod_ssl.conf 70_mod_php5.conf
sysvorOrt /etc/apache2/modules.d # netstat -puntl
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2519/cupsd
tcp6 0 0 ::1:631 :::* LISTEN 2519/cupsd
tcp6 0 0 :::443 :::* LISTEN 1961/apache2
tcp6 0 0 :::80 :::* LISTEN 1961/apache2
udp 0 0 0.0.0.0:68 0.0.0.0:* 2462/dhcpcd: [manag
udp 0 0 192.168.2.49:123 0.0.0.0:* 2581/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2581/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2581/ntpd
udp6 0 0 fe80::dbe4:82ff:121:123 :::* 2581/ntpd
udp6 0 0 ::1:123 :::* 2581/ntpd
udp6 0 0 :::123 :::* 2581/ntpd
udp6 0 0 :::546 :::* 2462/dhcpcd: [manag
sysvorOrt /etc/apache2/modules.d # mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
sysvorOrt /etc/apache2/modules.d # emerge -av mysql

* IMPORTANT: 20 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.68 s.

[ebuild R ] dev-db/mysql-8.0.32-r2:8.0::gentoo USE="perl server -cjk -cracklib -debug -jemalloc -latin1 -numa -profiling -router (-selinux) -tcmalloc -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] no

Quitting.

sysvorOrt /etc/apache2/modules.d # /etc/init.d/mysql start
* Caching service dependencies ... [ ok ]
* Checking mysqld configuration for mysql ... [ ok ]
* Starting mysql ... [ ok ]
sysvorOrt /etc/apache2/modules.d # /etc/init.d/p
pciparm php-fpm procfs pydoc-3.11 pydoc-3.12
sysvorOrt /etc/apache2/modules.d # cd /etc/apache2/
sysvorOrt /etc/apache2 # ls
httpd.conf magic modules.d test.html vhosts.d
sysvorOrt /etc/apache2 # apache2ctl configtest
* Checking apache2 configuration ... [ ok ]
sysvorOrt /etc/apache2 # /etc/init.d/apache2 restart
* WARNING: you are stopping a boot service
* Stopping apache2 ... [ ok ]
* Starting apache2 ...


sysvorOrt /var/www/localhost/htdocs # ls
fcgid-bin index.html index.php passwd.php php-shell.sh replace.php test.php
Back to top
View user's profile Send private message
fndark
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2012
Posts: 107
Location: irgendwo in Sachsen

PostPosted: Sun May 28, 2023 1:44 pm    Post subject: Reply with quote

Hi,

@firefly
Ich weiss was Lampp und Apache ist und wo sich beides Unterscheidet - ich war etwas beim Beitrag irretiert :D :lol:

Und dennoch fehlt in derModulliste "Php".... hier mal meine Modulliste

Quote:
GENTOO-PC /etc/portage # apache2ctl -M
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fe80::22dd:3e6f:668:a5a9%enp8s0. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_prefork_module (static)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_anon_module (shared)
authn_core_module (shared)
authn_dbm_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_dbm_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_owner_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
ext_filter_module (shared)
filter_module (shared)
headers_module (shared)
include_module (shared)
info_module (shared)
log_config_module (shared)
logio_module (shared)
mime_module (shared)
mime_magic_module (shared)
negotiation_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
speling_module (shared)
ssl_module (shared)
unique_id_module (shared)
unixd_module (shared)
usertrack_module (shared)
vhost_alias_module (shared)
php_module (shared)
security2_module (shared)


Im Ordner /etc/apache2/modules.d befindet sich bei mir eine Datei 70_mod_php.conf - schau mal bitte ob die vorhanden ist?!
Ich hatte neulich auch das Problem das der Häuptling mir kein PHP mehr anzeigte obwohl er das bis 1 Tag zuvor noch machte und es lagt einfach nur am nicht geladenen PHP-Modul.
Blöd ist das es bei Gentoo die Verwaltung mit a2enmod leider nicht gibt - ich kann erst heute Abend schauen wo ich das eingetragen habe das es bei Apachestart mit geladen wird, entschuldige bitte.
_________________
Wortmann Terra Server Hardwareinfos

[url=http://www.sysprofile.de/id57101][img]http://www.sysprofile.de/images/userbar.png[/img]
Back to top
View user's profile Send private message
computerfrau
n00b
n00b


Joined: 02 Mar 2023
Posts: 20
Location: Kiel

PostPosted: Sun May 28, 2023 1:47 pm    Post subject: Reply with quote

ja, die 70_mod_php.conf ist vorhanden

<IfDefine PHP5>
# Load the module first
<IfModule !mod_php5.c>
LoadModule php5_module modules/libphp5.so
</IfModule>

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

DirectoryIndex index.php index.phtml
Include "/var/lib/eselect-php/mod_php.conf"
</IfDefine>
70_mod_php5.conf lines 1-15/15 (END)
Back to top
View user's profile Send private message
fndark
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2012
Posts: 107
Location: irgendwo in Sachsen

PostPosted: Sun May 28, 2023 6:55 pm    Post subject: Reply with quote

Hi,

wie ich weiter oben bereits sagte - ich hatte vor Tagen ein ähnliches Problem. Damit PHP bei mir wieder funktionierte musste ich in /etc/conf.d/apache2 in der folgende Zeile (ist ganz ob am Anfang zufinden)
Quote:
APACHE2_OPTS="


ganz einfach den folgenden Eintrag hinzufügen

Quote:
-D PHP


so das bei mir die komplette Zeile wie folgt aussieht

Quote:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D SECURITY -D PHP"


Somit funktionierte PHP bei mir wieder.

Ich habe weder grossartig an der Apachestandardkonfig rumgebastelt noch irgendwas anderes ausser mit Letsencrypt die SSL-Verschlüsselung nachinstalliert (mein privater / lokaler Webserver ist nur per https und garnicht per http erreichbar).
Was anderes fällt mir nicht ein was falsch bei dir sein könnte außer das das PHP-Modul (siehe obige Modulliste von dir und mir) entweder nicht vorhanden oder einfach nicht geladen wird / ist.

Lg, Sven
_________________
Wortmann Terra Server Hardwareinfos

[url=http://www.sysprofile.de/id57101][img]http://www.sysprofile.de/images/userbar.png[/img]


Last edited by fndark on Sun May 28, 2023 7:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
computerfrau
n00b
n00b


Joined: 02 Mar 2023
Posts: 20
Location: Kiel

PostPosted: Sun May 28, 2023 7:02 pm    Post subject: Reply with quote

fndark wrote:
Hi,

wie ich weiter oben bereits sagte - ich hatte vor Tagen ein ähnliches Problem. Damit PHP bei mir wieder funktionierte musste ich in /etc/conf.d/apache2 in der folgende Zeile (ist ganz ob am Anfang zufinden)
Quote:
APACHE2_OPTS="


ganz einfach den folgenden Eintrag hinzufügen

Quote:
-D PHP


so das bei mir die komplette Zeile wie folgt aussieht

Quote:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D SECURITY -D PHP"


Somit funktionierte PHP bei mir wieder.

Ich habe weder grossartig an der Apachestandardkonfig rumgebastelt noch irgendwas anderes ausser mit Letsencrypt die SSL-Verschlüsselung nachinstalliert.
Was anderes fällt mir nicht ein was falsch bei dir sein könnte außer das das PHP-Modul (siehe obige Modulliste von dir und mir) entweder nicht vorhanden oder einfach nicht geladen wird / ist.

Lg, Sven



Dank dir aber das war schon aktiv. Und ich habe vorsichtshalber nochmal reinkopiert. Aber er will nicht
Back to top
View user's profile Send private message
fndark
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2012
Posts: 107
Location: irgendwo in Sachsen

PostPosted: Sun May 28, 2023 7:05 pm    Post subject: Reply with quote

Hi,

hast Du echt garnichts an weiteren Infos wie in acess_log oder error_log welche die Logfiles sind vom Apache?
_________________
Wortmann Terra Server Hardwareinfos

[url=http://www.sysprofile.de/id57101][img]http://www.sysprofile.de/images/userbar.png[/img]
Back to top
View user's profile Send private message
computerfrau
n00b
n00b


Joined: 02 Mar 2023
Posts: 20
Location: Kiel

PostPosted: Sun May 28, 2023 7:12 pm    Post subject: Reply with quote

Nee , jedenfalls Nix gefunden ..

https://www.gentoo-linux.de/2023/05/28/hallo-welt/
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2390
Location: Germany

PostPosted: Sun May 28, 2023 8:47 pm    Post subject: Reply with quote

Ich weiß die Frage ist seltsam.. aber ich stelle sie trotzdem weil sich so vieles in der Art verändert wie wir Menschen mit Computer interagieren und uns Problemen annähern.

Hast du wiki.gentoo.org besucht und bist für die Einrichtung der Dokumentation gefolgt?

https://wiki.gentoo.org/wiki/PHP
Back to top
View user's profile Send private message
fndark
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2012
Posts: 107
Location: irgendwo in Sachsen

PostPosted: Thu Jun 01, 2023 7:31 pm    Post subject: Reply with quote

Hi,

ob es noch von Interesse ist weis ich nicht, aber mich würde interessieren ob Du es mittlerweilen zum laufen bekommen hast?

Das Interesse bei mir rührt daher, das ich selbst auf meinem privat Server

    Wordpress v 6.2.2
    MySQL-Server 8.0.32-r2
    Apache 2.4.56
    Php 8.1


Erfolgreich und ohne Probleme zum laufen gebracht habe.

Lg, Sven
_________________
Wortmann Terra Server Hardwareinfos

[url=http://www.sysprofile.de/id57101][img]http://www.sysprofile.de/images/userbar.png[/img]
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