Jump to content

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

Recommended Posts

Posted

I have a problem using a different account for my cwp(other than admin account). at the moment i can use fx php using either of the below step to choose the account.

Code:

$result->SetDBPassword('bandwagon','admin');

$result->SetDBUserPass('admin','bandwagon');

i now create a new account for my filemaker database, called 'web', which uses the same privilege set as the 'admin' account. this time when i try to use 'web' account with:

Code:

$titles->SetDBPassword('','web');

i get Errorcode- 100:File is missing error in the browser. does anyone know where i am getting it wrong. why is it saying file is missing, when i have provided it with a username and password

another issue i can't get around is, if i create a filemaker database which uses a default account so that it doesnt ask me for a password each time i open the file, do i still have to specify a user account in fx.php?

thanks for any input.

Posted

I'd try giving your web account a password, and then passing that password to FM via your php page. I just have a password variable that gets included as part of my header file. Never have a problem.

Hope that helps,

Dan

Posted

thanks dan

i tried your way, but i still get error100: file missing

its frustrating.i don't know why its refusing to work when the file is setupt correctly

Posted

I've had a similar problem where I didn't declare the username/password of the fp7 I was connecting to. I got a PHP error, "Warning: Cannot use a scalar value as an array" on my foreach() line. I fixed it when I properly declared the u/p "$search->SetDBPassword('user','pass');"

Are you calling the right db and layout? (I get your error when I don't do this)

Are you passing the right u/p?

Are you sure the account has privileges for the layout your requesting?

Sometimes the easy things are missed when we're knee-deep in the code :

I'm not sure about your second question because I have u/p for all my databases. I assume it FX.php would let you access blank values for each though.

Hope this helps...

Shannon

Posted

hi,

I am using the following code to get the basic connectivity of PHP4.3.9 and filemaker 7 .I am running both at my local machine (Windows XP).

<?php

$serverIP = '127.0.0.1';

$webCompanionPort = '80';

$scheme = 'http';

if( !isset($_SERVER['PATH_TRANSLATED']) )

{

if(isset($_SERVER['SCRIPT_FILENAME']))

$_SERVER['PATH_TRANSLATED'] =$_SERVER['SCRIPT_FILENAME'];

else

$_SERVER['PATH_TRANSLATED'] =realpath('install.php');

}

if (! isset($_SERVER['DOCUMENT_ROOT'])) {

global $DOCUMENT_ROOT;

global $HTTP_SERVER_VARS;

$_SERVER['DOCUMENT_ROOT'] = str_replace(str_replace('', '/', $_SERVER['PHP_SELF']), '', str_replace('', '/', $_SERVER['PATH_TRANSLATED'])) . '/';

$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];

}

include_once("/inetpub/wwwroot/FX7/FX.php");

include_once("/inetpub/wwwroot/FX7/server_data.php");

$instanceName = new FX('127.0.0.1',$webCompanionPort);

$instanceName->setDBData('Tester.fp7','Main_View');

$instanceName->SetDBUserPass('','');

$ReturnedData = $instanceName->FMView(); // stores layout information in $ReturnedData

foreach ($ReturnedData['valueLists'] as $key => $value) {

foreach ($value as $key1 => $value1) {

$valuelistData[$key] .= "t<option value="$value1">$value1</option>n";

}

echo "<select name="$key">n";

echo $valuelistData[$key];

echo "</select>n";

echo "<br />n";

}

?>

But each time it is giving me following error:-

Warning: Cannot use a scalar value as an array in C:InetpubwwwrootBuddysystesttest5.php on line 43

Warning: Invalid argument supplied for foreach() in C:InetpubwwwrootBuddysystesttest5.php on line 43

I tried the code using PHP 5.0.x but was unable to then switched over to the version 4.3.9

Plz reply soon.

Anchal

Posted

Anchal,

Your question is off-topic - you'd probably have more success posting a new topic.

However, I suggest 2 things.

1 - Don't migrate to PHP 5.x yet.

See http://www.fmforums.com/threads/showflat.php?Cat=&Board=php&Number=129612

2 - Comment out

$instanceName->SetDBUserPass('','');

OR

set up an account and declare the u/p here.

Best,

Shannon

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