Thanks Nick and Martin,
           the code is ok but it doen't run in Solaris (unix) with nobody,
I test the code in Linux and run as I want.
          I work around the problem in Solaris by using EXEC() command.
I may need to investigate how to get running in Unix by using REDDIR().

Thanks

Nick Richardson wrote:

> The fact that there's a seg fault involved makes me think that's it's not so
> much a problem w/ code, but a problem with either apache (or whatever web
> server you use) a/o your PHP installation -
>
> PHP may be seg faulting before it's done reading the data from the directory
> and apache is reporting that no data was sent but the parser has stopped
> responding and is what it thinks is "done".
>
> Could also be that the user apache runs under doesn't have access to that
> directory.
>
> Or i could be completley wrong too... who knows ;)
>
> //Nick
>
> -----Original Message-----
> From: Martin Towell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 10:43 PM
> To: 'Phieu Huynh'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] "the document contained



> Martin Towell wrote:
>
> > does that code work if you set the directory path to "./" ?
> >
> > -----Original Message-----
> > From: Phieu Huynh [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 12, 2002 3:33 PM
> > To: Martin Towell
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] "the document contained no data"
> >
> > I also try the following code and still have the same problem.
> > I am runing php4.0.?, solaris(linux)
> >
> > $dir_name = "/export/home/phuynh/php/main/student/upload/";
> > $dir = opendir($dir_name);
> >  while (false !== ($file_names = readdir($dir))) {
> >           echo "$file_names";
> >  }
> >  closedir($dir);
> >
> > Martin Towell wrote:
> >
> > > odd, I copied your code, changed the dir to "./" and it works for me
> > > (php4.0.?, winnt)
> > >
> > > if dir() doesn't work for you, you might need to use opendir(), readdir(),
> > > etc
> > >
> > > -----Original Message-----
> > > From: Phieu Huynh [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, April 12, 2002 2:14 PM
> > > To: Martin Towell; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] "the document contained no data"
> > >
> > > Sorry, the file has ; I retype it wrong,
> > > I did set error_reporting but no change,
> > > but in the httpd error log file I found "exit signal segmentation fault
> > > (11)"
> > >

--

 Phieu (phil) Huynh
 Computer System Officer
 Monash University
 Electrical & Computer Systems Engineering
 Phone : +61 3 990 53469




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to