Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-02 09:03:28

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Mail() function not working

I tried to make new author/publicher, but I get this message

Warning: mail(): Bad parameters to mail() function, mail not sent. in /…/textpattern/lib/txplib_misc.php on line 989

Any ideas what could this be?

Offline

#2 2009-09-02 10:01:42

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Mail() function not working

Please post your high detailed diagnostics.

Offline

#3 2009-09-02 12:16:55

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Mail() function not working

Thanks, here it is:

Textpattern version: 4.2.0 (r3275)
Last Update: 2009-09-03 15:22:12/2009-09-03 15:02:19
Document root: /hsphere/local/home/c256529/#.org
$path_to_site: /hsphere/local/home/c256529/#.org
Textpattern path: /hsphere/local/home/c256529/#.org/textpattern
Permanent link mode: section_title
Temporary directory path: /hsphere/local/home/c256529/#.org/textpattern/tmp
Site URL: www.#.org
PHP version: 5.2.6
Register globals: 1
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: America/New_York
Server Local Time: 2009-09-03 11:28:00
DST enabled?: 1
auto_dst: 0
Time Zone:  (+3600)
MySQL: 5.0.67-log
Locale: en_GB.UTF-8
Server: Apache/1.3.41 (Unix) mod_fastcgi/2.4.2 mod_scgi/1.12 PHP/4.4.9 mod_throttle/3.1.2 FrontPage/5.0.2.2635 mod_psoft_traffic/0.2 mod_ssl/2.8.31 OpenSSL/0.9.8b mod_macro/1.1.2
PHP Server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 2.6.26.6-SMP
Active plugins: gaw_if_comment_preview-0.1, zem_contact_reborn-4.0.3.20, zem_contact_lang-4.0.3.6, asy_wondertag-0.5
theme_name: classic 4.2.0

.htaccess file contents: 
------------------------
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
Options All -Indexes

<IfModule mod_rewrite.c>
	RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} ^#.org [NC]
      RewriteRule ^(.*)$ http://www.#.org/$1 [L,R=301]

	#RewriteBase /relative/web/path/

	RewriteCond %{HTTP_REFERER} !^$
	RewriteCond %{HTTP_REFERER} !^http://(www.)?#.org/.*$ [NC]
	RewriteRule .(gif|jpg|png)$ - [F] 


	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

<files .htaccess>
order allow,deny
deny from all
</files>

# limit file uploads to 10mb
LimitRequestBody 10240000

# protect config.php
<files config.php>
order allow,deny
deny from all
</files>

#php_value register_globals 0
------------------------

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_filesystem: binary
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
17 Tables: OK

10 Custom Fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)

PHP extensions: libxml, xsl/0.1, xmlwriter/0.1, dom/20031129, xmlreader/0.1, xml, tokenizer/0.1, session, pcre, SimpleXML/0.1, sockets, SPL/0.2, standard/5.2.6, Reflection/0.1, posix, mime_magic/0.1, mhash, mcrypt, mbstring, json/1.2.1, hash/1.0, gettext, gd, ftp, filter/0.11.0, dba, date/5.2.6, ctype, bz2, zlib/1.1, openssl, cgi-fcgi, bcmath, calendar, curl, dbase, exif/1.4 $Id: exif.c,v 1.173.2.5.2.25 2008/03/12 17:33:14 iliaa Exp $, fileinfo/0.1, gmp, iconv, imap, ldap, mysql/1.0, mysqli/0.1, odbc/1.0, PDO/1.0.4dev, pdo_mysql/1.0.2, pdo_pgsql/1.0.2, pdo_sqlite/1.0.1, pgsql, pspell, soap, SQLite/2.0-dev, zip/1.4.0, Zend Optimizer

pretext_data: array (
  'id' => '',
  's' => '',
  'c' => '',
  'q' => '',
  'pg' => '',
  'p' => '',
  'month' => '',
  'author' => '',
  'request_uri' => '/85879db5eeb42a6cd5f707a999f00150/?txpcleantest=1',
  'qs' => 'txpcleantest=1',
  'subpath' => '\\/',
  'req' => '/85879db5eeb42a6cd5f707a999f00150/?txpcleantest=1',
)

/hsphere/local/home/c256529/#.org/index.php: 
	r3189 (8becf5ea8d9ced7d05b2433dfbabf868)
