[FX.php List] RE: FX and FM14

Tim 'Webko' Booth tim.webko at gmail.com
Mon Nov 23 14:14:48 MST 2015


Here's a simple test file I use for basic testing.

And the connections file can live anywhere - if they can read the contents
of that file, you have larger problems. Try and see what this one contains:
http://apachescricket.com/include/db_config.php

Servertest.php
<?php

// include_once('db_config.php'); // DataBase Configuration File.
// Insert valid hostname, user, password, database name and layout in the
database (lines 5, 9, 10, 11 & 24)
$dbHost='192.X.X.X'; //Database Server IP
$port='80'; //Webserver Port
$dbType='FMPro7'; //For FMPro7 and above
$conType='HTTP'; //Connection Type
$dbUser='user'; //Database User Name
$dbPass='password'; //Database Password
$dbName='DatabaseName'; //Database Name

include_once('include/FX/FX.php'); // FX.php file

//Simple server tests
$_SESSION['serverError'] = ""; // reset server error
//Check if Port 80 works at all
if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) {
$_SESSION['serverError'] = "Server not up";
} else {
//Check if a findany to an available table works
$pageObj=new FX($dbHost,$port,$dbType,$conType);
$pageObj -> setDBPassword($dbPass,$dbUser);
$pageObj -> setDBData($dbName,'VALID LAYOUT NAME', 'all');
$pageData = $pageObj -> FMFindAny();
$_SESSION['serverError'] = $pageData['errorCode'];
}
if ($_SESSION['serverError'] != "0") {
echo "Error: ".$_SESSION['serverError'];
}
?>

On 24 November 2015 at 05:47, VanBuskirk, Patricia <pvanbuskirk at fsu.edu>
wrote:

> Calling all FMS14/FX.php users on Windows Server 2012 O/S!
>
>
>
> I am at my wits end here.  I’ve tried everything I can possibly think of,
> as has our Windows server admin, and all we get with our web pages is:
>
> “The page cannot be displayed because an internal server error has
> occurred.”
>
>
>
> ·         Per a prior suggestion, I moved all of our (previously working
> fine) php forms to the folder under E:\Program Files\FileMaker\FileMaker
> Server\HTTPServer\conf
>
> ·         I moved the includes  and FX folders from the Web Publishing
> folder, where it has been residing to also be under that folder.  I then
> changed the pointer in the php.ini file.
>
> ·         If I use pure php in the file, it comes up just fine (ie.
> https://its-fmp-02.its.fsu.edu/index.php), but when I start trying to use
> FX commands or to connect to a database (ie.
> https://its-fmp-02.its.fsu.edu/Forms/TSR/Test.php), it throws the
> aforementioned error (which is basically useless).  Even with the
> define('DEBUG', true); line included, I get that generic error.  Can’t find
> any reference in any of the logs (unless I’m not looking at the correct
> ones)
>
> ·         I have made sure XML and odbc are turned on and have
> permissions set in the databases.
>
>
>
> Has anyone had similar issues that can direct us as to what to check for
> and maybe some debugging code to throw in there to see if it’s actually
> finding the FX and include folders or reading the databases and to narrow
> down my problem(s)?
>
>
>
> Some questions:
>
> ·         Does IIS still need to be on the server, or does FMS take over
> serving the pages now?
>
> ·         What file structure are you using that works?
>
> ·         Where do you store your connection info file (server_data.php)
> to where it is not susceptible to hacking?
>
>
>
> Trish
>
>
>
> *From:* fx.php_list-bounces at mail.iviking.org [mailto:
> fx.php_list-bounces at mail.iviking.org] *On Behalf Of *VanBuskirk, Patricia
> *Sent:* Monday, November 9, 2015 1:32 PM
> *To:* FX.php_List at mail.iviking.org
> *Subject:* [FX.php List] FX and FM14
>
>
>
> Hi group,
>
>
>
> We are upgrading to FMP14, and I am having trouble getting my custom web
> pages to work (something to do with the port being used by WebDirect).  At
> this point, I’m just moving some test pages over to the folder where the FM
> Databases web page exists, but having trouble connecting  to the databases.
>
>
>
> My question at this time is concerning the syntax in the connections.  Has
> the following line changed with v14?
>
>
>
>           $InstanceName = new FX('127.0.0.1', 591, 'FMPro7', 'HTTPS'); //
> to connect to FM7SA using HTTPS
>
>
>
> Any assistance will be greatly appreciated!!
>
>
>
> Trish V.
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20151124/f06bd234/attachment-0001.html


More information about the FX.php_List mailing list