httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Fellows <lfell...@4lane.com>
Subject RE: apache 2.0.35, PHP, NetPBM specific issue
Date Fri, 17 May 2002 13:40:53 GMT
Hi Sven,

  Actually, the error message is more helpful than you imagine.  Your
question about .exe is understandable but the message shows that
Apache isn't having any difficulty executing PHP (which is a .exe on
windows).

  The problem appears to be with the return statement and the
command it attempts to execute.  Have you tried timing how long the
conversion runs from the command line?  
  I don't know about apache's behavior on windows, but apache does not
pass the environment path to cgi's on a UNIX platform without explicit
configuration to do so. Usually, on a UNIX implementation, the cgi
developer sets the path within the cgi script.  My suspicion, and I may
be mistaken, is that some aspect of the exec command you are submitting
cannot find everything it needs.  Although I am surprised it does not
return immediately with a error in that case.

  You should try specifying complete paths in the command and
see if that changes its behavior. I.E,
return exec("c:\full\path\to\cmd.exe /c c:\full\path\to\your\exe plus
any command-line arguments it needs", $results, $status);

HTH

On Fri, 2002-05-17 at 02:33, Heinze, Sven wrote:
> okay, here is what i got from the error log. it really is not that helpful:
> 
> quote:
> PHP Fatal error:  Maximum execution time of 30 seconds exceeded in
> D:\server\HTML\wbshard\cgi\gallery\platform\fs_win32.php on line 161
>  
> codeline causing this is:
> function fs_exec($cmd, &$results, &$status, $debugfile) {
>  
>  // We can't redirect stderr with Windows.  Hope that we won't need to.
>  return exec("cmd.exe /c $cmd", $results, $status);
> }
> 
> i also set max execution time in php.ini to 60 seconds, same thing happens.
> netpbm (or whatever else i want to use) is in win2ks %path%, so it should be
> reachable
> from anywhere. yesterday i also tried an album using imagemagicks
> "convert.exe" but the same thing happened. it seems like apache is not able
> to run any .exe ?!?
> 
> is there something like:
> 'AddType win2k/exefile .exe'
> 'AddOutputFilter INCLUDES .exe'   ?  just curious ;)
> i cant use xbithack, running windows ;( there is no way to set an executable
> flag on a textfile.
> 
> thanks for the help so far ! 
> 
> 
> -----Original Message-----
> From: Lee Fellows [mailto:lfellows@4lane.com]
> Sent: Thursday, May 16, 2002 4:55 PM
> To: 'users@httpd.apache.org'
> Subject: RE: apache 2.0.35, PHP, NetPBM specific issue
> 
> 
> On Thu, 2002-05-16 at 10:05, Heinze, Sven wrote:
> > actually its a timeout error. strange. i tried another thing: after the
> > manual you should be able to get a directory listing using the "dir"
> command
> > in SSI. this does not work neither. my guess is just that im not able to
> run
> > any .exe on the server via a script.
> 
>   Have you configured apache to do SSI?
> 
> 	You need to add Includes to the Options of the directory
>         where you wish to use SSI.
> 	You also need to add 'AddType text/html .shtml' and
>         'AddOutputFilter INCLUDES .shtml' to your httpd.conf file or
> 	use the directive 'XBitHack on' and set the execute bit on
> 	the pages you want to process for includes.
> 
>  if i try it at the cmd-prompt it just
> > works fine. i'll send in a log although i rememember it saying something
> > about a timeout. this error only happens when the script is trying to
> create
> > a thumbnail or otherwise manipulate the uploaded picture using the win32
> > binaries (which i double checked that they are in the path and reachable
> > from the script). This has to be a security fault, maybe i have to put
> > something in the .conf to make apache execute .exe files ? 
> 
>   The log file could really be useful.
> 
> 
> > or maybe its just
> > a general issue regarding apache2filter.dll ?
> > 
> > Help!
> > 
> > Thanks
> > 
> > -----Original Message-----
> > From: Lee Fellows [mailto:lfellows@4lane.com]
> > Sent: Thursday, May 16, 2002 3:13 PM
> > To: 'users@httpd.apache.org'
> > Subject: Re: apache 2.0.35, PHP, NetPBM specific issue
> > 
> > 
> > Sven,
> > 
> >   What do you get in the error log?
> > 
> > 
> > 
> > On Thu, 2002-05-16 at 02:46, Heinze, Sven wrote:
> > > all,
> > > 
> > > i'm running apache 2.0.35 with php 4.2.0 and mysql on my windows 2000
> > > (dedicated server system) with p3-650cpu and 768mb ram. So far
> everything
> > > works nice, even the virtual hosts are okay. now to my problem: i dont
> > know
> > > if anyone ever used this: its a php-script called gallery
> > > (http://gallery.sourceforge.net) that uses netpbm to resize/convert
> > uploaded
> > > pictures. on my old server (with omnihttp as software) this just worked
> > fine
> > > but now it seems like the gallery-script is somehow not allowed to run
> > .exe
> > > (the netpbm-binaries) files on the server. it just doesnt start them,
> > > although it can find them. is this a rights issue ? is there a way to
> > > resolve this ? Help please.
> > > 
> > > Sven
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > > 
> > > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message