php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9954 php.exe hangs when executing external batch file
Submitted: 2001-03-23 09:09 UTC Modified: 2001-06-01 13:37 UTC
From: dave973 at netzero dot net Assigned:
Status: Closed Package: Program Execution
PHP Version: 4.0.4pl1 OS: Windows NT 4.0/SP6
Private report: No CVE-ID: None
 [2001-03-23 09:09 UTC] dave973 at netzero dot net
Platform/configuration = (NT4/SP6)

I have created a batch file that opens MS Access and runs a macro... This macro does 3 things:
1. Deletes a table
2. Imports a delimited text file into a new table
3. Quits Access and Saves All changes.

Here is the batch file:
REM   Defines a path for the Microsoft Access executable 
PATH = "C:\Program Files\Microsoft Office\Office\"
REM   Starts Microsoft Access and runs the macro.
START /WAIT Msaccess.exe "C:\inetpub\wwwroot\webcolor\webcolor.mdb" /x "Importer"
EXIT

When I call this .bat file with the exec() or system() functions, the browser hangs and when I check the Task Mgr... I have php.exe, CMD.exe, and msaccess.exe all hanging (and I also can not end the processes - Access is denied). For every page access, an addition 3 processes open and hang.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-29 06:21 UTC] jmoore@php.net
does the batch file work if you run it from the command prompt without PHP?

- James
 [2001-04-29 17:33 UTC] derick@php.net
User reported:

Yes, the batch file works fine... it only hangs when run from php.

-Dave
 [2001-04-29 19:06 UTC] derick@php.net
Can you try this tomorrow when PHP 4.0.5 is released? There was a lot of changes to this piece of code.
 [2001-06-01 13:37 UTC] jmoore@php.net
Cant reproduce, no feedback.

Closing.

- James
 [2002-08-15 15:35 UTC] dave973 at optonline dot net
Hi,
  This bug was never fixed. I am still trying to run an access macro by calling an ms-dos batch file with exec() system() or passthru() in php version 4.1.2. The browser still hangs, and when you look at the task manager on the NT web server: php.exe, msaccess.exe, and cmd.exe are all hanging and can't be terminated.

Thanks.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 02:01:25 2019 UTC