Formbrowser - Fatal Error... Please help!

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Formbrowser - Fatal Error... Please help!

Post by richbothe »

I just installed Formbrowser Version: 0.1 running on CMSMS 1.0.4.  After installing I clicked on "Add New Form Browser" and received this error:


Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/aomam.org/subdomains/staging/httpdocs/modules/FormBrowser/classes/Browser.class.php on line 722


Any suggestions/ideas?

Thanks,
Rich
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

If you're running PHP with a low memory limit (8M), you could try adding

Code: Select all

ini_set("memory_limit", "16M");
near the top of your config.php file to see if it helps. Sometimes low memory can cause wierd isuues.

Nullig
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

How about trying your query like this:

Code: Select all

$busname = $HTTP_POST_VARS['busname'];

$sql = "SELECT * FROM `members` WHERE `bus_name` LIKE '$busname%' ORDER BY last_name";
Nullig
Last edited by Nullig on Wed Apr 04, 2007 7:23 pm, edited 1 time in total.
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

Changing my query to...


$busname = $HTTP_POST_VARS["busname"];

$sql = "SELECT * FROM `members` WHERE `bus_name` LIKE '$busname%' ORDER BY last_name";

gives me the same result.

For $HTTP_POST_VARS["busname"], do I reference the Alias of the form on Formbulder since that's the form that contains the input?

Thanks,
Rich
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

What is the name of the input field?

Nullig
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

the name of the input field is "Business name"...

I tried changing it to that with the same results as above.

I may not be fully understanding of the use of Formbrowser & Formbulder.  Do I need to add both tags to my content?
Last edited by richbothe on Tue Apr 03, 2007 9:40 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

Can you post the form code?
That way we can see what you're actually sending.

Nullig
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

I'm created the form using Formbuilder 0.2.2.

Here's the code is shows for the form...


Search by business name

(Enter partial or whole business name. Use space as separator.)







     

 





I think I will start again and see what comes along the way.  If I have trouble I will be able to explain better & with better understanding.  I may have questions on along the way.

Wish me luck!

Thanks,
Rich
Last edited by richbothe on Tue Apr 03, 2007 11:22 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

Try this:

Code: Select all

$busname = $HTTP_POST_VARS['m5_11']; <- note the single quote
Nullig
Last edited by Nullig on Wed Apr 04, 2007 7:18 pm, edited 1 time in total.
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

I tried that one already and just tried it again... Same result.

Here's my mission:
I have a database on the same server as CMSMS. I'm trying to show the data as results to a search (form)

I've gone back and re created the form (not using Formbrowser currently, not sure exactly what it's for).

Here's the latest setup & issue(s):

Link to form: http://staging.aomam.org/index.php?page ... actitioner

Form name: Business Search
Alias: bus-search
Input field name: busname

I also have a field named "bus_search_handle" with field type "Store results in database" (do I  need this?)


I have added a user-defined tag to process the form.
Name: bussearch_handle

CODE:

//query for business name listing
$busname = $HTTP_POST_VARS["m5_11"];

$sql = "SELECT * FROM `members` WHERE `bus_name` LIKE '$busname%' ORDER BY bus_name";

  //uncomment to see errors
  //echo $sql ."";

$results = mysql_query($sql)
or die(mysql_error("Your search could not be performed at this time."));
$rowcount = 0;
while ($row = mysql_fetch_array($results)) {
$rowcount++;
extract($row);
$bus = false;
if (! empty($last_name)){
$bus = true;
echo "";
  echo $last_name;
echo ", ";
  }
  if (! empty($first_name)){
$bus = true;
  echo $first_name;
echo " - ";
  }
  if (! empty($credentials)){
$bus = true;
  echo $credentials;
  }
if (! empty($bus_name)){
$bus = true;
echo "";
echo "";
  echo $bus_name;
echo "";
  }
if (! empty($interest)) {
$bus = true;
echo "";
echo "Area of Interest: ";
echo $interest;
}
  if (! empty($bus_add)){
$bus = true;
echo "";
  echo $bus_add;
  }
  if (! empty($bus_city)){
$bus = true;
echo "";
  echo $bus_city;
  echo ", ";
  }
  if (! empty($bus_state)){
$bus = true;
  echo $bus_state;
  echo " ";
  }
  if (! empty($bus_zip)){
$bus = true;
  echo $bus_zip;
  }
  if (! empty($bus_phone)){
$bus = true;
echo "";
  echo "Phone: " . $bus_phone;
  }
if (! empty($spl_phone)){
$bus = true;
echo "";
  echo "Phone 2: " . $spl_phone;
  }
  if (! empty($bus_fax)){
$bus = true;
echo "";
  echo "Fax: " . $bus_fax;
  }
if (! empty($bus_cell)) {
$bus = true;
echo "";
echo "Cell: " . $bus_cell;
}
if ($bus == true) {
echo "";
}


$bus2 = false;
if (! empty($bus_name2)) {
$bus2 = true;
echo "";
echo "";
echo $bus_name2;
echo "";
}
if (! empty($bus_add2)) {
$bus2 = true;
echo "";
echo $bus_add2;
}
if (! empty($bus_city2)) {
$bus2 = true;
echo "";
echo $bus_city2;
echo ", ";
}
if (! empty($bus_state2)) {
$bus2 = true;
echo $bus_state2;
echo " ";
}
if (! empty($bus_zip2)) {
$bus2 = true;
echo $bus_zip2;
}
  if (! empty($bus_phone2)){
$bus2 = true;
echo "";
  echo "Phone: " . $bus_phone2;
  }
  if (! empty($bus_fax2)){
$bus2 = true;
echo "";
  echo "Fax: " . $bus_fax2;
  }
if ($bus2 == true) {
echo "";
}
  if (! empty($email)){
echo "";
    echo "Email: " . '' . $email . "";
  }
  if (! empty($url)) {
echo "";
  echo "URL: " . '' . $url . "";
  }

echo "";
}
if ($rowcount == 0) {
echo "";
echo "There are no listings for the letter $letter.";
echo "";
}
echo "";
echo "";

****END CODE****


I also have a page to display the results.
Page name: Business Name Search Results
Alias: search4
Active: yes
Show in menu: no
cachable: no

CODE:

{bussearch_handle}

****END CODE****


Is this even possible or is there a better way?

Thanks,
Rich
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

What about...

Code: Select all

$busname = $_POST['m5_11'];
Nullig
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

I just changed it back to that

//query for business name listing
  $busname = $HTTP_POST_VARS["m5_12"];


I get the same result as described in last post.

Judging by the results that are being displayed it looks as though my php code is wrong or conflicting with CMSMS code?!?
Last edited by richbothe on Wed Apr 04, 2007 4:16 am, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

If your version of PHP has "Register Globals" off (4.2+), $HTTP_POST_VARS won't work.

Try using $_POST instead.

Nullig
User avatar
richbothe
Forum Members
Forum Members
Posts: 95
Joined: Tue Aug 15, 2006 5:34 pm

Re: Formbrowser - Fatal Error... Please help!

Post by richbothe »

My hosts server is running:

PHP Version 4.3.7
register_globals (local value on; master value on)

Here's the link to view the server configuration: http://www.aomam.org/server.php
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Formbrowser - Fatal Error... Please help!

Post by Nullig »

Sorry, misread your post. Try

$busname = $_POST['m5_12']; <- note the single quote

instead of

$busname = $HTTP_POST_VARS["m5_12"];

and see if it works.

Nullig
Last edited by Nullig on Wed Apr 04, 2007 7:18 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”