Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

Donald whannell

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 9
    • 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: 9
    • 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: 15037
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: 15037
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: 15037
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: 9
    • 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.073 seconds with 20 queries.