Zum Inhalt springen

Empfohlene Beiträge

Geschrieben

Hallo,

habe eine Virtuelle Maschine mit debian.(mit guestadditions)

Möchte darauf einen Onlineshop mit oscommerce bauen.(nur auf Computer nicht online)

Dieser hat die Datei install.php.

Installiert habe ich php5, apache2 & MysQl4.

Und auch in apache2 das loadmodule mit addtype in die httpd.conf eingebettet.

Problem: Ich kann trotzdem nicht die PHP-Datei öffnen.

Geschrieben
Und auch in apache2 das loadmodule mit addtype in die httpd.conf eingebettet.

Hä? Vielleicht geht es nur mir so, aber irgendwie kann ich mir ohne entsprechenden Auszug nichts darunter vorstellen.

Auch wenn ich kein PHP-Mensch bin, so ungefähr habe ich es bislang immer gemacht:

  • benötigtes Paket: libapache2-mod-php5
  • Aktivierung mittels 'a2enmod php5'
  • Apache neustarten

MysQl4.

Aktuelle Version ist meines Wissens 5.1.51.

Geschrieben (bearbeitet)

Schon mal danke für die Hilfe,

aber das Paket libapache2-mod-php5 ist installiert und ist auch schon aktiviert.

debian:/home/a# a2enmod php5

Module php5 already enabled

debian:/home/a#

Mit in Apache2 loadmodule und addtype, meine ich die einträge, die man in die Datei httpd.conf einfügen soll.

Meine httpd.conf:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

AddType application/x-httpd-php .php

(Der File existiert)

Beim öffnet kommt auch diese Fehlermeldung in der Konsole:

debian:/etc/apache2# gedit httpd.conf

(gedit:3478): GnomeUI-WARNING **: While connecting to session manager:

Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

Wenn ich die Datei mit der Konsole per open install.php macht der Computer garnichts, wenn ich die datei im Browser öffne, öffnet er ein neuen Tab, fragt Datei öffnen und macht dann wieder gar nichts.

Bearbeitet von Asgar13
Geschrieben

Das vorgeschlagene Programm

4) Installation

---------------

Make sure you are logged in as root and MySQL is running.

1. Untar or unzip the distribution files to a secure directory:

# cd /usr/local/src

# tar xjvf ispcp-omega-1.0.7.tar.bz2

Gemacht und(MySQL läuft und als root):

debian:/home/a# cd /usr/local/src

debian:/usr/local/src# tar xjvf ispcp-omega-1.0.7.tar.bz2

tar: ispcp-omega-1.0.7.tar.bz2: Kann open nicht ausführen: Datei oder Verzeichnis nicht gefunden

tar: Nicht behebbarer Fehler: Programmabbruch.

tar: Child returned status 2

tar: Fehler beim Beenden, verursacht durch vorhergehende Fehler.

Gibt es sonst noch Vorschläge, ich wäre für jede Idee dankbar.

Geschrieben

Mal eine kleine Liste an Fragen, die sich mir da so stellen

  • Hast du den Apache nach der Installation von PHP auch mal neu gestartet?
  • Kannst du dir html-Seiten anzeigen lassen?
  • Kannst du dir andere PHP-Seiten anzeigen lassen?
  • Hast du die Endung .php registriert bzw angegeben, dass das mittels PHP aufgerufen werden soll?
  • Als welcher User warst du bei der Installation des Scripts eingeloggt?

Geschrieben

1. ja habe ich mit den Befehl apache2ctl restart

2. ja, kann ich bin auch mit der VM hier an posten.

3. nein, kann andere php-seiten auch nicht öffnen.

4. ich verstehe nicht, was du damit meinst

5. Habe die Datei einmal mit gast und einmal mit root versucht zu öffnen, bringt beides nichts, außer, dass der mit bei guest sagt:

Konnte keinen Dateideskriptor für die Konsole erhalten

Could not get a file descriptor referring to the console

Die entpackte Datei habe ich per USB von Host zum Gast übertragen.

Geschrieben
Mit in Apache2 loadmodule und addtype, meine ich die einträge, die man in die Datei httpd.conf einfügen soll.

Soll man? Während der Installation von 'libapache2-mod-php5' werden, wenn ich mich nicht irre, die Dateien 'php5.load' und 'php5.conf' unter '/etc/apache2/mods-available' angelegt. 'a2enmod' legt Symlinks in 'mods-enabled' an, um eben nicht mehr alles händisch in 'httpd.conf' eintragen zu müssen.

Hast Du denn auch versucht, ein simples PHP-Testskript (=billiges echo) aufzurufen?

Geschrieben

Mir scheint, dass du den Dateityp php nicht oder nicht richtig registriert hast im Apache.

So in der Art:

  AddType application/x-httpd-php .php .phtml .php3

  AddType application/x-httpd-php-source .phps

