Jump to content
Server Maintenance This Week. ×

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


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

Recommended Posts

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.

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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