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
Error with both API on external form - 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: Error with both API on external form (/showthread.php?tid=1681)



Error with both API on external form - cpicker - Oct 10th, 2011

Hello,

I am a new user of Form Tools 2.1.4.
My hosting provider is MidPhase.
I am running my site with MODx Revo 2.1.3.

I am able to login to the UI, create internal forms, clients, login with those clients etc.

I have a problem, however, when trying to manage external forms. The following message appears when I attempt to use the API.

Quote:Uh-oh.

Form Tools was unable to make a connection to the database hostname. This usually means the host is temporarily down, it's no longer accessible with the hostname you're passing, or the username and password you're using isn't valid.

Please check your /global/config.php file to confirm the $g_db_hostname, $g_db_username and $g_db_password settings.

The hostname in config.php is localhost, the DB username and password are correct, and since I am able to use the UI I suspect that this message is really indicating some other issue. I have checked the Apache & MODx logs and there is no pertinent data there.

I have also included these DEBUG statements in the config.php:
$g_debug = true;
$g_api_debug = true;
$g_default_error_reporting = "2047";

Unfortunately the only message I get is the one above.

Can you suggest anything else that might help me narrow down the cause?




RE: Error with both API on external form - Ben - Oct 11th, 2011

Hi cpicker,

Ah! I added that in 2.1.0 to completely shut things down in the event of really serious errors that will prevent the script from working at all.

Is your API form on the same host as your Form Tools installation? If not, you'll see that error. Is it on the same website?

Also, how are you including the API? Make sure you're doing a require_once("..."); with the path to the api.php file, and not the URL.

- Ben


RE: Error with both API on external form - cpicker - Oct 11th, 2011

Good morning Ben,

The Form Tools app is installed on the same host & same website, in /ftools.
I am including the API using require_once('full/path/to/api.php') as specified in the docs.

I suspect that FTools and MODx are tripping over each other but I can't seem to get any more info to help isolate the problem.

The DIRECT method works fine but I want to have more flexibility with the submissions both before and after they are created.




RE: Error with both API on external form - Ben - Oct 11th, 2011

Hmm... that's kind of weird! There's really no difference between the way the files are included when you include the API and how the core script does it. The API includes a couple of extra files, but that's pretty much it... curious.

I don't know much about MODx, so maybe you're right.

Any chance you could you get me a temporary FTP account so I could look at it? If so, email me at ben.keen@gmail.com

- Ben



RE: Error with both API on external form - cpicker - Oct 13th, 2011

Howdy Ben,

Have you had a chance to look into this yet? I sent you the info you requested at ben.keen@gmail.com.

Is there any way I can get more specific info about this error? I just need a starting point, I can get the MODx experts involved and maybe track this down and come up with a fix or a workaround.


RE: Error with both API on external form - Ben - Oct 15th, 2011

Hi cpicker,

Ack! I'm so sorry, but I didn't get your email! Try sending me another - or send me a PM with the info; that'll ensure it gets through.

- Ben