Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

php v.5.3.x

  • pjbauer
  • Topic Author
13 years 4 weeks ago #25 by pjbauer
php v.5.3.x was created by pjbauer
This plugin produces errors when used with PHP v5.3x.

The errors are due to the ereg() function being "depreciated" in PHP v.5.3+. The suggested alternative to use the preg_match() function.

I am no "regular expressions" expert and seem unable to fix this on my own.Could someone please post the corrected corresponding "preg_match()" expressions to use in order to fix the offending lines in SpambotCheckHelpers.php?

line 103: if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $sMailToCheck))
line 115: if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i]))
line 123: if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1]))
line 132: if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$",$domain_array[$i]))

Thank You.

More
13 years 3 weeks ago #26 by Administrator AV
Replied by Administrator AV on topic Aw: php v.5.3.x
Hi pjbauer,

thanks very much for that note. I worked the function over and issued a new release of the plugin. You could download it www.vi-solutions.de/de/downloads/doc_dow...check-fuer-joomla-15 , unzip it and just replace the SpambotCheckHelpers.php.

Or you can fix code your by replacing it with the following lines:

line 103: if (!preg_match("/^[^@]{1,64}@[^@]{1,255}$/", $sMailToCheck))
line 115: if (!preg_match("/^(([A-Za-z0-9!#$%&'*+\/=?^_`{|}~-][A-Za-z0-9!#$%&'*+\/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$/", $local_array[$i]))
line 123: if (!preg_match("/^\[?[0-9\.]+\]?$/", $email_array[1]))
line 132: if (!preg_match("/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/",$domain_array[$i]))

I tested it thoroughly and in worked fine with either php 5.2.x and php 5.3.x

Regards, Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum