mountainx Posted September 6, 2012 Posted September 6, 2012 Hey all, I have been tasked with a little bit of a problem. PHP is not my primary language, so I'm getting up to speed, and I know little of FileMaker. I understand I need the FileMaker.php and related folder containing the API. I have verified the permissions on Filemaker. i.e. Extended privileges, FMPHP assigned, etc. I have db name, username, password, db server I wanted a simple script that tells me yes/no I am connected to a database. Something like: 1. setup connection (with FileMaker.php require once) 2. Echo yes/no, I am connected to the database, show error info if "no" I searched the forums, and google and have not found something that works in the context of one simple file. I think once I can confirm I can/cannot connect I can begin troubleshooting permissions, etc. Thanks so much in advance for your help! DM
doughemi Posted September 6, 2012 Posted September 6, 2012 try: <?php error_reporting(E_ALL &~E_DEPRECATED); include('filemaker/FileMaker.php');//edit to show correct path to FileMaker.php $fm=new FileMaker('yourDB', 'yourURL', 'yourUsername', 'yourPassword'); $connection = $fm->listLayouts(); if(FileMaker::isError($connection)){ echo 'Database Error: ' . $connection->getMessage(); } else { echo 'Connection established'; } ?>
dansmith65 Posted September 6, 2012 Posted September 6, 2012 Your in luck - what you are asking for comes with FileMaker Server. Open your server page in a web browser and review the links at the bottom http://localhost:16000 (use that link from the filemaker server, otherwise replace localhost with your servers ip/domain)
Recommended Posts
This topic is 4717 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now