send_mails.php not functioning - configuration?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
crp
Posts: 17
Joined: 04 Apr 2011, 00:27

send_mails.php not functioning - configuration?

Post by crp »

config_inc.php reads
<?php
$g_hostname = ‘localhost’;
$g_db_type = ‘mysql’;
$g_database_name = ‘bitnami_mantis’;
$g_db_username = ‘bn_mantis’;
$g_db_password = ‘c210c121cf’;
$g_phpMailer_method = 1;
$g_from_email = ‘bitnami’;
$g_allow_file_upload = OFF;
$g_window_title = ‘MantisBugTracker’;
?>

MantisBT is running on both the URL from a client pc and localhost from the server.
I am trying to get email to work and so I tried
php /opt/lampstack-1.2-5/apps/mantis/htdocs/scripts/send_emails.php
The result was:
<html><head><title>APPLICATION ERROR #400</title></head><body><br /><div align="center"><table class="width50" cellspacing="1"><tr><td class="form-title">APPLICATION ERROR #400</td></tr><tr><td><p class="center" style="color:red">Database connection failed. Error received from database was #1045: Access denied for user 'bn_mantis'@'localhost' (using password: YES).</p></td></tr><tr><td><p class="center">Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.</p></td></tr></table></div><p>Previous non-fatal errors occurred. Page contents follow.</p><div style="border: solid 1px black;padding: 4px"><p style="color:red">SYSTEM WARNING: mysql_connect(): Access denied for user 'bn_mantis'@'localhost' (using password: YES)</p></div></body></html>
I am befuddled. especially since the administrator name is 'phpbb' but if I put that into the config_inc.php file the whole MantisBT system fails, not just email.
So how I am supposed to configure items so that email is sent via the sendmail on the host (CentOS5.5) pc?
thanks
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: send_mails.php not functioning - configuration?

Post by Lapinkiller »

Hello

as the error message says, it's a misconfiguration of your database ;)

it seems that the user and/or the password of the bdd is wrong ;)

SYSTEM WARNING: mysql_connect(): Access denied for user 'bn_mantis'@'localhost'
so, check the database user and password are correct ;)
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
crp
Posts: 17
Joined: 04 Apr 2011, 00:27

Re: send_mails.php not functioning - configuration?

Post by crp »

ahh, I found an issue. This is part of a LAMP and the mySQL for the LAMP is listening on port 3316.
How do I change the config_inc.php to reflect that?
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: send_mails.php not functioning - configuration?

Post by Lapinkiller »

not sure but try this :

Code: Select all

$g_hostname 			= 'localhost:3316';
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
crp
Posts: 17
Joined: 04 Apr 2011, 00:27

Re: send_mails.php not functioning - configuration?

Post by crp »

well that didn't blow up the script, so i guess it is looking in the correct database now.
but still no joy :(

When i look at the record for bn_mantis , the password field is set to "2e01eff804b8deef" which seems to be a Hex mask.
Anyone know how to decrypt it to the original ASCII ?


I did an uninstall and install of the mantis module.
This gave me a new password, which I tried:

Code: Select all

mysql —port=3316 -u bn_mantis -pedffc2331e
This still results in ERROR 1045 (28000): Access denied for user ’bn_mantis’@’localhost’ (using password: YES)

So which item here is broken? At this point, i don’t care about the email . How can I create a user with my own password and not one generated by Mantis – or at least how I can decrypt the password?
crp
Posts: 17
Joined: 04 Apr 2011, 00:27

Re: send_mails.php not functioning - configuration?

Post by crp »

well this comes under the heading of What The Heck ???
[root@rh5 htdocs]# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.055 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.061 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.059 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.056 ms
for some reason (desperation?) I made the following changes to the config_inc.php

Code: Select all

<?php
        $g_hostname = '127.0.0.1:3316';
        $g_db_type = 'mysql';
        $g_database_name = 'bitnami_mantis';
        $g_db_username = 'bn_mantis';
        $g_db_password = 'edffc3231e';
        $g_email_send_using_cronjob = ON;
        $g_phpMailer_method = 1;
        $g_from_email = 'bitnami';
        $g_allow_file_upload = OFF;
        $g_window_title = 'MantisBugTracker';
?>
Then I did
[root@rh5 htdocs]# php /opt/lampstack-1.2-5/apps/mantis/htdocs/scripts/send_emails.php
which resulted in
Sending emails...
Done.
And the MantisBT web interface still works.

:?: :?: :?: Can anyone explain :?: :?: :?:
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: send_mails.php not functioning - configuration?

Post by Lapinkiller »

If you have phpmyadmin installed, use it to manage mysql accounts, else take a look at http://dev.mysql.com/doc/refman/5.1/en/ ... users.html
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
Post Reply