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

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

Recommended Posts

  • Newbies
Posted

HI

I'm new to FM PHP API and got stuck right after the first steps.

 

I can open a DB alright:

$fm = new FileMaker();
echo "Verion: ".$fm->getAPIVersion()."<br>n"; // -> 1.1

$fm->setProperty('database', 'Testfile'); 
$fm->setProperty('hostspec', 'http://192.168.0.2'); 
$fm->setProperty('username', 'xxx'); 
$fm->setProperty('password', 'xxx');

$databases = $fm->listDatabases();

 

But the next call fails, for instance:

$layouts = $fm->listLayouts();

 

Here is the error object:

FileMaker_Error Object
(
    [_fm] => FileMaker_Implementation Object
        (
            [V73ee434e] => Array
                (
                    [charset] => UTF-8
                    [locale] => en
                    [logLevel] => 3
                    [hostspec] => http://192.168.0.2
                    [recordClass] => FileMaker_Record
                    [prevalidate] => 
                    [database] => Testfile
                    [username] => xxx
                    [password] => xxx
                )

            [Vea4b3413] => 
            [V9a3dcbce] => 
        )

    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    
 => 802
    [message] => 
    [userinfo] => 
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => /Library/WebServer/Documents/fmx/FileMaker/Error.php
                    [line] => 50
                    [function] => PEAR_Error
                    [class] => PEAR_Error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
                            [1] => 802
                        )

                )

            [1] => Array
...

Any hints what could be wrong and how I could solve the issue?

What's it all about this mysterious PEAR_Error?

And how can I figure out which file is not accessible (as the error msg 802 suggests)?

 

The environment:

OSX Server 10.6.8

FMS 11

 

BTW, I struggled with the installation of PEAR and PEAR-Date.

But now, I can run without problem:

require_once ('PEAR.php');
$now = new Date();

Or is this test inconclusive?

 

I'd very much appreciate any help!!!

I'm getting into serious trouble if I don't get off the ground soon:-(

 

Thanks,

Dieter

Posted

PEAR Error is a module that FileMaker has used in their PHP API to handle error objects, so every error thrown by FM's PHP API will reference it. The important part of the error message is: 802, pretty much everything else from that error object dump can be ignored.

 

The error message that goes with that code is: "Unable to open file", so I would make sure the file is open and hosted on the server and the user account allows access via php.

This topic is 4276 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.