The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal error: SUHOSIN - Use of preg_replace() with /e modifier
Hi. First I would like to thank you for your AWESOME program. I have been using Formtools for a couple of years and the only problem I have is detailed below.

After logging into Formtools and selecting "View" from the form list then "Edit", I see the first half of the form data but receive the following error message.

Fatal error: SUHOSIN - Use of preg_replace() with /e modifier is forbidden by configuration in /home/****/public_html/formtools/global/smarty/Smarty_Compiler.class.php(270) : regexp code on line 270

My hosting provider has stopped allowing preg_replace() with /e modifier and can't make an exception for me. Is there any patch or workaround available to make formtools work with hosts that don't allow the /e modifier?

Any help would be greatly appreciated.
I may have found a solution to this problem. It seems a lot of hosting companies are blocking /e option in preg_replace for security reasons and it has also been deprecated. I saw recommendations to replace "preg_replace" with "preg_replace_callback". I made the following changes based on some code I found online and it seems to be working for me. At least I am not getting the error message anymore and I can see all my form data. I haven't tested this any further yet so I don't know what unintended consequences may arise. Is anyone else experiencing this issue? Please let me know if this fixes it for you.

File: formtools/global/smarty/Smarty_Compiler.class.php

Replaced line 265
$source_content = preg_replace($search.'e', "'"

$source_content = preg_replace_callback($search.'i', "'"
The error seems to cause problems with setting up emails that are sent when a form is submitted too and the above fix doesn't appear to help with that.

When you go to edit a form and click the email tab then click the edit icon for an email, none of the tabs have a button to update or commit changes that you make. On the "Content " tab the HTML template is gone. The "Test" tab is blank.
Thank you for your good answers, useful.
There is the necessity of different discussions through which you can resolve the errors. Therefore I am suggesting professional essay writing service uk that will give me a long list of all the instructions.

Forum Jump:

Users browsing this thread: 1 Guest(s)