/hsphere/local/home/c256529/#.org/css.php: 
	r3189 (7a0cc56c9dc585e56aab80bc0fb22c53)
/hsphere/local/home/c256529/#.org/textpattern/css.php: 
	r3189 (459137eeb00bb07136001528ce724192)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_admin.php: 
	r3203 (26c4f327450f66618fe82b06fb8b9e70)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_article.php: 
	r3246 (9211f37e8ba873c78b0c46186896d6b2)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_auth.php: 
	r3250 (6be154f05fca4e83c4a4947c8635afd7)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_category.php: 
	r3203 (2350c33b6acc663b56ba982bc479c920)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_css.php: 
	r3118 (bfd945a0b268c60f7b71b6535c06154e)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_diag.php: 
	r3267 (c03f4b7e28c2f8e5050924b6caf2f61f)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_discuss.php: 
	r3185 (9b08de9e4f2df7160105ff218134ec67)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_file.php: 
	r3200 (dc26e8f4cbb1821c466c14926c8a10ca)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_form.php: 
	r3260 (6ad789075a6a1811d027f5e4043b845d)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_image.php: 
	r3267 (814b6421cb2e2df073d0d6bf05c252bf)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_import.php: 
	r3203 (fb18d629321a93472674dbd4abbfc63c)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_link.php: 
	r3203 (7dee2f899aa22712e4f5f1005c6853b0)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_list.php: 
	r3203 (2dd80b98cb76b0532133f6d7c2bcccb9)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_log.php: 
	r3203 (a97af8e5ed62605ab0111e45266300cb)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_page.php: 
	r3260 (ef00267f34445a33ce0f2e453c3a20db)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_plugin.php: 
	r3203 (8c1691e89ccfc8a8f9160e66efce2b09)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_prefs.php: 
	r3235 (9833b1a7cbd01def4ceb40f8cdf01a3b)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_preview.php: 
	r1238 (cc7d08574508c8ec1e4c5281d534d6e3)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_section.php: 
	r3203 (1c7eec911a015b72e42d5cea903be426)
/hsphere/local/home/c256529/#.org/textpattern/include/txp_tag.php: 
	r3195 (280f0fd2e6f50e6a0f13490ea5dfc1f4)
/hsphere/local/home/c256529/#.org/textpattern/index.php: 
	r3275 (6e259f5394d65617809d25e4823de174)
/hsphere/local/home/c256529/#.org/textpattern/jquery.js: 
	unknown (bb381e2d19d8eace86b34d20759491a5)
/hsphere/local/home/c256529/#.org/textpattern/lib/IXRClass.php: 
	r2932 (6c533bb271087338aa19ca0b78b1810f)
/hsphere/local/home/c256529/#.org/textpattern/lib/admin_config.php: 
	r3202 (524b829d7c73e5db26415633e799e350)
/hsphere/local/home/c256529/#.org/textpattern/lib/class.thumb.php: 
	r3107 (0e3f7b9da4b0c77f9b75263142598902)
/hsphere/local/home/c256529/#.org/textpattern/lib/classTextile.php: 
	r2812 (b3e4cd9bd5fb469fabdebb2c0376f7e7)
/hsphere/local/home/c256529/#.org/textpattern/lib/constants.php: 
	r3133 (b296756aedaf98b6f9420359dd07abdb)
/hsphere/local/home/c256529/#.org/textpattern/lib/taglib.php: 
	r2868 (a0662fa399fb16e837e8852f044dade9)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_admin.php: 
	r3047 (54de3f807984122ebe9b8b955e5189f4)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_db.php: 
	r3250 (c29e316100ae6ed42d6ec51506388b5f)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_forms.php: 
	r3256 (2623d94099735edc0e7a51309c26665d)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_head.php: 
	r3265 (4492de4935f8352357f0809d9d89516f)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_html.php: 
	r3255 (adb712630ad3bbe59c5f716befa33f0a)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_misc.php: 
	r3271 (68d443f0f20acec5e86857a823c2b4e2)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_theme.php: 
	r3269 (83bcbeffa883bed5f0af951dda7be2fb)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_update.php: 
	r2812 (5e6821f06aeafe50b54e5a273423384f)
/hsphere/local/home/c256529/#.org/textpattern/lib/txplib_wrapper.php: 
	r2931 (1c1b260a13c67657f1678d72559583bc)
