ID: 19775 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Java related Operating System: Windows XP Pro PHP Version: 4.2.3 New Comment:
So did you try exactly that one found in the url? and NOT the one with 'STABLE' in it's name? That error seems more like a configuration error on your machine.. Previous Comments: ------------------------------------------------------------------------ [2002-11-11 16:54:16] [EMAIL PROTECTED] I'm not sure why the same comment was posted twice. But anyways, I tried using the CVS snapshot for windows and this is the error I get: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Could not open input file. I can reproduce this bug 100% of the time if you would like the complete php script with some comments, I can provide that, just let me know. ------------------------------------------------------------------------ [2002-11-11 10:10:49] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-11-11 04:42:05] [EMAIL PROTECTED] I attempted the latest STABLE build because I could not get the latest build to run any script. PHP still crashes on the latest STABLE build dated November 10th. ------------------------------------------------------------------------ [2002-11-10 18:31:44] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-10-05 16:55:57] [EMAIL PROTECTED] I used PHP 4.2.3 zip file for windows. The GD extension and the Java extension are used and the appropriate paths are set for in Java in the php.ini PHP is crashing when I try to get the value of a specific point in my 2 dimensional array. The error occurs on the second attempt in the same script to read from the array. Below I will include the java code used and the php code that calls the java object. Java Code: /** * Filter class designed to do computations for a php script * * @author (Peter Kroll) * @version (2002-10-02) */ public class Filter { /** * Constructor for objects of class Filter */ public Filter() { } /** * applyFilter * * @param * filterMatrix: 2 dimensional array of integers * imageMatrix: 2 dimensional array of integers * @return * newImageMatrix: 2 dimensional array of integers */ public int[][] applyFilter(double [][] filterMatrix, int filterDimension, int [][] imageMatrix, int imageSizeX, int imageSizeY) { int countX; int countY; double sum = 0; int posX; int posY; int pixelValue; int temp; int [][] newImageMatrix = new int[imageSizeX][imageSizeY]; // Apply filter to image for(countX = 0; countX < imageSizeX; countX++) { for(countY = 0; countY < imageSizeY; countY++) { sum = 0; for(posY = 0; posY < filterDimension; posY++) { for(posX = 0; posX < filterDimension; posX++) { if(countX - posX < 0 || countY - posY < 0) { pixelValue = 0; } else { pixelValue = imageMatrix[countX-posX][countY-posY]; sum = sum + imageMatrix[countX-posX][countY-posY] * filterMatrix[filterDimension - 1 - posX][filterDimension - 1 - posY]; } } } newImageMatrix[countX][countY] = (int) sum; } } return newImageMatrix; } } PHP code: // Apply filter to image $FilterObject = new Java("Filter"); $newImageMatrix = $FilterObject->applyFilter($filter, $filterDimension, $imageMatrix, $imageSizeX, $imageSizeY); $tempVal = $newImageMatrix[0][0]; print $tempVal . "<BR>\n"; $tempVal = $newImageMatrix[1][1]; print $tempVal . "<BR>\n"; The PHP code above is not my whole script but the part that calls Java and causes the error. Please note that the Java compiles fine and there are no errors in the PHP. The variables passed into the Java method are the same type as required by the Java method. I am able to read one value from the returned matrix and print it to the screen on the second attempt php crashes, this bug is reproducable 100% of the time. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19775&edit=1
