Probleme mit PEAR (Win7) 1.7.7 [SOLVED]

Alles, was PHP betrifft, kann hier besprochen werden.

Probleme mit PEAR (Win7) 1.7.7 [SOLVED]

Postby fine » 31. October 2011 08:14

Hallo,

ich habe schon im Forum und im Netz geschaut, aber noch keine so rechte Lösung für mein Problem gefunden. Vielleicht liegt es auch nur daran, dass ich Neuling bin und es irgendwie noch nicht so richtig checke :( .

Ich nutze:
Xampp 1.7.7
Windows 7
Easyeclipse als Entwicklungsumgebung

Ich möchte gern PEAR: Mail nutzen, bekomme es aber per Include require_once('mail.php'); nicht in meine php-Datei eingebunden. Ich bekomme die Meldung, dass der Include File nicht existiert.

Ich habe bereits in der PHP ini geschaut. Der Pfad ist richtig gesetzt (Die Xampp Installation ist bei mir direkt unter C):
; Windows: "\path1;\path2"
include_path = ".;C:\xampp\php\PEAR"

Das müsste doch eigentlich hinhauen, oder? Ich habe nichts an der Orginalinstallation geändert. Was muss ich noch anschalten, einstellen, damit ich PEAR nutzen kann???

Vielen Dank schon mal im Voraus.

Viele Grüße fine
fine
 
Posts: 3
Joined: 27. October 2011 14:44
Operating System: Windows 7

Re: Probleme mit PEAR

Postby Sharley » 31. October 2011 10:35

Versuchen Sie Mail.php nicht mail.php - Groß-und Kleinschreibung nicht wie Windows.

Leider ist mein Deutsch nicht gut.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Probleme mit PEAR

Postby fine » 31. October 2011 10:48

Hallo,

vielen Dank für die schnelle Antwort. Ich habe auch schon die Einbindung von Mail.php probiert, funktioniert leider nicht.
fine
 
Posts: 3
Joined: 27. October 2011 14:44
Operating System: Windows 7

Re: Probleme mit PEAR

Postby Sharley » 31. October 2011 11:35

Es kann auch helfen, dieses Problem zu beheben, wenn Sie hier könnte hinzufügen, den gesamten Code in Ihr Skript.

Ist die PEAR Mail-Paket auch installiert?
Mail::PEAR Pakete installiert sind, hab ich gecheckt.
Code: Select all
Mail                       1.1.14      stable
Mail_Mime                  1.5.2       stable
Mail_mimeDecode            1.5.0       stable

Dieser Link kann als Hinweis helfen, indem sie digit6@gmail.com hat ein ähnliches Problem wie Sie:
http://pear.php.net/manual/en/package.m ... xample.php

Google übersetzen spricht mit gespaltener Zunge.
Ich fragte meinen Rottweiler, für mich zu übersetzen, und er war mehr konsistent.
Ich sagte auf Englisch - Wuff! Wuff!
Er bellte in Deutsch - Wuff! Wuff! :D
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Probleme mit PEAR

Postby fine » 01. November 2011 09:07

Hello Sharley,
english is no problem for me.

I looked in my installation (command: pear list)
Mail Version 1.1.14 stable
Mail_Mime Version 1.5.2 stable
Net_SMTP Version 1.3.2 stable

Here is my script, where I tried to include the Pear Mail class. Maybe ist would help others with the same problems:
<?php
require_once('../../php/PEAR/Mail.php');

$options = array (
'host' => 'smtp.mailer.de',
'auth' => true,
'username' => 'user',
'password' => 'password'
);

$mailer = Mail::factory('smtp',$options);
if (true === PEAR::isError($mailer))
{
die ($mailer->getMessage());
}
$empfaenger = 'toadress@ostfalia.de';

$headers=array(
'From' => 'fromadress@hbk.de',
'To' => 'toadress@ostfalia.de',
'Subject' => 'Die Hallo-Welt-Mail'
);

$res=$mailer->send($empfaenger,$headers,'Hallo Welt');
if (true === PEAR::isError($res))
{
die ($res->getMessage());
}
?>

I tried to write the include-path in other ways and now it works. Thanks a lot for your help :-)
fine
 
Posts: 3
Joined: 27. October 2011 14:44
Operating System: Windows 7

Re: Probleme mit PEAR

Postby Sharley » 01. November 2011 09:28

Thanks for your feedback and doing it in English which saves me trying to work out what Google translate will come up with next.
No more translations like "little green feet" for Grüß :D

It had to be something path related as 'not finding the file' error seems to indicate this.

All is well that ends well. 8)

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to PHP

Who is online

Users browsing this forum: No registered users and 19 guests