No emails being sent No emails being sent
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

No emails being sent

Started by Donald whannell, September 20, 2013, 11:53:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald whannell

I have become aware that I am no longer receiving emails from the contact form or for registrations.  It did work in the past and I'm not sure how long its actually not been working for, maybe more than 6 months. I just thought I was being ignored  :'(

The email settings are as they have always been, defaulting to use sendmail, ie nothing in the boxes.  Other scripts are able to send mail so I'm pretty sure the mail side of the server is ok.  I've just updated from 1.5.22 to 1.5.24 to make sure there are no files missing but no difference.

I've enabled debug mode and I see the flowing errors when I try and enter a contact messages
=====

/contact.php
Notice line 241: Undefined index: captcha_field_mandatory
Notice line 257: Undefined variable: highlightFieldCSS
Notice line 271: Undefined variable: expand_array
Warning line 271: in_array() [function.in-array]: Wrong datatype for second argument
Notice line 299: Undefined variable: expand_array
Warning line 299: in_array() [function.in-array]: Wrong datatype for second argument
Notice line 324: Undefined variable: expand_array
Warning line 324: in_array() [function.in-array]: Wrong datatype for second argument
Notice line 353: Undefined variable: expand_array
Warning line 353: in_array() [function.in-array]: Wrong datatype for second argument

===

I don't know if these are relevant or not.

On entering the details in the contact form and hitting 'GO' I get a blank screen.

Any suggestions welcomed.   Debug mode is still enabled and the gallery is at

http://www.drookitagain.co.uk/coppermine

Other than this the gallery appears to be working ok.

Donald

Donald whannell

It did eventually get it to display a sensible error message which said line 29 in mailer.inc.php was calling an invalid function

$subject = htmlspecialchars_decode($subject, ENT_QUOTES);

replacing htmlspecialchars_decode with html_entity_decode seems to have got it working again.  Googling the error indicated the original code is for PHP 5 and above, I have PHP 4.4.   I was led to believe coppermine would run on PHP 4.2 or above or am I completing missing something somewhere?

Donald

Αndré

We need to check why that function has been used instead of the other. Maybe we can replace it as suggested in the core code.

Αndré

Better solution: add this function to include/functions.inc.php:
if ( !function_exists('htmlspecialchars_decode') )
{
    function htmlspecialchars_decode($text)
    {
        return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
    }
}

Αndré


Donald whannell

Quote from: Αndré on October 04, 2013, 12:00:43 PM
Better solution: add this function to include/functions.inc.php:
if ( !function_exists('htmlspecialchars_decode') )
{
    function htmlspecialchars_decode($text)
    {
        return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
    }
}


Thanks for your fix.  I ended up asking my host to upgrade the server to PHP 5 and reverted back to the original code but I'm sure it'll help others who can't upgrade.

Donald