Search

Hi,

I have setup HTML content page, recipients XML page, configured the field and it is not working :(. When I press Send button, the status says “Processing” and the counts are: Total: - Sent: 0 Errors: 0 And it stays like this. Nothing is written in the log.

I have verified that I have cURL, CLI, chell_exec() - what else could it be? My host is on Webfaction.

Thank you, Dima

Hi Dima, some questions:

  1. Have you switched to debug mode and verified that you your content and recipients pages are working fine? (You will have a preview link for your recipient groups in debug mode.)
  2. When you say “nothing in the log”, do you mean the Symphony log or the Email Newsletters log?
  3. Has the folder email-newsletters been successfully created in /manifest/logs/? (If not, the logs folder it is probably not writable for PHP — this might be a problem.)

Hi Michael,

I used debug mode and both content and recipients look ok. The recipients name are in Hebrew - should not be a problem since I use UTF-8.

The folder email-newsletters is not created in manifest/logs. I have set chmod -R 777 manifest and it didn’t help.

Can you take a look in the database? In sym_fields_email_newsletter you will find the field_id of the newsletters field. Then look in sym_entries_data_ID (ID is your field_id) and check if you see an error in the error_message column of the latest entry (last line). And which columns have a NULL value?

I have only 1 entry in symentriesdata_27 - after many attempts it seems strange.

error_message is NULL

columns with NULL value: configxml, errormessage, logfile, contenthtml, contenttext, recmailto, recinvalid, recreplacements, statsrectotal, statsrecsent, statsrecerrors

did I get my config XML wrong? here it is, except the SMTP details:

11TitleWebMeUp NewsletterWebMeUp newsletter

Thank you!

Attached is config xml

Attachments:
config.xml

I have only 1 entry in symentriesdata_27 - after many attempts it seems strange.

If you tried sending the same entry over and over again, this is perfectly right. If you have tried to send several different entries of your section, well, then this would indeed be strange.

But I think we are coming close. configxml shouldn’t be empty. So let’s debug this. Can you edit one line in the extension driver? Please change line 149 to:

    'status' => 'init',

then hit the send button. You may not see anything in the interface now (because this is not a valid status value), but you may look in the database and tell me the value of the status column. It it says ‘init’, well, then I am rather sure that you do not have the PHP CLI installed on your machine. If it says ‘processing’, then the PHP CLI works and we have to do some more debugging…

Please don’t forget to restore the original line:

    'status' => 'processing',

Actually yesterday I deleted some entries so it’s ok I have only 1 now

After the edit and send: The status field is empty

I checked php -v on my host and it gives me some meaningful answer

I am sorry, the database field won’t accept this value. Please try the same using

'status' => 'error',

now the status is error

Ok then the background process does not start correctly. Try and change line 158 from:

shell_exec($cmd);

to

die($cmd);

When you hit send, you should see a command like

env -i php /somepath/.../extensions/email_newsletters/lib/init.php 633 22688 example.com init > /dev/null

Do you see this? There should be 4 parameters: two numbers, your domain and ‘init’.

env -i php /home/netalf/webapps/cmstest/extensions/email_newsletters/lib/init.php 27 72 www.webmeup.co.il init > /dev/null &

the path is correct

OK, try and copy the part before the ‘>’ into your shell:

env -i php /home/netalf/webapps/cmstest/extensions/email_newsletters/lib/init.php 27 72 www.webmeup.co.il init

You might see errors. If you don’t see errors, check your newsletter page (but do not perform a reload in the browser, because it may have remembered the post data — simply access the page normally). What’s the status (in the database) now?

I have to leave now, and this may take some hours. But I will try and be online from time to time!

P.S.: Please delete the row in the database before testing this. Otherwise it might not work.

I removed “env -i” from the beginning of this line and now it works. What was the purpose of this env call?

Thank you very much Michael for your time!

Ah, the env -i part was suggested by skeary because of issues he had with the PHP CLI. Now I am a bit confused which road I should take… In my test environments it works with or without this addition.

I am glad that you found the problem. I will have to do some research and think about if I should release a new version or not. Can you live with the hack at the moment?

Sure I can live with the hack. I really like this extension, starting to realize what kind of things I can build with it.

Thanks a lot, Michael!

You are welcome. I am glad that you like it!

For anyone who wants to use GMails SMTP Server…

You have to use port 465 and SLL encryption. The port can be set in the configuration, for the encryption you have to modify line 257 in ‘lib/class.email_newsletter.php` to

$transport = Swift_SmtpTransport::newInstance($mailer_params['smtp_host'], $mailer_params['smtp_port'] ? $mailer_params['smtp_port'] : 25, 'ssl')

Edit Michael, you’ve got a pull request.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details