You are here: Re: mail function generates 500 internal server error « PHP Programming Language « IT news, forums, messages
Re: mail function generates 500 internal server error

Posted by Gordon Burditt on 11/19/44 11:47

>I had a hard disc problem last week on my server. I replaced the disc and
>copied al the files to the new hard disc, everything works fine again except
>some php scripts that are using the mail() function. When executing these
>scripts I get this error:
>"500 Internal Server Error
>The server encountered an internal error or misconfiguration and was unable
>to complete your request.
>
>Please contact the server administrator, webmaster@mydomain.com and inform
>them of the time the error occurred, and anything you might have done that
>may have caused the error.
>
>More information about this error may be available in the server error log."
>
>
>In my logs I find this:malformed header from script. Bad
>header=/home/mydomain/dead.letter...: php-script

The program invoked by the mail() function (often sendmail) is generating
an error message, which is messing up your output since the web server
thinks it is supposed to be a CGI header, but it isn't.

Temporary workaround: output some text
(e.g. <html><head><title>This is a title</title></head><body>\n")
*before* calling the mail function. You will see the error message
text in the output from your page. Then figure out what it means.
*SOMETHING* is wrong with the mail and it's saving it in a dead.letter
file because it can't deliver it.

>Does somebody know what the problem could be?

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация