fmwebschool.com
Top Experts [learn more]Top 4-10
webko

9743 K
bandmandq

2458 K
Genx

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
June 20, 2013, 04:11:45 AM

Login with username, password and session length
Search:     Advanced search
Welcome to the FileMaker Web Masters Exchange.  If you have any questions about how to use this forum, please watch the getting started movie at:
http://www.fmwebschool.com/movies/forum1/forum1.html
27508 Posts in 6074 Topics by 1524 Members
Latest Member: fmwebster
* Home Help Search Calendar Login Register
+  fmwebschool.com
|-+  PHP Web Publishing Technologies
| |-+  FileMaker PHP, FX.php custom web publishing
| | |-+  Fatal Error: call to undefined function SetDBData()
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Fatal Error: call to undefined function SetDBData()  (Read 1116 times)
jrough
Jr. Member
**
Offline Offline

Posts: 46


« on: October 10, 2009, 04:42:58 PM »

Hi, sorry I'm having trouble getting this going. 
I'm getting this error "undefined function":
"Fatal error: Call to undefined function SetDBData() in /Library/WebServer/Documents/fmquery.php on line 16".  It can't find the FX.php function SetDBData, on line 16,
Below is my whole script.  I can't find any errors.  Could it be the problem is with the FMServer Advanced?  I have the script file in the /Library/WebServer/Documents/.  The database is in /Library/WebServer/Databases.  The path to the required FX.php file is correct.  The database is hosted on FM Server Advanced.  I have the extended priviledges fmxml and fmphp for that account set.  I really don't know what I should check next.  Why is the function not getting called?
thankx,

<?php
require_once('FX/FX.php');
$serverIP = '192.168.1.40';
$webCompanionPort = '80';         
$dataSourceType = 'FMPro9';
$webUN = 'Admin';
$webPW = 'jrough';
$database = 'map_4_.fp7';
$layout = "address";
$dataURLType = "HTTP";

$request = new FX($serverIP, $webCompanionPort, $dataSourceType, $dataURLType);
$request = SetDBData($database,$layout);
$request ->SetDBUserPassword($webUN, $webPW);
$request-> AddDBParam('id',$id);
$result = $fmQuery->FMFind();
$records = $result['data'];


if (strlen($records['linkNext'])< 1) {
  echo "<span class=\"medgraytext\">Next</span>\n";
} else {
  echo '<a href="'.$records['linkNext']."\" class=\"bbody\">Next[/url]\n";   
}

?>
Logged
Michael Petrov
Chief Software Developer
Administrator
Hero Member
*****
Offline Offline

Posts: 4286
Kudos: 15522




Applications:
« Reply #1 on: October 11, 2009, 08:10:54 AM »

It is supposed to be $request->SetDBData() instead of $request = SetDBData(); Since you are calling the function SetDBData on the request object, and not assigning the result of the function to the request object.
Logged

Michael Petrov,
Chief Software Developer
FMWebschool
800.353.7950
michael@fmwebschool.com
Keep up with our development, follow me on Twitter
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!