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.

Can php run a script that uses a server plug-in?

Featured Replies

I have a script on my server that sends bulk emails using the ScriptMaster Plug-in. I currently have a schedule that runs this script every 10 minutes (checked for messages to be sent, and then sends them).

The script is set to run with full access privileges.

In the interest of cleaner log files and to give the user more control, I wanted to give them button that would simply open URL to a php page that would run the script, but it doesn't seem to be working.


<?php

include("FileMaker.php");

include("../includes/functions.php");

$fm = db_connect();

//note: it doesn't matter which layout is used

$layout = "phpEmailBulk";

$script = "SERVER - send bulk emails";

$parameter = "";

$request = $fm->newPerformScriptCommand($layout, $script, $parameter);

$result = $request->execute();

$error = error_check($result);

if(!$error) {

echo "success!";

}

?>

The browser displays "Success".

The FMS log reports the usual 101 error on "Go to Record[next]" after the last record in the loop"

... but the line with the plug-in isn't executing?

Is the use of the plug-in not allowed when a script is executed from the web?

Note: The ScriptMaster function is registered with a subscript, which also runs with full access privileges.

What are the privileges of the username that is specified in the db_connect() function? (It most likely is NOT the user who is calling the php URL.)

  • Author

it is a user that has execute privileges for the script and subscript, and view only access to a basic layout (because you have to specify a layout).

similar privileges to the user that the server schedule uses (except that one has no access to any layouts).

"Run with full access privileges" should give it the additional privileges it needs...

the script is definitely running. through my own error trapping it is writing an error to each of the bulk email requests. It is not returning an error from the plug-in itself.

it is a user that has execute privileges for the script and subscript, and view only access to a basic layout (because you have to specify a layout).

similar privileges to the user that the server schedule uses (except that one has no access to any layouts).

"Run with full access privileges" should give it the additional privileges it needs...

the script is definitely running. through my own error trapping it is writing an error to each of the bulk email requests. It is not returning an error from the plug-in itself.

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.