Page 1 of 2

Error with email notifications - Mantis 1.0.1

Posted: 17 Apr 2006, 14:36
by dsavercool
I receive this error when Mantis attempts to send an email notification.

SYSTEM WARNING: fsockopen() [function.fsockopen]: unable to connect to 192.168.1.102:25 (Permission denied)

I had migrated from an old Linux install and Mantis version 19.2 to a newer Linux with Mantis 1.0.1, I can't figure out why I receive the above error.

Posted: 18 Apr 2006, 06:16
by olas
Seems like your mail server (192.168.1.102) don't accept yor connection. Maybe you need a username and password for it? If you have, maybe it's the wrong username and password?

User Authentication

Posted: 18 Apr 2006, 15:22
by dsavercool
I can't seem to find where to define the name and password.

Posted: 18 Apr 2006, 15:46
by Narcissus
Assuming that the server requires a SMTP username and password, and that it is accepting connections from your Mantis server, you need to set $g_smtp_username and $g_smtp_password in your config_inc.php file.

Hope that helps!

re:

Posted: 18 Apr 2006, 18:42
by dsavercool
Narcissus wrote:Assuming that the server requires a SMTP username and password, and that it is accepting connections from your Mantis server, you need to set $g_smtp_username and $g_smtp_password in your config_inc.php file.

Hope that helps!
Attempting to define those in my email variables of the config_inc.php file does something funny. After saving the changes all of the pages come up blank in the browser.

Posted: 18 Apr 2006, 18:58
by Narcissus
If you post your config_inc.php file to me via private message, I can have a quick look for you...

phpmailer and php includes folder

Posted: 25 Apr 2006, 15:18
by dsavercool
Okay, after taking a break from this issue I am tackling it again.

It tells me to put the class.phpmailer.php and the class.smtp.php files in my php includes path from my php.ini file. However, my php.ini file includes path line is semi-coloned out. Also I searched my system and there is no include or includes directory anywhere, and attempting to make one and specifying it in my php.ini file causes my server pages not to respond or load.

Also please let me know if you want more information to better assist, this is killing me. Some additional info - php v5

Help!

Re: phpmailer and php includes folder

Posted: 25 Apr 2006, 22:12
by thraxisp
dsavercool wrote:Okay, after taking a break from this issue I am tackling it again.

It tells me to put the class.phpmailer.php and the class.smtp.php files in my php includes path from my php.ini file. However, my php.ini file includes path line is semi-coloned out. Also I searched my system and there is no include or includes directory anywhere, and attempting to make one and specifying it in my php.ini file causes my server pages not to respond or load.
Our code handles this directly. threr's no need to add this.

I would suspect one of the following:
- the address or port is wrong,
- the address is not accessible (try to ping it),
- you can't make connections outside the web server (possibly if you are running SELinux)

RE: phpmailer and php includes folder

Posted: 26 Apr 2006, 14:23
by dsavercool
I'm able to browse the web on this machine and the mailserver I'm attempting to use is an internal server. I'm running Fedora Core 4 with the prepackaged version of PHP that came with it. The readme file in /core/phpmailer states that you should copy those files into those paths, are you saying it should have done that by itself?

Help!

Another tidbit

Posted: 27 Apr 2006, 16:27
by dsavercool
Receive this error when running the email test in the admin folder no matter what mail server I specify (I have a few to try)

SYSTEM WARNING: fsockopen() [function.fsockopen]: unable to connect to 192.168.1.102:25 (Permission denied)

Posted: 27 Apr 2006, 17:11
by Narcissus
From your web server, are you able to telnet to port 25 on the mail server?

At least by doing this, you'll be 99% sure if it's your web server (answer, "yes") or your mail server or network (answer "no")...

Re

Posted: 27 Apr 2006, 19:26
by dsavercool
When attempting to run the command "telnet 192.168.1.102" it says connection refused. I'm diving deeper without wearing the correct gear here.

Any ideas?

Posted: 27 Apr 2006, 19:29
by Narcissus
You probably actually have to use:
telnet 192.168.1.102 25

(that's a space between 192.168.1.102 and 25). If you don't specify the port number (25) it defaults to 23.

See if that makes a difference at all...

Re:

Posted: 27 Apr 2006, 19:59
by dsavercool
That worked, it said

Connected to 192.168.1.102
Ready to be Spoken to here

And it gave me a cursor


Also I have set SELinux=disabled in my selinux/config file

Posted: 27 Apr 2006, 20:11
by Narcissus
OK, so that means that there's no network problems...

The error is coming from PHP itself, as it's being restricted in what it can do (not so much Mantis or PHPMailer).

Just out of curiosity, what distribution are you using? I just read here that Fedora uses SELinux which might need to be disabled.

Other than that, someone else might have a clue...