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
/showthread.php 26 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
/showthread.php 26 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
/showthread.php 26 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
/showthread.php 26 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
/showthread.php 26 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
/showthread.php 26 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
/showthread.php 137 forum_permissions
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 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
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 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
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 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
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 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
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 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
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 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1952 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1952 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 629 mark_thread_read
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
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_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
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_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.1.27 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1533) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 79 errorHandler->error
/showthread.php 1533 eval



FORUMS


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
RE: Test install: warnings & fatal error api - SOLVED
#1
I created a form and thankyou page in dreamweaver. They have been ftp'd and reside at: http://www.mywebsite.com/forms/myfolder/myform.php and
http://www.mywebsite.com/forms/thankyou.php

I logged into Form Tools Admin as admin and tried to set up the form thusly:
Add Form --> External Form (Option 2. Code — using the Form Tools API) -->

In the add form dialog sequence in Form Info, I entered myform.php as form name
chose "no" to 'is form multi-page form' because I have a single page form
and added this url in the 'Form URL' :
http://www.mywebsite.com/forms/myfolder/myform.php indicating form has public access. My 'forms folder has '755' permissions: public can read & execute.

When I click 'Check URL' I get the following warnings & errors:

Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/myserverloginid/public_html/forms/myfolder/myform.php on line 2

and

Warning: require_once(http://www.mywebsite.com/form_tools/global/api/api.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/myserverloginid/public_html/forms/myfolder/myform.php on line 2

and

Fatal error: require_once() [function.require]: Failed opening required 'http://www.mywebsite.com/form_tools/global/api/api.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myserverloginid/public_html/forms/myfolder/myform.php on line 2


This is the php test code I added to myform.php

<?php
require_once("http://www.mywebsite.com/form_tools/global/api/api.php");
$fields = ft_api_init_form_page("", "test");
?>

and this is the code I added to thankyou.php

<?php
require_once("http://www.stgeorgesinthepines.org/form_tools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>

I have ***NOT*** included the finalize code yet to myform.php:

"finalize" => true

or the close session code on thankyou.php:

<?php
require_once("path/to/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>

I get the same messages if go directly to the url of my form:
http://www.mywepage.com/forms/myfolder/myform.php

I have changed permissions on the default/cache folder in themes to '777'

my 'forms' folder where the forms reside has '755' permissions: public can read & execute.

config.php looks like this:

<?php

// main program paths - no trailing slashes!
$g_root_url = "http://mywebsite.com/form_tools";
$g_root_dir = "/home/myserverloginid/public_html/form_tools";

// database settings
$g_db_hostname = "localhost";
$g_db_name = "mydb_forms";
$g_db_username = "myuserloginid_forms";
$g_db_password = "mypassword";
$g_table_prefix = "ft_";

?>

If anyone has a moment to help me sort this I'd greatly appreciate it.

Thank you.

(Sorry, add code function does not seem to be working for me n this forum.


Reply
#2
I think I have this solved. After searching and searching I found a thread here:
http://forums.formtools.org/showthread.p...is+invalid

In a response to another users post, MrGarvin posted an example of how a correct config.php should be set up. Should look like this:

<?php

// main program paths - no trailing slashes!
// The root url is the exact web adress to your formtools folder.
// Root dir is the exact folder adress on your server. This is just an example. Ask your provider for the correct address if in doubt.
$g_root_url = "http://www.website.com/formtools";
$g_root_dir = "/Applications/MAMP/htdocs/webfolder/formtools";

// database settings.
$g_db_hostname = "localhost";
$g_db_name = "mydatabase";
$g_db_username = "root";
$g_db_password = "root";
$g_table_prefix = "ft_";

?>

The path in $g_root_dir did not look like the info I had in my config.php file and the odd (to me) looking path reminded me of a cool php script that returns a path to any folder on your server.

I uploaded the php script and determined that my correct $g_root_dir path to Form Tools looks like this:
"/home/myftplogin_name/public_html/form_tools"

I updated my config.php file with that info and I'm now getting through my test install now so I think I'm going to be ok.

A note to users who may stumble upon THIS thread needing help identifying their path to Form Tools. The path can look different on different servers and different hosting companies so I would suggest using this script:

<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
?>

Save that code as fullpath.php and upload it to your Form Tools directory. Access the file by going to: http://www.yourwebsite.com/formtools/fullpath.php and the script will return the correct path for your config.php file. It will also give you the path to .htpasswd if that helps you in any way.

At least this worked for me.

Thnks to MrGarvin for the contribution on the other thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)