ID:               19313
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Reproducible crash
 Operating System: Windows 2000 Professional
 PHP Version:      4.2.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




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

[2002-09-09 07:35:26] [EMAIL PROTECTED]

SUMMARY:
When using the passthru(command, outputresult) function, and passing
'command' an uninitialized variable, Apache for Win32 will crash, and
restart.

HOW IT HAPPENED:
During development of an image gallery, I was using passthru() to run
ImageMagick Mogrify.exe to scale thumbnails.  I was using the variable
$mogcommand to keep the shell command to use in passthru(), and
$outputresult to store the result. I made a typo in $mogcommand
($mogcomand), and when testing the page in my browser, Apache for Win32
crashed, and restarted.  The $mogcomand variable was not initialized or
previously used.

REPRODUCIBLE?
Yes.  Anytime I pass an unitialized variable to the shell command
parameter of passthru(), the Apache server will crash and restart.

STABILITY / INSTALLATION QUALITY?
So far, perfect.  Any problems other than this have been a result of my
own misconfiguration.  I have used passthru() many times on this server
with no problems, provided I pass a valid variable to it.  I believe
this is a valid bug.

ENVIRONMENT TYPE:
Development/testing server

SOFTWARE ENVIRONMENT:
Windows 2000 Professional
Apache 1.3.26 for Win32
PHP 4.2.3 for Win32 (MODULE)

HARDWARE ENVIRONMENT:
Pentium II/400 Mhz
128MB PC-100 SDRAM
8GB Maxtor ATA-66 Hard Drive

POSSIBLE SOLUTION:
Check if the variable passed to the shell command parameter of
passthru() is initialized, and if not, generate the appropriate
warning/error message.







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


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

Reply via email to