Geschrieben (bearbeitet)

Nochmal danke, für die schnelle Hilfe.

unbenannt: Test-php <?php echo 'Hello World'; ?> erstellt und funktioniert auch dieses nicht.

Die php.load, php.conf und libapache2-mod-php5 sind vorhanden.

Crash: Habe beide Zeilen eingefügt, beim apache2ctl restart sagt er mir:

debian:/etc/apache2# apache2ctl -k restart

[Fri Oct 15 09:34:10 2010] [warn] module php5_module is already

loaded, skipping

apache2: apr_sockaddr_info_get() failed for debian

apache2: Could not reliably determine the server's fully qualified domain name,

using 127.0.0.1 for ServerName

httpd not running, trying to start

Netzwerk: "127.0.0.1 localhost" ist beim Netzwerk eingestellt

Habe danach Apache2 neuinstalliert, funktioniert immer noch nicht, aber die ganze httpd.conf ist leer.

Was nun?

Bearbeitet von Asgar13
Geschrieben

Sollte eigentlich schon etwas entsprechendes in der php.con drin stehen. Eventuell von der Syntax bei dir aber anders, da PHP evtl anders eingebunden.

Die httpd.conf ist unter Debian auch leer. Stattdessen wird die apache2.conf im Verzeichnis /etc/apache2 genutzt.

Geschrieben

:beagolisc Sehe gerade, dass ich oben nicht angegeben habe, dass ich debian in der VM habe.

Wollte ich hinschreiben, habe ich aber wohl vergessen.

Dann heißt das, dass da Problem nicht in der httpd.conf liegt.

Wieso nimmt der Apache2 dann die Php-Skripte nicht an?

Geschrieben

Da meine Kristallkugel kaputt ist, weiss ich das leider auch grad nicht.

Schau doch mal, was in den Apache-Log Files steht, oder in den allgemeinen Log Files.

Geschrieben

php5.conf:

<IfModule mod_php5.c>

AddType application/x-httpd-php .php .phtml .php3

AddType application/x-httpd-php-source .phps

</IfModule>

php5.load

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

Sind in:

/etc/apache2/mods-available

Wurden durch libapache2-mods-php5 angelegt.

Bei der apache2.conf:

# Customizable error responses come in three flavors:

# 1) plain text 2) local redirects 3) external redirects

#

# Some examples:

#ErrorDocument 500 "The server made a boo boo."

#ErrorDocument 404 /missing.html

#ErrorDocument 404 "/cgi-bin/missing_handler.pl"

#ErrorDocument 402 http://www.example.com/subscription_info.html

#

# Alias /error/ "/usr/share/apache2/error/"

#

# <Directory "/usr/share/apache2/error">

# AllowOverride None

# Options IncludesNoExec

# AddOutputFilter Includes html

# AddHandler type-map var

# Order allow,deny

# Allow from all

# LanguagePriority en cs de es fr it nl sv pt-br ro

# ForceLanguagePriority Prefer Fallback

# </Directory>

#

# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var

# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var

# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var

# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var

# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var

# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var

# ErrorDocument 410 /error/HTTP_GONE.html.var

# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var

# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var

# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var

# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var

# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var

# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var

# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var

# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var

# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var

# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

Stehen diese Fehler drin.

In

/etc/php5/apache2/conf.d ist kein apache2.ini zu sehen.

Geschrieben
Meinst du damit die apache2.conf Datei?

Nein: "conf" = Konfiguration, interessant sind die Logfiles. Hinsichtlich Fehlerfindung wäre "/var/log/apache2/error.log" für Dich interessant, zumindest in den Standardeinstellungen.

Geschrieben

[Mon Oct 25 09:46:26 2010] [warn] module php5_module is already loaded, skipping

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/gd.so' - /usr/lib/php5/20060613+lfs/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/imap.so' - /usr/lib/php5/20060613+lfs/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/ldap.so' - /usr/lib/php5/20060613+lfs/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mcrypt.so' - /usr/lib/php5/20060613+lfs/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mssql.so' - /usr/lib/php5/20060613+lfs/mssql.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/odbc.so' - /usr/lib/php5/20060613+lfs/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_dblib.so' - /usr/lib/php5/20060613+lfs/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_odbc.so' - /usr/lib/php5/20060613+lfs/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/xsl.so' - /usr/lib/php5/20060613+lfs/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0

[Mon Oct 25 09:46:26 2010] [notice] Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny9 with Suhosin-Patch configured -- resuming normal operations

[Mon Oct 25 10:17:22 2010] [notice] Graceful restart requested, doing restart

[Mon Oct 25 10:17:22 2010] [warn] module php5_module is already loaded, skipping

