The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
500 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: 500 error (/showthread.php?tid=1741)



500 error - filch - Nov 8th, 2011

Ben,

I am having a battle with a 500 error off http://www.thirdvoice.ca. I have run the system check and all is good. The table is id 15 and that is what is being passed to the API, at least I am pretty sure it is.

Any wisdom you can pass on?

Dave


RE: 500 error - Ben - Nov 10th, 2011

Hey Dave,

I'm pretty sure it's the form ID... glancing over the code, I can't see why it would be anything else.

An easy way to test is do some echo $form_id;exit; lines right before the API function calls to double check that the $form_id data you're passing contains what you think it does.

Feel free to post the code on the page, if you like.

- Ben


RE: 500 error - filch - Nov 10th, 2011

[attachment=162]That's just the thing Ben, I am not passing a form id to the page from anywhere other than the normal formtools code at the top of the page, as this is on the home page. When I put in the code to echo the id, it shows me a blank page because there is no form id. So I really do not see where is is getting passed and id other than from the normal code:

Code:
<?php
require_once("/home/zuka/public_html/support/formtools/global/api/api.php");
//ft_api_delete_unfinalized_submissions(15, false);
$criteria = array("email" => $_POST["email"]);
$fields = ft_api_init_form_page(15);
ft_api_start_sessions();
$fields = isset($_SESSION["form_tools_form_data"]) ?
  ft_strip_tags($_SESSION["form_tools_form_data"]) : array();
$params = array(
  "submit_button" => "submit",
  "next_page" => "subscribe-thanks.php",
  "form_data" => $_POST,
  "finalize" => true
    );
ft_api_process_form($params);
?>

Form with id 15 does exist ( see attached ) so I do not know what is causing the error.

Dave


RE: 500 error - Ben - Nov 12th, 2011

Very curious! There's definitely something strange going on.

First off, why are you calling ft_api_start_sessions() after the ft_api_init_form_page() call? The second function will automatically set up sessions, so the second one may overwrite the first and lose whatever's already set. It shouldn't be necessary and could only cause problems.

Digging a bit deeper in the code, I see that the 500 error is thrown in the ft_api_create_blank_submission() function, which is called by the ft_api_init_form_page() function. So for some reason, the following line is failing. It's saying that the form ID of 15 doesn't exist.

Code:
if (!ft_check_form_exists($form_id))

Have you modified the API code at all?



RE: 500 error - filch - Nov 12th, 2011

(Nov 12th, 2011, 11:56 AM)Ben Wrote: Very curious! There's definitely something strange going on.

First off, why are you calling ft_api_start_sessions() after the ft_api_init_form_page() call? The second function will automatically set up sessions, so the second one may overwrite the first and lose

Truthfully I don't remember as this page is from an older installation now being used with an updated FT. We might have been trying to print out some values being passed or perhaps trying to get rid of all the null dB entries. Not really are Ben but I know this was working. And no, I have not modified the API

Cheers

Dave

whatever's already set. It shouldn't be necessary and could only cause problems.

Digging a bit deeper in the code, I see that the 500 error is thrown in the ft_api_create_blank_submission() function, which is called by the ft_api_init_form_page() function. So for some reason, the following line is failing. It's saying that the form ID of 15 doesn't exist.

Code:
if (!ft_check_form_exists($form_id))

Have you modified the API code at all?




RE: 500 error - filch - Nov 20th, 2011

(Nov 12th, 2011, 12:17 PM)filch Wrote:
(Nov 12th, 2011, 11:56 AM)Ben Wrote: Very curious! There's definitely something strange going on.

First off, why are you calling ft_api_start_sessions() after the ft_api_init_form_page() call? The second function will automatically set up sessions, so the second one may overwrite the first and lose

Truthfully I don't remember as this page is from an older installation now being used with an updated FT. We might have been trying to print out some values being passed or perhaps trying to get rid of all the null dB entries. Not really are Ben but I know this was working. And no, I have not modified the API

Cheers

Dave

whatever's already set. It shouldn't be necessary and could only cause problems.

Digging a bit deeper in the code, I see that the 500 error is thrown in the ft_api_create_blank_submission() function, which is called by the ft_api_init_form_page() function. So for some reason, the following line is failing. It's saying that the form ID of 15 doesn't exist.

Code:
if (!ft_check_form_exists($form_id))

Have you modified the API code at all?

Truthfully I don't remember as this page is from an older installation now being used with an updated FT. We might have been trying to print out some values being passed or perhaps trying to get rid of all the null dB entries. Not really are Ben but I know this was working. And no, I have not modified the API

Cheers

Dave