/hsphere/local/home/c256529/#.org/textpattern/publish.php: 
	r3258 (bc931a3406370c1ea4139ef957e95e38)
/hsphere/local/home/c256529/#.org/textpattern/publish/atom.php: 
	r3029 (f8cc6dbfb5a5f2b39ec480589b2d59c3)
/hsphere/local/home/c256529/#.org/textpattern/publish/comment.php: 
	r3266 (815df18aa4d451246ee70dd0502a8484)
/hsphere/local/home/c256529/#.org/textpattern/publish/log.php: 
	r3247 (1c047309f6f13883b29a943d1cddec3a)
/hsphere/local/home/c256529/#.org/textpattern/publish/rss.php: 
	r3029 (c39570953c1bd8347e456d750317b815)
/hsphere/local/home/c256529/#.org/textpattern/publish/search.php: 
	r2812 (29a315e2435b73fe3d3a4d83fe84ba19)
/hsphere/local/home/c256529/#.org/textpattern/publish/taghandlers.php: 
	r3256 (a40dce2989737477b1147d2104bba326)
/hsphere/local/home/c256529/#.org/rpc/index.php: 
	r2998 (682e18cb9bdd6e9442a9ac23db1a591f)
/hsphere/local/home/c256529/#.org/rpc/TXP_RPCServer.php: 
	r3250 (84ff888bf577670c897fdc27ad580c0f)
/hsphere/local/home/c256529/#.org/textpattern/theme/classic/classic.php: 
	r3191 (722c6c7f2c8dbfee5c6cede0af2cd689)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_1.0.0.php: 
	r3047 (cbd20d275bf74184b1112569c2e77f76)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.2.php: 
	r3047 (4c9f8cd5c16bf19ff191ab35f0354e0f)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.3.php: 
	r3047 (6a4af33a23caf950c05faca0e8b4c93b)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.4.php: 
	r3047 (b235e2a27a6e79652ef078f62f73eb21)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.5.php: 
	r2894 (d17a02f48b79dbe6b3b0cf6eb779aadb)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.6.php: 
	r3047 (4d7b21635fbf46058cc539a0eec00561)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.7.php: 
	r3014 (e8ba7dc2892b81ce89b62775e2f5ea17)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.0.8.php: 
	r3057 (d699021db8e7c9f7d32f3ad3631caebc)
/hsphere/local/home/c256529/#.org/textpattern/update/_to_4.2.0.php: 
	r3233 (aec6e4aafa98dbafe75506efd7f85816)
/hsphere/local/home/c256529/#.org/textpattern/update/_update.php: 
	r3275 (e9085d568d49ff7910ffd4eb49bbe293)

------------------------

Last edited by AndrijaM (2009-09-03 15:36:28)

Offline

#4 2009-09-02 16:50:41

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Mail() function not working

Please upgrade to at least TXP 4.0.8.

Offline

#5 2009-09-03 15:39:37

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Mail() function not working

I just upgraded to the latest 4.2.0. Still the same problem. (I updated the diagnostics above).
I guess its server related, but what could it be?

Last edited by AndrijaM (2009-09-03 15:39:57)

Offline

#6 2009-09-03 17:22:08

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Mail() function not working

  • Does this happen with every author you try to add or just specific names and email addresses?
  • Is your ‘site name’ (see admin:preferences) rather long or does it contain non-us-ascii characters (accents, “weird” characters)?
  • Have you specified an SMTP envelope sender address in the preferences? If yes, try removing it. If no, try specifying an email address there.
  • Do you know if your PHP configuration has ‘safe mode’ enabled?

Offline

#7 2009-09-04 14:55:07

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Mail() function not working

Non-ascii characters were the problem. Site name was writen in cyrilic, when I wrote it in latin, everything works with adding the new author. I guess I can swith it back to cyrilic after adding new author.
Thanks!

But I have one more problem, also with emails. Email notification when someone leave a comment does not work (its on in prefs).

I have the same problem on another web site which is on this same server. I tought that the problem was with one plugin, but I dont use that plugin on this site, and I have the same problem.

SMTP envelope? dont know what that is or where it is (I don’t see it in prefs)
Safe mode enabled – I don’t know about that, is it possible that that could cousing the problem with email notification?

Thanks!

