Ted wrote:
BTW, I think it's time Jenny told in a bit more detail what she needs to do when the web-page is accessed. Is it any web-page, with a different action for each web page? Or is it the same action for any access? Is it simply access to the web-site as a whole?
OK...the guy in despatch clicks a button in my ms access database (stop spitting) , which sends the out put in html format to the web directory. There is a link to this file from my intranet website so that anyone (and in particular my boss, who likes to keep a nice tight hold on credit matters) can scrutinise it with an eagle eye. If stuff is being omitted, I'll get my knuckles rapped. So it is just one page, I need to take the multiple pages access has generated and turn them back into one. This must be done before anyone accesses the page, but after the report has been run (daily). It seemed to me that when the page was accessed was a good trigger. If I can use the apache log file to trigger a script that does the appending, i would be delighted....but i now have half an hour left to mend this ugly oversight on my part ( I blame access) and don't know if I can understand this awk thing in that time. Mind you...or php...... (/me finds table and crawls under it with brown paper bag over head...) Now, how about if I try and use a file date changing as a trigger to run a file? So if the date on my html file changes (as the despatch guy sends a new one) it runs a script doing the appending...is *that* more simple? :-) Thanks all! Jen.
On 18-Feb-02 Jenny_Hopkins@toby-churchill.com wrote:
OK...the guy in despatch clicks a button in my ms access database (stop spitting) , which sends the out put in html format to the web directory. There is a link to this file from my intranet website so that anyone (and in particular my boss, who likes to keep a nice tight hold on credit matters) can scrutinise it with an eagle eye. If stuff is being omitted, I'll get my knuckles rapped. So it is just one page, I need to take the multiple pages access has generated and turn them back into one.
Hi Jenny (maybe too late but I've not been looking at email for an hour or more).
I'm beginning to realise (stupidly a bit too late) that you may be operating entirely in a Windows environment and not in a Unix/Linux one (which was what I assumed from the fact that you mailed to our Linux list ... ), so your question to ALUG would have been about PHP and nothing else! In that case, my responses would probably be irrelevant since these suggestions would only work in Unix/Linux!
(/me finds table and crawls under it with brown paper bag over head...)
I suggest padded gloves for knuckles (unless head is at risk as well, in which case very thick brown paper).
Now, how about if I try and use a file date changing as a trigger to run a file? So if the date on my html file changes (as the despatch guy sends a new one) it runs a script doing the appending...is *that* more simple?
Well, that's the simple idea I was thinking of in the first place, and the Linux suggestions would have done just that; but unfortunately I can't help in PHP/Windows (not knowing enough about either). Sorry if I muddied the waters.
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 167 1972 Date: 18-Feb-02 Time: 17:41:10 ------------------------------ XFMail ------------------------------
So it is just one page, I need to take the multiple pages access has generated and turn them back into one. This must be done before anyone accesses the page, but after the report has been run (daily). It seemed to me that when the page was accessed was a good trigger. If I can use the apache log file to trigger a script that does the appending, i would be delighted....but i now have half an hour left to mend this ugly oversight on my part ( I blame access) and don't know if I can understand this awk thing in that time. Mind you...or php......
As brett has suggested, it's best to do this on the fly. What brett hasn't pointed out is that there's not necessarily any noticable difference to server load in doing this.
Reading several small files is the same as reading one big file, ignoring a small directory access overhead (think 1+1+1+1 = 4 verses 4 = 4 -- the bandwidth and IO requirements are more or less the same).
It's always better to do any processing required by a request on the fly. By all means cache the results, if computing them is resource intensive, but in this case, caching them wouldn't save you any effort.
P.