PHP 5.3.2 on IIS Fast CGI Timeout error

From: Date: Tue, 20 Mar 2012 17:05:12 +0000
Subject: PHP 5.3.2 on IIS Fast CGI Timeout error
Groups: php.general 
Request: Send a blank email to php-general+get-317147@lists.php.net to get a copy of this message
Good afternoon PHP gurus, I am trying to troubleshoot a problem on a Windows server (*UGH*). This is the error - The FastCGI Handler was unable to process the request. ------------------------------------------------------------------------ Error Details: * The FastCGI process exceeded configured activity timeout * Error Number: 258 (0x80070102). * Error Description: The wait operation timed out. HTTP Error 500 - Server Error. Internet Information Services (IIS) Here is the code it appears to be choking on - /* open the file for reading and/or writing */
        $csvFile = fopen(CSV_FILE, "rb");
        $csvTemp = fopen(CSV_TEMP_FILE, "wb");
        if(!$csvTemp) {
            echo 'failed tp open '.CSV_TEMP_FILE;
        }
        /* create the edit vehicle info */
        /* create a stock number for this vehicle */
        $vinPart = substr($_POST['vin-number'], -6);
        $stockNumber = 'EC'.$vinPart;
        /* create a line to be inserted into the .csv file */
        $csvContent =     $stockNumber.',';
        $csvContent .=     mysql_real_escape_string($_POST['vehUser']).',';
        $csvContent .=     mysql_real_escape_string($_POST['vmake']).',';
        $csvContent .=    mysql_real_escape_string($_POST['vmodel']).',';
        $csvContent .=     mysql_real_escape_string($_POST['vyear']).',';
        $csvContent .=    mysql_real_escape_string($_POST['vin-number']).',';
        $csvContent .=    mysql_real_escape_string($_POST['vprice']).',';
        $csvContent .=     mysql_real_escape_string($_POST['vdescription'])."\r\n";
        /* loop through and write edited lines back in while maintaining non-edited lines */
        while(!FEOF($csvFile)) {
            /* get current line information */
            $originalLineArray = fgetcsv($csvFile, 4096, ',');
            /* test and replace as required */
            if(is_array($originalLineArray)) {
                if($stockNumber == $originalLineArray[0]) {
                    fwrite($csvTemp, $csvContent);
                } else {
                    $currentLine = implode(",", $originalLineArray);
                    $currentLine = $currentLine."\r\n";
                    fwrite($csvTemp, $currentLine);
                }
            }
        }
        /* close the files */
        fclose($csvFile);
        fclose($csvTemp);
        /* rename the temp file */
        rename(CSV_TEMP_FILE, CSV_FILE);
Anyone have any clue why this might be happening? I have followed the events using Process Monitor which doesn't complain at all, yet the temp file gets created but never written to. I have been all over the web for a couple of hours now with no clue as to what is going on. I'd really appreciate any hints or tips.

« previous php.general (#317147) next »