apache2: apr_sockaddr_info_get() failed for debian

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/imap.so' - /usr/lib/php5/20060613+lfs/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/ldap.so' - /usr/lib/php5/20060613+lfs/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mssql.so' - /usr/lib/php5/20060613+lfs/mssql.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/odbc.so' - /usr/lib/php5/20060613+lfs/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_dblib.so' - /usr/lib/php5/20060613+lfs/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_odbc.so' - /usr/lib/php5/20060613+lfs/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/xsl.so' - /usr/lib/php5/20060613+lfs/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0

[Mon Oct 25 10:17:23 2010] [notice] Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny9 with Suhosin-Patch configured -- resuming normal operations

[Mon Oct 25 10:21:02 2010] [notice] caught SIGTERM, shutting down

[Mon Oct 25 10:21:03 2010] [warn] module php5_module is already loaded, skipping

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/imap.so' - /usr/lib/php5/20060613+lfs/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/ldap.so' - /usr/lib/php5/20060613+lfs/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mssql.so' - /usr/lib/php5/20060613+lfs/mssql.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/odbc.so' - /usr/lib/php5/20060613+lfs/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_dblib.so' - /usr/lib/php5/20060613+lfs/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_odbc.so' - /usr/lib/php5/20060613+lfs/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/xsl.so' - /usr/lib/php5/20060613+lfs/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0

[Mon Oct 25 10:21:03 2010] [notice] Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny9 with Suhosin-Patch configured -- resuming normal operations

[Mon Oct 25 10:50:10 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

[Mon Oct 25 10:50:13 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

[Mon Oct 25 13:05:37 2010] [notice] Graceful restart requested, doing restart

[Mon Oct 25 13:05:37 2010] [warn] module php5_module is already loaded, skipping

apache2: apr_sockaddr_info_get() failed for debian

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/imap.so' - /usr/lib/php5/20060613+lfs/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/ldap.so' - /usr/lib/php5/20060613+lfs/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mssql.so' - /usr/lib/php5/20060613+lfs/mssql.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/odbc.so' - /usr/lib/php5/20060613+lfs/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_dblib.so' - /usr/lib/php5/20060613+lfs/pdo_dblib.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_odbc.so' - /usr/lib/php5/20060613+lfs/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/xsl.so' - /usr/lib/php5/20060613+lfs/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0

[Mon Oct 25 13:05:38 2010] [notice] Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny9 with Suhosin-Patch configured -- resuming normal operations

[Mon Oct 25 16:28:40 2010] [notice] SIGHUP received. Attempting to restart

[Mon Oct 25 16:28:40 2010] [warn] module php5_module is already loaded, skipping

apache2: apr_sockaddr_info_get() failed for debian

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

[Mon Oct 25 16:28:40 2010] [notice] Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny9 with Suhosin-Patch configured -- resuming normal operations

[Mon Oct 25 17:17:09 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

[Mon Oct 25 17:27:24 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

[Mon Oct 25 17:27:25 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico

[Mon Oct 25 17:41:11 2010] [notice] caught SIGTERM, shutting down

[Wed Oct 27 16:29:36 2010] [warn] module php5_module is already loaded, skipping

[Wed Oct 27 16:29:40 2010] [notice] Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny9 with Suhosin-Patch configured -- resuming normal operations

Geschrieben

Existieren denn die Dateien in dem angegebenen Verzeichnis?

Wenn die Dateien da sind, schau dir mal die Berechtigungen an, ob der entsprechende User die Datei ausführen darf. Falls nicht, füge die entsprechenden Berechtigungen hinzu. (chmod +x)

Ansonsten such auf deinem System nach den beiden Dateien und passe den Pfad in der php.ini an, oder kopiere sie in den entsprechenden Ordner.

Geschrieben

Ist gelöst, ich habe php-Datei falsch geöffnet, ich habe den Ordner nicht erst in /var/www geschoben. Und dann per apache geöffnet.Sondern ich habe versucht sie direkt per Browser zu öffnen -.-

Wenn man weiß, wie das geht denkt man, Mensch, ist das dämlich, aber wenn man dies nicht weiß, dann fragt man sich warum dies nicht geht.

Noch etwas falls man den Apache per 192.168.0.100 nicht erreicht, versucht mal localhost in der Browserzeile.

Problem gelöst.

Geschrieben

...oder aber man gibt die IP-Adresse einfach in der Apache-Config an, startet den Apache neu und dann gehts auch. ;)

Direkt per Browser öffnen geht doch schon rein logisch nicht, wenn es nicht im document root (oder unterhalb) des Apache liegt. :rolleyes:

Erstelle ein Benutzerkonto oder melde Dich an, um zu kommentieren

Du musst ein Benutzerkonto haben, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen. Es ist einfach!

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde Dich hier an.

Jetzt anmelden

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...