Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4461 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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';

}

?>

Posted

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)

This topic is 4461 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.