The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Fatal error: SUHOSIN - Use of preg_replace() with /e modifier - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Fatal error: SUHOSIN - Use of preg_replace() with /e modifier (/showthread.php?tid=2728)



Fatal error: SUHOSIN - Use of preg_replace() with /e modifier - gttjohnj - Nov 14th, 2013

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.


RE: Fatal error: SUHOSIN - Use of preg_replace() with /e modifier - gttjohnj - Nov 22nd, 2013

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', "'"

with
$source_content = preg_replace_callback($search.'i', "'"


RE: Fatal error: SUHOSIN - Use of preg_replace() with /e modifier - gttjohnj - Dec 2nd, 2013

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.



RE: Fatal error: SUHOSIN - Use of preg_replace() with /e modifier - Desy231 - Dec 4th, 2017

Thank you for your good answers, useful.


RE: Fatal error: SUHOSIN - Use of preg_replace() with /e modifier - John Moffatt - Mar 16th, 2020

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.