perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rainer Perl" <>
Subject Strange problems with smbmounted files
Date Fri, 18 Oct 2002 09:20:58 GMT

Here is my setup:

SuSE Linux 7, Kernel 2.4.4-4GB
EmbPerl 1.3.4

I've mounted (via smbmount) a directory which is hosted on a Windows
2000 server. In this directory, there is a html-file. I want to open it,
read it's content and display it within an embperl-generated page:

<div style="font-family:verdana;
 open(INFILE, '/usr/local/smbmount_w2k/test.html') || die;
 $FileContent = '';
 while(\<INFILE>) { $FileContent .= $_; }
 if($FileContent =~ /\<body[^>]*>(.*)\<\/body>/si) { $FileContent = $1;
 print OUT $FileContent;

This seemed to work - at first. But if I change the file (test.html) on
the server and reload the embperl (epl)-page, the changes do not show
up. I first thought "oh, I see - a cached epl-page" - but a "cat
/usr/local/smbmount_w2k/test.html" also shows the unchanged version.
So it is a smbmount-issue? No. Change the file (test.html) again (on the
server), do the cat again -> changes are there. Change html, do the cat
-> changes are there. Change html, reload epl-page: changes do not show
up. Cat html: changes do not show up.
So maybe the file is not closed properly? I changed the open-part of the
code to:

 open(INFILE, 'cat /usr/local/smbmount_w2k/test.html |') || die;

And I also tried

 system("cp /usr/local/smbmount_w2k/test.html /tmp/$$.autoshow");
 open(INFILE, "/tmp/$$.autoshow") || die;

But still no luck.

So I thought "maybe it's an issue with apache or mod_perl itself?" and
wrote the following cgi-script:

#!/usr/bin/perl -w

use strict;

print "Content-Type: text/html\n\n";
open(INFILE, '/usr/local/smbmount_w2k/test.html');

And it works fine, reflects all changes instantly. So it seems to be a
problem with EmbPerl, doesn't it?

Any hints/suggestions?


	Rainer Perl

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message