Advanced search  

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]

Pages: [1]   Go Down

Author Topic: No emails being sent  (Read 21743 times)

0 Members and 1 Guest are viewing this topic.

Donald whannell

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 11
    • Neilston webcam photogallery
No emails being sent
« on: September 20, 2013, 11:53:45 pm »

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
Logged

Donald whannell

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 11
    • Neilston webcam photogallery
Re: No emails being sent
« Reply #1 on: September 23, 2013, 09:29:01 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: No emails being sent
« Reply #2 on: October 04, 2013, 09:54:34 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: No emails being sent
« Reply #3 on: October 04, 2013, 12:00:43 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: No emails being sent
« Reply #4 on: October 04, 2013, 12:29:09 pm »

Added in SVN revision 8591.
Logged

Donald whannell

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 11
    • Neilston webcam photogallery
Re: Re: No emails being sent
« Reply #5 on: October 04, 2013, 07:00:03 pm »

Better solution: add this function to include/functions.inc.php:
Code: [Select]
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
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.