Trouble with email sending in ModX Revolution via FormIt - email

There is a trouble with email sending in Modx Revolution. Using FormIt plugin, I tried to enable Gmail SMTP at Modx settings list, but the same result. Now SMTP is disabled.
Using this FormIt call:
[[!FormIt?
&hooks=`email,redirect`
&redirectTo=`19`
&redirectParams=`{"success":"1"}`
&emailTpl=`feedbackEmailTpl`
&emailSubject=`New request from [[++site_name]]`
&emailTo=`***#gmail.com`
&emailToName=`Support`
&emailReplyTo=`***#gmail.com`
&emailFrom=`***#gmail.com`
&emailFromName=`***#gmail.com`
&errTpl=`<span class="label label-warning">[[+error]]</span>`
&validate=`
name:required:stripTags,
clientemail:email:required,
message:required:stripTags
`
&clearFieldsOnSuccess=`1`
&validationErrorMessage=`Error.`
]]
In error.log file:
[2015-06-02 10:33:37] (ERROR # /var/www/site/core/model/modx/mail/phpmailer/class.phpmailer.php : 893) PHP warning: preg_match(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 728
[2015-06-02 10:33:37] (ERROR # /var/www/site/core/model/modx/mail/phpmailer/class.phpmailer.php : 893) PHP warning: preg_match(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 728
[2015-06-02 10:33:37] (ERROR # /index.php) [FormIt] Произошла ошибка при попытке отправить почту. Пожалуйста, введите хотя бы один адрес e-mail получателя.
What can be wrong? Is this trouble bound to PHPMailer?

This is a PHP bug that affects PHP 5.5.25 and 5.6.9 when run using mod_php with apache. There are a few workarounds until it's fixed in PHP.
Downgrade PHP to 5.5.24 or 5.6.8
Switch to PHP-FPM instead of mod_php (which is a good idea anyway)
Override the PHPMailer class and change the default email validation method to 'php'.
This last method would be done like this:
class myMailer extends PHPMailer
{
public static function validateAddress($address, $patternselect = 'php')
{
return parent::validateAddress($address, $patternselect);
}
}
Then use that subclass instead of the plain PHPMailer class.
The same bug has been affecting various other PHP projects such as Typo3 and SwiftMailer. The bug to track it in PHPMailer is here.

Related

PHP startup error using CodeIgniter 3

I am getting tbe following error intermittently on my website
A PHP Error was encountered
Severity: Core Warning
Message: PHP Startup: Invalid library (appears to be a Zend Extension, try loading using zend_extension=opcache.so from php.ini)
Filename: Unknown
Line Number: 0
Backtrace:
I am using LAMP with PHP7 and the CodeIgniter installation is standard. The error has no file nor line to investigate, but my host ensures me that the server is correctly configured.
What could be causing this? I cannot even find a reference to opcache in the CodeIgniter 3 source code. (application files are very basic MVC brochureware stuff, so it's nothing the app has added)

Empty pagetree in TYPO3 7.2 backend

I am setting up a web portal using TYPO3 version 7.2. I successfully installed TYPO3 following this article on a Red Hat 4.8.2-16 machine. Everything worked fine and I created some pages until for some reason the pagetree didn't show any content any more. So now the backend looks like this http://goo.gl/3p0uQn
My browsers debug console only returns this error:
TypeError: TYPO3ViewportInstance.DebugConsole is null backend.php:79:5
but I have no idea if this is related to the empty pagetree.
This occurs on Firefox, Chrome and IE, so I guess it has nothing to do with the browser.
Also, I am logged in as an admin so it should not be due to wrong access rights.
Does anybody know what's going on there?
UPDATE:
The TYPO3 Log gives me some PHP Warnings
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Http/AjaxRequestHandler.php line 255
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Http/AjaxRequestHandler.php line 250
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Core/Bootstrap.php line 1193
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 439
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 438
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 425
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 424
UPDATE 2
Meanwhile I installed 7.2 completely fresh (even with a new database) and I still get an empty pagetree. I also tried 6.2 LTS, but also here, no pagetree. I'm beginning to think that there is a problem with my PHP settings. Im using PHP 5.6.9 and MariaDB 10.0.19.
Try tu put that on your php.ini :
always_populate_raw_post_data = -1
It worked for me.
Have a nice day.
Raf
You have a PHP error somewhere. Please check your webserver log or php log for error messages. You can also show the error messages by choosing the development preset in the Install Tool or by setting the context environment variable to Development.
Make sure to clear the cache via Install Tool at least once (Important Actions).

Unable to find the socket transport "ssl"

I'm trying to figure out "why" I'm getting an error message from the Joomla 3.X component Gcalendar (google calendar). The error message is below.
Error Unable to Connect to ssl://www.google.com:443. Error
#-912967449: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
I have read several other threads on here and other sites but most outline 'how' to enable/install/etc... SSL. I've copied/pasted the info.php data into a google doc here. Everything dealing with SSL is labeled as 'on' or 'installed.
The server is not 'public' right now, it is only available from within the school district's network. Could this be the reason for the problem?
Any ideas anyone?
ssl://www.google.com:443
should be
https://www.google.com:443
I just had this error as well. In my case it was because I was working locally, not on the live site. Once I put it live, it worked fine. Just putting this here in case anyone else comes across the same thing.
Install OpenSSL module for php:
1. In the php.ini file,
add this line "extension = php_openssl.dll"
2.Make sure that the folder "ext" have this dll,
if not then add the desired version.
Установить для php модуль OpenSSL:
1)В файле php.ини,
добавь строку "extension=php_openssl.dll"
2) Убедись что в папке "ext" есть эта dll,
если нет то добавте необходимой версии.

symfony2 php codesniffer standard error

I'm new to phpCodeSniffer and I'm trying to integrate it with eclipse. I've downloaded phpCodeSniffer from PEAR following these instructions, and I also downloaded Symfony2 standards from Github and the php-cs-fixer. I followed all the instructions and everything works fine, but when I try to use the sniffer with eclipse I get the following error:
/usr/bin/php -c /tmp/zend_debug/session7507717624755069136.tmp -d asp_tags=off -d short_open_tag=on /opt/eclipse/plugins/org.phpsrc.eclipse.pti.tools.codesniffer_1.3.0.R20111119000000/php/tools/phpcs.php --report=xml --standard=/usr/share/php/PHP/CodeSniffer/Standards/Symfony2 --tab-width=4 /var/www/siga-nuevo/src/Siga/UserBundle/Controller/UserController.php
PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff Symfony2.Commenting.FunctionComment.MissingParamComment does not exist' in /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php:814
Stack trace:
0 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php(730): PHP_CodeSniffer->_expandRulesetReference(Object(SimpleXMLElement))
1 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php(623): PHP_CodeSniffer->getSniffFiles('/usr/share/php/...', 'Symfony2')
2 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php(438): PHP_CodeSniffer->setTokenListeners('/usr/share/php/...', Array)
3 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer/CLI.php(551): PHP_CodeSniffer->process(Array, '/usr/ in /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php on line 814
This is my eclipse configuration:
It looks like the OpenSky symfony2 standards are broken in your case. The relevant part of the error message is this one:
Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff Symfony2.Commenting.FunctionComment.MissingParamComment does not exist'
As symfony follows all the current PSR standards - namely the PSR-0, PSR-1, PSR-2 and PSR-3 (of which PSR-3 provides just the logger interface which monolog respects).
You can aswell directly use the PSR-2 standard included with newer Versions of PHPCS.
The PSR-2 standard implementation in PHPCS has been updated recently - opposite to those old symfony2 standards. Which means the implementation should be more accurate anyway.

Wicket warning allow_url_include=On

From time to time I get the following warning in the logfile of my Wicket application:
04.10.2012 14:52:08,525 WARN [org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper]
Unknown listener interface 'd allow_url_include=On '
What does that mean and how do I fix it? I tried Google, but I could only find results for the PHP configuration allow_url_include.
I'm using Wicket 6.0.0
Most likely an automated tool tries to exploit some PHP application. Wicket can't handle this request and prints the warning. Look in the access log what HTTP requests hit your server at this timestamp to see which request caused this warning.
It's safe to ignore this warning in this case.