[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Debian]:Apache und Mysql unbd PHP3 geht nicht...



On Tue, Nov 30, 1999 at 09:14:27AM +0000, Andre Vaupel wrote:
> Hi!
> 
> 
> Was muss ich genau fuer Pakete installieren damit Apache 
> mysql Anfragen ausführen kann über PHP3 ?
> 
> Muss noch etwas naträglich installiert oder konfiguriert 
> werden?
> 
Konfiguriert!
httpd.conf:LoadModule php3_module /usr/lib/apache/1.3/libphp3.so
httpd.conf:AddModule mod_php3.c
mime.types:application/x-httpd-php                              phtml
pht php
mime.types:application/x-httpd-php3                     php3
mime.types:application/x-httpd-php3-source                      phps
mime.types:application/x-httpd-php3-preprocessed                php3p
srm.conf:AddType application/x-httpd-php3 .phtml
srm.conf:AddType application/x-httpd-php3-source .phps

Check das mal durch, bei mir war das meiste schon drin...
> 
> Ich habe folgende Pakete installiert:
> 
> Apache, Apache-common, PHP3, mysql   noch irgendwas?
> 
php3-doc ist auch ganz nuetzlich!
> Bei dem Aufruf von php oder mysql Anfragen sagt Apache im logfile 
> leider 
> das der Handler php3 oder www-sql nicht zu finden ist :-(
> 
> mysql selbst läuft...konnte eine Datenbank über mysql create und 
> mysqladmin 
> problemlos einrichten.
> 
> Module für Apache sind aktiv, also PHP3. Von SQL habe ich als Modul 
> nichts
> gefunden bzw. wurde nach der Paketinstallation nicht danach gefragt.
> 
> gibt's irgendwie ein ?Kochrezept? was in welcher Reihenfolge vorhanden 
> sein muss?
>  
Wenn's nochmal hakelt kann ich Dir bei mir funktionierende Beispiele
schicken hier ne URL, die Du brauchst: http://www.devshed.com
Damit PHP3 mysql kann haeng ich mal ein Beispiel mit dran:

#!wml -I. -I %DIR/../diss/public/physik -o %DIR/../html/%BASE.php3 
#use wml::des::navbar
#use wml::std::grid
#include "template2.wml" select=Home
<subject "Physik">
<?
dl('mysql.so');
$hostname = "$(MYSQL_HOST)";
$username = "$(MYSQL_USER)";
$password = "$(MYSQL_PASSWD)";
$dbName = "$(MYSQL_DBNAME)";
$usertable = "$(MYSQL_TABLE)";

MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database");
@mysql_select_db("$dbName") or die("Unable to select database");
$query = "SELECT * FROM $usertable";
$result = MYSQL_QUERY($query);
if ($result) {
print "Der Dissertationsserver der Physikfakultaet enthaelt folgende Eintraege:";
print"<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\">";
while ($r = mysql_fetch_array($result)) {
       $name = $r["name"];
       $email = $r["email"];
       $vorname = $r["vorname"];
       $titel = $r["titel"];
       $datum = $r["datum"];
       $pdf = $r["pdf"];
       $ps  = $r["ps"];
       $pfad = $r["path2pub"];
       $abstract = $r["abstract"];
       print "<tr><td><a href=\"mailto:$email\";>$name</a>,<br><b> $titel </b>
              <br> Abstract<a href=\"$pfad/$abstract\">[HTML]</a>
              Volltext<a href=\"$pfad/$ps\">[ps]</a>
              <a href=\"$pfad/$pdf\">[pdf]</a>";
       print "</td></tr>";
       }
print" </table>";
} else {
        echo "No data.";
       }
   mysql_free_result($result);
mysql_close();
?>

die Anweisung dl('mysql.so'); ist wichtig, dann klappts auch mit mysql!
> 
> Danke schonmal!
> 
Keine Ursache

Gruss Matthias

PS: Vielleicht sollte ich mal zur LUGBO kommen, dann koennten wir uns
ein wenig darueber austauschen... 
-- 
+------------------created at Tue Nov 30 12:01:55 CET 1999-------------------+
|    Matthias Berse 	                            Phone:+49-2323-42397     |
\____Bachstr.28  44625 Herne, Germany_______________eMail: berse@gmx.de______/

Women complain about sex more than men.  Their gripes fall into two
categories: (1) Not enough and (2) Too much.
		-- Ann Landers
------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie
bitte eine E-Mail an majordomo@jfl.de die im Body
"unsubscribe debian-user-de <deine emailadresse>"
enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@jfl.de
------------------------------------------------
Anzahl der eingetragenen Mitglieder:     770


Reply to: