PHP & Filepro
Bruce Easton
bruce at stn.com
Tue Jan 17 10:18:08 PST 2017
In the case where you are running the test script and it shows rreport
running, in what way are you running the test script?
I ask because, I have had programs on IIS (where I was not allowed to
mess with security settings) where I could successfully run batch test
scripts via terminal, but where IIS prevented system commands from
executing when run via browser. (I was able to relocate the
functionality of the system command to a Perl script, where things
worked OK. The client did set up IIS to allow *report, *clerk (and
Perl) to execute, which works, but IIS did not seem to allow *anything*
to be run from a filepro system command. I believe this was not
initially an issue, but became an issue when IIS was upgraded.)
Bruce Easton
On 1/17/17 12:33 PM, Kenneth Brody via Filepro-list wrote:
> Forwarding for Scott Smith, who currently can't post to the list for
> some reason.
>
>
> -------- Forwarded Message --------
> Subject: PHP & Filepro
> Date: Tue, 17 Jan 2017 15:06:48 +1000
> From: Scott Smith <scott.smith at aanet.com.au>
> To: Kenneth Brody <kenbrody at spamcop.net>
>
>
> Hello all,
>
> Using FP Version 4.8 on Windows Server with IIS has anyone been able
> to make
> php interact with filePro. And before people suggest, ver 4.8 is what
> I'm
> stuck with. Yes, I've float the idea of upgrades but until the client
> wishes
> to spend the money.
> The plan is just to have PHP trigger (system/exec call) a filepro report
> with data passed with -r flags (eg request invoice no and then just
> produce
> a txt file say in the format of a json) and then have PHP read the that
> file.
>
> I've setup simple test scripts
> PHP SCRIPT <?php
> echo ' Testing PHP System Command<br>';
> error_reporting(E_ALL); putenv("PFPROG=c:");
> putenv("PFDSK=h");
> putenv("PFDATA=h:");
> putenv("PFDIR=\serverFolders\serverdrive");
> putenv("PFCMARK=70");
> putenv("PFFILES=100");
> putenv("PFNET=ON");
> putenv("pfoutput=c:\fp\output");
> putenv("pfnewntconsole=on");
>
> // executes a system command
> $lookforname = ' c:/fp/rreport.exe';
> $flags = ' reports -f php_test -r "1" -rw "filename" -a -u ';
>
> $lookforname = $lookforname.$flags;
>
> echo " Starting : ".$lookforname.' <br>';
> $rtn2 = system($lookforname,$out2);
>
> echo 'Result: '.$rtn2.'<br>';
>
> print_r($out2);
>
> ?>
>
> filePro Script
> ::us = getenv("USERNAME")
> ::aa = getenv("pfoutput")
> ::chdir aa
> :: fn = "php_"{@pw{".txt"
> ::export asci php=(fn) ::php(1) = " Filepro PHP test by "<us
> ::php(2) = " this is the data passed with -r flag"<@pm
> ::php(3) = " this is the data passed with -rw flag"<@pw
> ::php(4) = " Date by filePro :-"<@t4<@tm
>
> This was the quickest data file dump method.
> On the server the windows task manager show IUSR shows rreport.exe
> open for
> about 5 secs then close.
>
> But with no success. The PHP just shows the result of 1. (Which I
> believe is
> a fail) If the command ' c:/fp/rreport.exe reports -f php_test -r "1" -rw
> "filename" -a -u' is triggered from cmd it works as expected. (but this
> would be as ADMIN/USER rights) So I'm guessing it a privileges issue
> as PHP
> runs on IUSR account in IIS. NO errors in the PHP log.
>
> I have confirmed that IUSR has read/write on filepro data directory as
> well
> as fp dir and the fp output directory. And, Yes I understand this as a
> security issue but it's just for testing.
>
> On the server the windows task manager show IUSR shows rreport.exe
> open for
> about 5 secs then close. (for about the same amount of time it takes thru
> the cmd prompt.)
>
> But nothing happens...
> Could it be a memory issue?
>
> Any ideas
>
> Thanks
> PS Ken can you please post this on the list?
>
> Scott Smith
> Systems Manager
> Scott.smith at aanet.com.au
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the Filepro-list
mailing list