Hi guys
Running apache on winxp.
The bizarre thing is in my browser I can put:
myserver.com/mydir2/test.gif and that works
myserver.com/cgi-bin/mydir/test.gif gives internal server error. but I know
the opendir command can at least read mydir. Still, how should I 'enable'
mydir2?
another issue
Wow, thanks Eric ! That seems to be very nice, I'll give it a try and will
report later here if avoiding system() calls reduce the number of aborted
connections.
Heiko
Am 18.02.2010 um 17:24 schrieb eric.b...@barclayscapital.com:
> I'm starting to use Gearman to get around this whole problem.
Depending on your server setup, you may or may not be able to read
\mydir2\. Whether on windows or a unix variant, apache is configured to
run as "some user" (often, "nobody" on unix); and that user needs to be
given at least read access to the \mydir2\ directory in order for this
to work.
A
On Thu, Feb 18, 2010 at 13:20, ceauke wrote:
> So my structure is like this:
> \cgi-bin\myprog.cgi < my program
> \cgi-bin\mydir1\ <- this one can be seen by my program
> \mydir2\ <- how do I show this content?
opendir my $DH, '\mydir2\' or die "Unable to open mydir2: $!";
The
Wow, thanks. It's working. I have a problem with the dir structure:
Perls seems to search for mydir in \cgi-bin\ and not where I defined mydir
in the apache conf file.
So my structure is like this:
\cgi-bin\myprog.cgi < my program
\cgi-bin\mydir1\ <- this one can be seen by my program
opendir(DIR, "/your/dir");
my @gifs = grep { /\.gif$/ } readdir(DIR);
ceauke wrote:
Hi guys
I wanted to do a simple script to show all pictures in a specific folder.
But I don't see any functions to read all files in a folder.
The logic needs to go something like this:
- Open directory to read
Sorry, I completely forgot to say.
This is for MOD_PERL on apache. So I want the webserver to show an unknown
amount of pictures.
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27644823.html
Sent from the mod_perl - General mailing list archive at N
#!/usr/local/bin/perl
chdir("/path/to/my/directory");
while($filename=<*.gif>)
{
print "$filename\n";
}
# Enjoy!
ceauke wrote:
Hi guys
I wanted to do a simple script to show all pictures in a specific folder.
But I don't see any functions to read all files in a folder.
The logic needs t
Hi guys
I wanted to do a simple script to show all pictures in a specific folder.
But I don't see any functions to read all files in a folder.
The logic needs to go something like this:
- Open directory to read file list
- If file like *.gif then print filename
Any tips?
--
View this message
I'm starting to use Gearman to get around this whole problem. We use a lot of
external processes for many things, so this issue wtih Apache2 really bit me
hard in the bee-hind. I've gone to great lengths to work around it, but so far
the job queue approach seems to be the most elegant and leas
Salvador,
to avoid such issues my "external" tasks don't use STDOUT, STDIN or STDERR.
They take their parameters from control files and write their results back to a
status file. This tasks don't send any output back to the browsers. As I said,
usually some "sudo's to change some system setting
11 matches
Mail list logo