Formbrowser - Fatal Error... Please help!
Formbrowser - Fatal Error... Please help!
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
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
Re: Formbrowser - Fatal Error... Please help!
If you're running PHP with a low memory limit (8M), you could try adding
near the top of your config.php file to see if it helps. Sometimes low memory can cause wierd isuues.
Nullig
Code: Select all
ini_set("memory_limit", "16M");
Nullig
Re: Formbrowser - Fatal Error... Please help!
How about trying your query like this:
Nullig
Code: Select all
$busname = $HTTP_POST_VARS['busname'];
$sql = "SELECT * FROM `members` WHERE `bus_name` LIKE '$busname%' ORDER BY last_name";
Last edited by Nullig on Wed Apr 04, 2007 7:23 pm, edited 1 time in total.
Re: Formbrowser - Fatal Error... Please help!
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
$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
Re: Formbrowser - Fatal Error... Please help!
What is the name of the input field?
Nullig
Nullig
Re: Formbrowser - Fatal Error... Please help!
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?
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.
Re: Formbrowser - Fatal Error... Please help!
Can you post the form code?
That way we can see what you're actually sending.
Nullig
That way we can see what you're actually sending.
Nullig
Re: Formbrowser - Fatal Error... Please help!
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
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.
Re: Formbrowser - Fatal Error... Please help!
Try this:
Nullig
Code: Select all
$busname = $HTTP_POST_VARS['m5_11']; <- note the single quote
Last edited by Nullig on Wed Apr 04, 2007 7:18 pm, edited 1 time in total.
Re: Formbrowser - Fatal Error... Please help!
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
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
Re: Formbrowser - Fatal Error... Please help!
What about...
Nullig
Code: Select all
$busname = $_POST['m5_11'];
Re: Formbrowser - Fatal Error... Please help!
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?!?
//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.
Re: Formbrowser - Fatal Error... Please help!
If your version of PHP has "Register Globals" off (4.2+), $HTTP_POST_VARS won't work.
Try using $_POST instead.
Nullig
Try using $_POST instead.
Nullig
Re: Formbrowser - Fatal Error... Please help!
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
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
Re: Formbrowser - Fatal Error... Please help!
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
$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.

