[FX.php List] RE: FX and FM14

VanBuskirk, Patricia pvanbuskirk at fsu.edu
Tue Nov 24 06:43:56 MST 2015


Hi Webko!  Thanks so much for your quick and informative reply!

We are using SSL on this site, so I would have assumed I should change the port to 443 and conType to “HTTPS”?  However, when I change those two variables, it doesn’t work.

Also, it doesn’t work when I put the db_config file in with the includes and use the line: include_once('include/db_config.php' ...  BUT it DOES work, if I take the contents of that db_config.php file and put then into the server_test.php file as follows:

                define('DEBUG', true);
                include_once('FX/FX.php');         // FX.php file
                $dbHost='146.201.5.10';                                                //Database Server IP
                $port='80';                                                                                          //Webserver Port
                $dbType='FMPro7';                                                                        //For FMPro7 and above
                $conType='HTTP';                                                                            //Connection Type
                $dbUser='xxxxxx';                                                                           //Database User Name
                $dbPass='xxxxxx';                                                                           //Database Password
                $dbName='Dept_Directory';                                       //Database Name

I’m looking at the contents of the php.ini file now to see if anything jumps out at me.


From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Tim 'Webko' Booth
Sent: Monday, November 23, 2015 4:15 PM
To: FX.php Discussion List <fx.php_list at mail.iviking.org>
Subject: Re: [FX.php List] RE: FX and FM14

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<mailto: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> [mailto: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<mailto: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<mailto: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/5f4f031e/attachment-0001.html


More information about the FX.php_List mailing list