Linux Centos and fpCGI

John Sica john at chrismanncomputer.com
Thu Feb 1 09:59:17 PST 2018


Thanks for the help Walter.

Once I got all the 386 libraries installed, the command works from the 
command line.

Now the website just tells me to "Please try again later.  System busy, 
Could not gain access to the counter file."

The counter file is just a 4 character file in the cgi-bin directory 
with full rw-rw-rw permissions.  So I've made a lot of progress just by 
being able to type the command line "fpcgi" without errors.

John





On 2/1/2018 6:35 AM, Walter Vaughan Jr via Filepro-list wrote:
> What is the output if you ssh into your cgi-bin directory and run the command with root permissions?
> Make sure it works from the command line first...
>
> (never did more than look at fpcgi, we always rolled our own interfaces, so I could be FOS)
>
> -----Original Message-----
> From: Filepro-list [mailto:filepro-list-bounces+wvaughan=steelerubber.com at lists.celestial.com] On Behalf Of John Sica via Filepro-list
> Sent: Thursday, February 01, 2018 2:17 AM
> To: Nancy Palmquist <nlp at vss3.com>
> Cc: filePro <filepro-list at lists.celestial.com>
> Subject: Re: Linux Centos and fpCGI
>
> Nancy,
> Finally converting an SCO system that has fpcgi 2.0 to Linux, and I can't get anything working.  The logs are not even being created, and I get an "Internal Server Error" on the web page.
>
> Centos 7 has a completely different httpd.conf file than I've seen before, but I think I've got that configured.  The only visible error is the httpd error_log below.
>
> If I could get a template of an httpd.conf file and an fpcgi.env file that works on linux (Centos 7 is the version), I think I could struggle my way through it.  In the past, I've found that setting the permissions properly was critical, but it's been so long since I had to configure this, I really need some help.  I've looked at permissions from other openserver systems, but it doesn't seem to help.
>
> These are some sample views of files and directories.
>
> Thanks,
> John
>
>
>
> httpd    error_log
> [Wed Jan 31 23:39:35.161487 2018] [env:warn] [pid 1975] AH01506: PassEnv variable HOME was undefined [Wed Jan 31 23:39:35.161492 2018] [env:warn] [pid 1975] AH01506: PassEnv variable UID was undefined [Wed Jan 31 23:39:35.161493 2018] [env:warn] [pid 1975] AH01506: PassEnv variable COLUMNS was undefined [Wed Jan 31 23:39:35.161494 2018] [env:warn] [pid 1975] AH01506: PassEnv variable LINES was undefined [Wed Jan 31 23:39:35.161495 2018] [env:warn] [pid 1975] AH01506: PassEnv variable TERM was undefined
>
>
> /var/www
> [root at Centos www]#
> drwxrwxrwx. 2 filepro sys     4096 Jan 31 23:36 cgi-bin drwxrwxrwx. 9 filepro filepro 4096 Jan 31 22:30 html
>
> [root at Centos www]# l cgi-bin
> total 440
> -rwxrwxrwx. 1 filepro group      4 Jan 29 15:12 counter -rwxrwxrwx. 1 filepro group 153220 Jan 29 16:21 fpcgi -rwxrwxrwx. 1 filepro group 123093 Sep  7  2004 fpcgi2_0docsco.htm -rwxrwxrwx. 1 filepro group    418 Jan 29 17:01 fpcgi2_0.env -rwxrwxrwx. 1 filepro group     38 Aug 27  2004 fpcgicmd.txt -rwxrwxrwx. 1 filepro group    485 Jan 31 21:21 fpcgi.env -rwxrwxrwx. 1 filepro group    420 Sep  3  2004 fpcgi.env.org -rwxrwxrwx. 1 filepro group    449 Aug 27  2004 fpcgilog.cfg -rwxrwxrwx. 1 filepro group 111560 Sep  3  2004 fpcgi.sco -rwxrwxrwx. 1 filepro group   5220 Aug 27  2004 LICENSE.txt -rwxrwxrwx. 1 filepro group    274 Feb 17  2010 printenv
>
> fpcgi.env
>
> PFDATA=
> PFPROG=/appl
> PFDIR=/appl
> PFSERVROOT=/var/www/html/
> PFMENU=/appl/fp/menus
> PFGLOB=/appl/fp/lib/edits
> PFSERVER=Centos
> PFADDWP=OFF
> PFCOUNTERMAX=999
> FPCGILOG=/tmp/fpcgi.log
> PFCMARK=25
> PFTERM=ansi
> PFCHECKLOCK=OFF
> ALIAS User1=Field_base
> ALIAS User2=Field_cmd
>
> Both /root/.bashrc and .bash_profile have these lines
>
> PATH=/bin:/etc:/usr/bin:/tcb/bin:/appl/fp
> PFDATA=;export PFDATA
> PFPROG=/appl;export PFPROG
> PFDIR=/appl;export PFDIR
> PFSERVROOT=/var/www/html/;export PFSERVROOT PFMENU=/appl/fp/menus;export PFMENU PFGLOB=/appl/fp/lib/edits;export PFGLOB PFSERVER=ace;export PFSERVER PFCOUNTERMAX=50;export PFCOUNTERMAX PFADDWP=OFF;export PFADDWP PFUFLAG=ON;export PFUFLAG PFTERM=ansi;export PFTERM
>
>
>
>
>
>
> On 2/7/2011 10:40 AM, Nancy Palmquist wrote:
>> John,
>> Thank you. I forgot about the .err file in the cgi-bin folder.  It
>> gave me the clue I needed and it is working.
>>
>> For some reason the PFTERM was missing.  I expect it was defined in
>> apache on the old system, and that variable was omitted on this setup.
>> I added it to the global .env for fpCGI and it works. That way it will
>> follow the setup for fpCGI instead of apache.
>>
>> Also thanks to others that responded off list, they had suggested
>> similar things and all things combined to get it working.
>>
>> As always, you guys are the greatest.
>>
>> Nancy
>>
>> On 2/7/2011 11:54 AM, John Sica wrote:
>>> Not sure if this is going to help, but there are logs in the cgi-bin
>>> directory that might help. (using Filepro 5.6 and fpcgi 2.0 with
>>> Apache 2.  The OS is Openserver OSR6.
>>>
>>> If your not getting logs like these, then you might not have the
>>> right permissions on the cgi-bin directory. We had to make them 777
>>> to get it to work.  AND when it wasn't set properly, the error output
>>> was concatenated to the key file.  The .err files are text files, but
>>> the .out are not.  However, when there were no errors, fpcgi would
>>> work properly.  I just thought knowing these files were there might
>>> help.
>>>
>>> -rw-r--r--    1 filepro  group       1317 Feb  7 06:00 fpcgi29890.out
>>> -rw-r--r--    1 filepro  group          0 Feb  7 06:00 fpcgi29890.err
>>> -rw-r--r--    1 filepro  group        201 Feb  4 18:34 fpcgi6504.err
>>> -rw-r--r--    1 filepro  group        201 Feb  4 18:34 fpcgi6500.err
>>> -rw-r--r--    1 filepro  group        253 Feb  4 06:47 fpcgi29846.err
>>> -rw-r--r--    1 filepro  group        253 Feb  4 06:47 fpcgi29813.err
>>> -rw-r--r--    1 filepro  group        204 Feb  3 15:18 fpcgi28896.err
>>> -rw-r--r--    1 filepro  group        198 Feb  3 15:17 fpcgi28840.err
>>>
>>>
>>> John
>>>
>>>
>>> On 2/7/2011 9:08 AM, Nancy Palmquist wrote:
>>>> My Esteemed Collegues,
>>>>
>>>> We are changing a server that was running SuSE Linux to Centos and
>>>> are having difficulty getting fpCGI to work correctly.  FilePro
>>>> version is
>>>> 5.0 - it has run flawlessly with these processes for years.
>>>>
>>>> General functioning of fpCGI is as follows:
>>>>
>>>> 1)Capture form data,
>>>> 2)write the data to a CSV file
>>>> 3)Launch filepro
>>>> 4)    filepro reads the csv file, processes the data, writes an HTML
>>>> file and exits
>>>> 5) fpCGI then picks up the HTML file created and feeds it back to
>>>> the user.
>>>>
>>>> Now 1, 2, 3, and 5 are running.  I can see the dclerk process
>>>> running in step 4 in the process table, but I do not get any output
>>>> at all.  I have LOGTEXT commands and HTML commands in the table and
>>>> I do not get anything from them.  fpCGI does not allow standard
>>>> output to be captured so we can not do that.
>>>>
>>>> If I run the dclerk process in a test mode without fpCGI, it runs
>>>> and does everything it is supposed to do.  In the fpCGI debug log,
>>>> dclerk exits without error.  But it is really timing out and fpCGI
>>>> is closing the process.
>>>>
>>>> Anyone got a clue where to try to troubleshoot this issue?
>>>>
>>>> BTW - I have ONEGATE also acting as a CGI for some newer processes.
>>>> It works without issue on this new Linux.  If I can not solve this,
>>>> my path is to rewrite the stuff that uses fpCGI to ONEGATE.  I hate
>>>> to re-write when the stuff was working just fine.  It was written
>>>> before Onegate came out and we did not think a rewrite was
>>>> cost-effective. Without a resolution, we will have no choice.
>>>>
>>>> Nancy
>>>>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes http://mailman.celestial.com/mailman/listinfo/filepro-list
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list




More information about the Filepro-list mailing list