Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi everyone,

I'm having a problem running scripts from php. One of many things may be happening but I'm not very familiar with the api. What I'm trying to do is run a script that will create a pdf and put it in a temporary location in my web directory. I know the script works perfect using the Filemaker Client but I am unable to call it from php. I've tried both ways below:

$params = 2;

$conn = new FileMaker(......);





$test = $conn->newPerformScriptCommand('layout','some_Script',$params);

$result=$test->execute();



/*

$cmd = $fm->newFindAnyCommand('layout');

$cmd->setScript('some_Script',$params);

$blah=$cmd->execute();

*/

Unfortunately no matter how it's written it always comes up with the same error and won't run the script. I've tested this with a simple script as well that finds and changes the value of a known record field. nothing seems to work. It always comes to the error shown below.

Notice: Only variable references should be returned by reference in /Library/FileMaker Server/Web Publishing/publishing-engine/php/lib/php/FileMaker/Command.php on line 126

If anyone has gotten scripts to work with php please let me know what i'm doing wrong.

OS Mac OSX

Filemaker 9 server

Thanks in advance,

Afrite

Hi Afrite,

Unfortunately, CWP only supports scripts that are web compatible. If your script has any steps in it that aren't web compatible then your script will fail. If you tick the little box down the bottom left corner of script maker it will gray out incompatible steps. Save as PDF is unfortunately not a compatible step...

If you add:

echo $result->getMessage();

You'll see your error.

Edited by Guest

  • 1 month later...

You can use PHP to create a pdf. It's pretty incredible what it can do. Basically you call a function to create a blank pdf, then you start sending text and graphics to it, each time telling it the x/y coordinates to start.

Should be able to find lots of guidance on the web if you search for php create pdf

or here at php.net: http://ca3.php.net/manual/en/ref.pdf.php

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.