#21972 [Opn->Fbk]: shell functions (system etc) cause crash

From: Date: Mon, 28 Apr 2003 17:18:26 +0000
Subject: #21972 [Opn->Fbk]: shell functions (system etc) cause crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38634@lists.php.net to get a copy of this message
 ID:               21972
 Updated by:       wez@php.net
 Reported By:      befletch at yahoo dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Windows 98/ME
 PHP Version:      4.3.0
 New Comment:

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?


Previous Comments:
------------------------------------------------------------------------

[2003-01-30 18:34:10] nicos@php.net

I can't verify it under WinXP and WinME with 4.3.0 and latest CVS.

------------------------------------------------------------------------

[2003-01-30 18:30:30] 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:27:25] 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 17:10:19] 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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21972&edit=1



Thread (9 messages)

« previous php.bugs (#38634) next »