Offline

#8 2009-09-04 15:13:15

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Mail() function not working

I’m surprised that a cyrillic site name causes problems (that would be a bug), because the subject is mime-encoded:
  • Can you post the cyrillic sitename here?
  • Is TXP set up with language ‘en-us’ or something else?
  • If you use a very short cyrillic site name, does that solve the email problem?

That may also be the reason why comment email notification isn’t working, because those emails also contain the site name in the subject.

You can find the SMTP envelope sender address on the admin tab -> preferences -> advanced
… but I doubt that’s the problem here and the same goes for safe mode.

Offline

#9 2009-09-05 13:17:42

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Mail() function not working

Well, I guess you can call it a bug then :)

Cyrilic site name was Косово и Метохија , and when I changed it to latin version Kosovo i Metohija, I was able to add another author. I left the latin version, but email notification is still not working (so its not related to this).

I am not sure what do you mean about “en-us” set up. If you mean about the language that is in use in admin, it was english, but I also tried serbian (cyrilic), and still no luck – email notification is not working.

SMTP envelope sender address” – I see it now, there is nothing there.

One more thing thou, I am not quite sure, but earlier this year I changed web hosting company. And I thing that maybe my problems started arround that time. Its been like 5-6 months now that this email notification is not working.

As I said, I have another web site (its the one in my signiture) that is having the same problem. First I thought that is related to the plugin I instaled
rah_comment_spam
because when I uninstalled the plugin, email notifications started to work. But I had to install the plugin again, because I have spam problems.

But, some time ago I received one email notification, even if the plugin is installed. But, later on I had comments on my blog, and I did not received emails.

But on this Kosovo site, I do not have that plugin at all, and its not working again.

I really don’t know what to do …

Last edited by AndrijaM (2009-09-05 13:21:15)

Offline

#10 2009-09-05 13:54:07

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Mail() function not working

Let me try to summarize.

If you use a cyrillic site name, you get an error when adding a new author. I assume the new author is not added. Correct?
If you use a latin site name, you do NOT get an error adding a new author, but the email containing the password is still not sent to the new author. Correct?

What happens if you change the site name to ‘Метохија’ (which is a lot shorter)? Can you then add a new author without getting errors?

If you don’t get errors, but no email is sent, try entering an email address in the SMTP envelope sender address preference. Try various email addresses, but start with a valid one that has your website’s domain name in it (after the @).

Offline

#11 2009-09-05 17:46:37

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Mail() function not working

Hello Andrija,

Textpattern and many of its plugins use the PHP mail function to administer email from the site, like the user, password deal that isn’t working for you. PHP Mail has up to four parameters. The first parameter is the recipient of the message. The second parameter is the subject of the email message. The third parameter is the body of the message. And generally, the fourth parameter is optional, BUT can be the need for a ‘valid domain email address’. Textpattern provides the first three by design. I checked with IX Web Hosts (your hosting company, right?) and confirmed with them that they DO require that 4th parameter. You can provide this by doing as Ruud advised and entering a valid domain email address in the “SMTP Envelope Sender” preference. I hope this helps get you back on the road.

Offline

#12 2009-09-05 18:21:26

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Mail() function not working

@ruud

I’m sorry if I was a bit confuse with my previous post :)

Yes, if I use cyrilic site name (Косово и Метохија) I get an error. New author IS added to the list of authors, but he does NOT receive email with password, so you might as well said that it’s not added.

If I use latin site name, everything works. Email with password is sent, and all is fine.

Funny thing with “Метохија”. When I use just that, everything is fine, new user is added and email is sent. But when I use “Косово и Метохија” error apears again.

If I use only “Косово” it works again (just checked)! Everything is fine! So the problem is when I use more then one cyrilic words in site name.

@joebaich

yes, unfortunately ix web hosting is my hosting (stay away from them), I tried what you suggested and entered email address in SMTP envelope, but email notification from comments are not arriving (did couple of test comments and nothing). I tried two different emails one on Gmail, and one on @sitename but, still nothing.

So adding new author is ok now, but email notification still not working. I guess its probably server (hosting) related? Could it be something with my comments form code?

btw. emails from contact form are working fine, without the need for SMTP envelope

Last edited by AndrijaM (2009-09-05 18:25:30)

Offline

Board footer

Powered by FluxBB