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



Form Tools
Including the API causes a 500 server error - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: Including the API causes a 500 server error (/showthread.php?tid=1905)



Including the API causes a 500 server error - kbrown - Feb 17th, 2012

I've got a formtools install with a few forms in it running on my site. A form on a client's site runs through this install. Both sites are on the same server.

The client is getting spammed and wants to add a captcha to their form. My understanding is that you need to be using the API to add a recaptcha (if that isn't the case let me know and I can avoid this problem entirely). To do this I'm trying to convert their form from a direct form to an API form. The problem is that any time I try to include the API on a page on this server it gives me a 500 internal server error any time a go to that page.

What am I doing wrong?


RE: Including the API causes a 500 server error - Ben - Feb 17th, 2012

Weird! Try re-downloading the API, maybe something got corrupted along the way.

But no, you can actually add reCAPTCHA to your post form as described here:
http://docs.formtools.org/tutorials/post_form_captchas/

It's inelegant, to say the least - and takes some work to set up. Still, worth a look at.

- Ben


RE: Including the API causes a 500 server error - kbrown - Feb 21st, 2012

I'm trying going through the instructions you linked to but adding in the block of code from step one of those instructions causes the same server error.

I noticed that the instructions say you can't use a URL in the line that includes the API. Could this be my problem? Since my formtools install is in a different domain I can only link to it with a URL. I'll try setting up a separate install inside the domain I'm working in to see if that fixes things.


RE: Including the API causes a 500 server error - kbrown - Feb 22nd, 2012

Ok, setting up a new install hasn't fixed anything.

After doing step one in the instructions you linked I still get a server error. Here is the code I'm pasting in with the correct path to my api:

<?php
require_once("/formtools/global/api/api.php");
ft_api_start_sessions();
$fields = isset($_SESSION["form_tools_form_data"]) ?
ft_strip_tags($_SESSION["form_tools_form_data"]) : array();
?>