Support et annonces PhpMyNewsLetter.
Vous n'êtes pas identifié(e).
Pages :: 1
Hello,
The demo seemed great, but when I try to install phpMyNewsletter 2.0.4 on my site, I get the following error:
Parse error: syntax error, unexpected T_FUNCTION in /home/u202132/[...]/www/newsletter/include/lib/pmn_fonctions.php on line 115
I use personal hosting, the OS is Linux I believe. Php version 5.2, mysql 5.6. Any advice?
Thanks in advance!
*Sorry for not using french*
Hors ligne
Hello and welcome on this board.
I hope i'll be able to able to help despite my english...
So, you've got this error because you're on php 5.2, and phpmynewsletter requires at least php 5.3 as specified here :
https://www.phpmynewsletter.com/documen … #prerequis
The key word php 5.2 doesn't undersand is 'use' in the function :
function build_sorter($key) {
return function ($a, $b) use ($key) {
return strnatcmp($a[$key], $b[$key]);
};
}
Please, upgrade (the best is to go directly to php 5.6 if you can, and better php 7.1).
And enjoy !
Arnaud
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
Thanks, Arnaud!
We've upgraded the php just like you said, and the installation went OK.
Well, phpmynewsletter works like a charm, but we have a very strange bug.
There's one particular letter in russian alphabet, "Р", graphical analogue in latin: P. It looks totally fine in every preview inside phpmynewsletter, but when the preview actually arrives to the test mailbox, all such letters turn into either question marks, or disappear completely from the text.
This thing only happens to this single letter in russian alphabet, not any other one. Moreover, it happens only to the capitalised version of it.
Do you have any ideas what may be the cause of this?
Many thanks in advance!
Dernière modification par noircat (05-04-2017 11:09:55)
Hors ligne
Hello noircat,
Happy for you !
For encoding, i think you should select windows-1251 in (global conf, shipments management) and check encode this mail before sending, when you compose (first step).
Try it and tell me, i'm not really sure
(P seems to be лалалала in CP855, but russian should be windows-1251)
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
Ok, I've selected windows-1251, checked mail encoding. The result looked ok in phpmynewsletter, however in test mailbox it looked like (see the image).
I believe, that's because most of the mail services default to utf-8 these days. And when sending in utf-8 (both with mail encoding and without mail encoding) this capital "Р" becomes corrupted. According to http://jrgraphix.net/r/Unicode/0400-04FF it is number 0420, if this information may be of any use.
I have one more clue myself: this may be connected to the way MySQL database handles the storing of russian text, but I'm not competent in these things.
Thanks!
Dernière modification par noircat (05-04-2017 12:36:35)
Hors ligne
And what is your encode storage ?
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
In phpmyadmin the "Comparison" column for all PMN tables is set to "utf8_general_ci". The default value for new tables in this database is "cp1251_general_ci".
For our old site all tables (in separate base) are set to "cp1251_general_ci".
The type is always "MyISAM", if that's important.
Hors ligne
OK, should be "cp1251_general_ci"...
Not implemented in install.php.
You could try a new install ad move manually all tables and fiels into cp1251_general_ci, and after, into include/db/db_connector.inc.php change UTF8 line 14 by cp1251
I should implement it...
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
Made the separate new installation of PMN 2.0.4. All tables are manually turned into cp1251_general_ci in phpmyadmin. Line 14 of db_connector.inc.php now looks like:
$cnx->query("SET NAMES CP1251");
In PMN's global configuration section encoding is set to windows-1251. Whenever I save some text in russian e.g. list name, I get all characters shown as ??? in PMN.
Tried to type in russian sender name directly into phpmyadmin, looks even more puzzling:
Dernière modification par noircat (05-04-2017 14:33:38)
Hors ligne
How is it in database for name of list ?
Since 2 hours i'm reading docs about your prob, and all says to encode with utf8...
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
Name of the list is all ??? in phpmyadmin.
Sender name is ok, since I tried to type it in phpmyadmin directly in russian.
Many thanks for your persistance, Arnaud! For now we're auto-replacing all russian capital "Р"'s with english capital "P"'s for our current newsletters
But the whole problem with p's and russian encodings is very intriguing.
Please excuse me, but I have to take a small break for now, since the work time is nearly over.
Keeping in touch!
Hors ligne
ok !
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
I placed .htaccess with the following code into the root folder of the new installation and it fixed the issue with question marks instead of russian letters inside the admin panel:
AddDefaultCharset UTF-8
I'll test capital "p"'s now.
Hors ligne
Wonderful !
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
The problem with question marks however is still present.
I've got an idea. Could we perhaps specify the page encoding with meta tag in compose stage? Because in phpmyadmin I see ??? for all of the russian text entered during the compose stage. While list settings are now stored in actual russian in the database.
Hors ligne
Done with utf8
Je prends le temps de créer un outil pour tous, de niveau professionnel, mais simple !
Il n'est pas encore parfait, soyez indulgents, ça vient...
Si vous avez des questions, n'hésitez pas ! Mais soyez précis pour une réponse plus rapide
Hors ligne
Pages :: 1