couple of problem with filezilla and pear::mail

Problems with the Windows version of XAMPP, questions, comments, and anything related.

couple of problem with filezilla and pear::mail

Postby highjo » 31. March 2008 21:26

hello! guys
I have a couple of problems playing around with mail and ftp aspect of php.
I'm on windows Xp with xampp 1.6.5.
the major problem is about filezilla server. i have two default users anonymous and newuser which are enabled and the server is a service that starts at startup.
my codes :
i'am having the same message of the first die even after trying the loopback address 127.0.0.1
Code: Select all

 
<?php
set_time_limit(0);
if (!pointer = ftp_connect('localhost'))
{
    die('could not connect to ftp server');
}
if(!ftp_login($pointer,'newuser','wampp'))
{
    die('login failed');
 
}
 
?>
 


any idea?

the second problem is about the PEAR Mail package.
the problem is that, a mail send with mail class doesn't show the subject here is the code


Code: Select all
 
<?php
error_reporting(E_ALL);
include_once('Mail.php');
$mail = Mail::factory('mail');
$headers = array('from' => 'postmaster@localhost', 'Subject' => 'PEAR');
$go=$mail->send('admin@localhost',$headers,'this is send with the pear mail factory with subject');
if(PEAR::isError($go))
{
//some echo with $go->getMessage();
}
else
{
//some message
}
?>

don't know why can't see this the subject in my outlook express.but can it if it's sent with built in mail function i see the subject.

the third problem is about SMTP.my mercury is (i guess) working properly
still with pear i see:mail sendind failed :Failed to connect to smtp.localhost:25 [SMTP: Failed to connect socket: (code: -1, response: )]
after running this
Code: Select all
 
<?php
include_once('Mail.php');
$mail = Mail::factory('smtp', array('host' => 'smtp.localhost'));
$headers = array('From' => 'postmaster@localhost', 'CC' => 'newuser@localhost', 'Subject' => 'Carbon Copy');
$go = $mail->send('admin@localhost',$headers, 'a try with pear for carbon copy');
if(PEAR::isError($go))
{
//some echo with $go->getMessage();
}
else
{
//some message
}
?>

in my php.ini i change in [mail -function] SMTP = smtp.localhost but still
any idea? thanks
highjo
 
Posts: 16
Joined: 31. March 2008 21:09

Postby Wiedmann » 31. March 2008 21:33

i'am having the same message

Which message?

BTW:
You should use error_reporting(E_ALL) while debugging your scripts.

the major problem is about filezilla server.

You can connect to the server with another ftp client?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby highjo » 01. April 2008 16:13

I'm talking about the this message
Failed to connect to smtp.localhost:25 [SMTP: Failed to connect socket: (code: -1, response: )]
.Dou you want me to try a cioen like cuteFtp to connect to the filezilla server?
highjo
 
Posts: 16
Joined: 31. March 2008 21:09

Postby Wiedmann » 01. April 2008 16:44

I'm talking about the this message: "Failed to connect to smtp.localhost:25"

This is an error message while using the mail function...

My question was the error message while using the ftp function.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 128 guests