Sort of...

I have a Windows XP machine that I abuse for such things. I installed 
Apache 2.2 on it. Then the latest Foxweb download. Also using VFP 9.

The dbf files are on another machine (a Linux box running Samba) that is 
local to the WinXP box. That Linux box is also running MySQL, but that's 
not part of the pie in this situation.

While I have used PHP a lot with web pages (on standard websites), I'm 
not using PHP with this FoxWeb situation. My experience with PHP+DBF 
files is that PHP will open DBFs, but has absolutely no regard for file 
and/or record locking and I've heard rumors of index files getting out 
of whack if you use PHP to update DBF files. So, I've never put any code 
into use that accessed DBFs from PHP code. Not even just reading a DBF. 
I played briefly with PHP on a Windows box and it worked, but I doubt I 
spent more than 15 minutes with it as I prefer to test it on the LAMP 
box it will be used on.

For FoxWeb, I'm testing with the above WinXP machine responding to a 
VFP9 app on my Win7 Pro development system. I have a table of sales 
records that has 500,000+ records and the response times are 
outstanding. For example, I searched for all records containing a serial 
number containing "123" (serial numbers are text strings, alpha+numeric, 
from 5 to 20 length, not unique.) I got back a response string 
containing three fields (6 digit document number, 8 digit customer 
number, serial number) for 15,000 records in about 5 seconds.

I don't think I'm using any ODBC (except for the connection to the MySQL 
server from VFP9). The FoxWeb connection to the Apache server uses CGI 
and was drop-dead easy to set up. The FoxWeb documentation requires 
careful reading (and re-reading), and I had to search for some errors on 
their support Forum, but once I grokked the configuration concept FoxWeb 
uses, it began working like a charm.

For example, FoxWeb defaults to specifying a  "script" folder where 
FoxWeb will look for scripts over in the Windows User area. But Apache 
prefers (and the FoxWeb docs point out) that all CGI files are in a sub 
folder below the folder Apache manages for all websites. But, after you 
get FoxWeb set to find the scripts where it should, all is well.

One nice part of using FoxWeb is that they provide an Error Log panel 
with lots of very helpful logging info. Probably the toughest part of 
using Fox with a web server is that if you don't get the response you 
expect, your debugging tools are pretty limited.

My comment about FoxWeb use reminding me of PHP+HTML is that the FoxWeb 
code (VFP code) is inserted in what is essentially an HTML file (with 
FWX extension) using delimeters of <% foxcode here %>. In between those 
delimeters, any Foxcode goes...even comments using * and &&. The one 
gotcha I think I've discovered is that you have to use " to set off 
strings, not ', and FoxWeb seems to prefer nice spaces.
     nVar-nVar2=nVar3
may not produce what you want...but
     nVar - nVar2 = nVar3
will probably work.
Unfortunately, due to years of habit, I write code with no extra spaces.

Of course, this is all being done on a local area network (1GB), so it 
won't be as snappy on the Internet. But the same routine with a fat 
client (VFP9) accessing the same tables over the Internet (no FoxWeb) 
took 10 minutes, with Windows 7 complaining that the application had 
stopped responding (screen turned milky white). Not surprising with the 
amount of bits that had to be sucked down the pipe! The only time I've 
found using DBFs across the Internet acceptable is when the files are 
kept very small...like below 4k.

But the best part of FoxWeb for me so far is that with probably 3 or 4 
hours invested from the moment I hit their web page for the first time, 
I've removed a huge obstacle for my app, even if the solution is only 
used for a few months.

Hope this helps.

Mike

-------- Original Message --------
Subject: Re: Foxweb?
From: Ted Roche <[email protected]>
To: [email protected]
Date: 8/16/2012 6:28 AM

On Wed, Aug 15, 2012 at 11:27 PM, Mike Copeland <[email protected]> wrote:

> Dunno if you have any experience with using PHP on a website, but using
> FoxWeb does remind me of that combo. A lot. Only with good performance
> with DBF files (which PHP admittedly doesn't handle well.)

I'd like to hear more about this; did you get Apache + PHP + ODBC
working with VFP DBFs on a Windows platform? While it's not my first
(nor likely second nor third) choice, I'd like to know pros and cons
and what kind of experience you had.

I've had a lot of experience with PHP, mostly as part of a LAMP stack,
and ran into a few problems getting it working on Windows using SQL
Server.




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to