php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21972 shell functions (system etc) cause crash
Submitted: 2003-01-30 17:10 UTC Modified: 2003-04-29 14:46 UTC
From: befletch at yahoo dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.0 OS: Windows 98/ME
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: befletch at yahoo dot com
New email:
PHP Version: OS:

 

 [2003-01-30 17:10 UTC] befletch at yahoo dot com
I get repeatable crashes on both Windows 98 and Windows ME running any script which calls a shell function, like system(), exec(), or shell_exec().  This applies to both 4.2.3 and 4.3.0, using either the CGI or CLI executable.  No web server is used on these machines, just DOS command line or drag and drop script execution.  I have tested this on two different machines (one 98 and one ME).

An example script follows:

<?php
  // Any of these commands will cause a crash.
  // Comment out all but one:

  `php hello.php`; // a hello world script
  system("C:\\PHP\\php -r 'exit(1);'");
  system('edit hello.php');
  exec('C:\WINDOWS\NOTEPAD.EXE');
?>

A dialog comes up stating roughly, "This program has performed an illegal operation and will be terminated.  Close all programs and reboot the computer."  The dialog's details button describes the problem as, "The program has encountered an invalid page exception," notes a fault location of 0028:0009, and says no interrupts were in service.

My install process is to simply unpack the tar-ball and place it in C:\php.  I don't modify php.ini, and I don't install any extensions.  Purely unpack-and-go.  I can execute fairly complex scripts with PHP installed like this, but anything involving a shell crashes, requiring a reboot.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-30 18:27 UTC] nicos@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You need to call command.com to exec() something under Windows.
 [2003-01-30 18:30 UTC] wez@php.net
Sounds like a valid report to me.
PHP calls your system popen() function which internally uses the shell.
Regardless of having to specify the shell, PHP should not crash.
Lets have someone with win9x look into this in more detail before making any further decisions.
 [2003-01-30 18:34 UTC] nicos@php.net
I can't verify it under WinXP and WinME with 4.3.0 and latest CVS.
 [2003-04-28 12:18 UTC] wez@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Do you still have this problem with the latest snapshot?
 [2003-04-29 13:07 UTC] befletch at yahoo dot com
I had the exact same behaviour on both of my systems
(Win ME, Win 98) as I had before.  I forgot to update
my bug report earlier, but I had noticed an odd thing
about the problem; it only happened once per system
boot.  After running a script and causing a crash, I
could kill a non-responding 'winoldap' process and
then the system would work fine.  I could run a script
which shelled out another command a few thousand
times, and not have any trouble.  Until the next
reboot, of course.

Anyway, all of that was true of the previously tested
build and the 4.3.2 RC build that you suggested I try.
I then tried to eliminate a potential conflict by
uninstalling Norton AntiVirus (Corporate edition,
v 7.50) on the Win 98 box, rebooting, and running the
test.  The problem no longer occurred, with either
the 4.3.0 version or with the 4.3.2 RC build.  I didn't
try this on the Win ME box but I expect the problem
would also go away on it, as both machines have had
the exact same symptoms so far.

I don't know what to do with the bug, but that is my
observations to date.
 [2003-04-29 13:53 UTC] wez@php.net
So removing third-party software eliminated the problem?
 [2003-04-29 14:37 UTC] befletch at yahoo dot com
Yes, removing Norton Corporate AntiVirus eliminated
the problem, and I'll understand if you want to close
the bug at this point as a result.  I certainly don't
have the time or skill to solve this compatibility
problem myself.  Norton is required software on my
company LAN, though, and I doubt I'm in a unique
situation that way.

Oh, and for the record, calling command.com doesn't
make any difference.
 [2003-04-29 14:46 UTC] wez@php.net
Not a bug in PHP, so marking this as Bogus.
There is not anything we can do about interference from virus checking software.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC