jakebur01 Posted July 1, 2011 Share Posted July 1, 2011 I am getting this fast cgi error while trying to run the script below. FastCGI Error The FastCGI Handler was unable to process the request. Error Details: The FastCGI process exceeded configured request timeout Error Number: 258 (0x80070102). Error Description: The wait operation timed out. HTTP Error 500 - Server Error. Internet Information Services (IIS) <?php set_time_limit(900); ini_set('max_execution_time', '999'); require("../inc/data.inc"); mysql_query('TRUNCATE TABLE yamakoyo_customers;'); $conn=odbc_connect('FACTS','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM AR_CUST_MAST WHERE ACTIVE='Y' AND CUSTOMER_CLASS<>'RET' AND CUSTOMER_CLASS<>'REF' AND CUSTOMER_CLASS<>'GCA' AND CUSTOMER_CLASS<>'OUT' AND CUSTOMER_CLASS<>'REC' AND CUSTOMER_CLASS<>'SSC' AND CUSTOMER_CLASS<>'WHS' AND CUSTOMER_CLASS<>'SDD'"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQL");} setlocale(LC_MONETARY, 'en_US'); while (odbc_fetch_row($rs)) { $sql2="SELECT * FROM SA_CUST_ITEM_CLS WHERE ITEM_CLASS >= 'YKP' AND ITEM_CLASS <= 'YKU'"; $rs=odbc_exec($conn,$sql2); if (!$rs) {exit("Error in SQL");} setlocale(LC_MONETARY, 'en_US'); while (odbc_fetch_row($rs2)) { $sales1 +=odbc_result($rs2,"SALES_OLDEST_PD"); $sales2 +=odbc_result($rs2,"SALES_PD_2"); $sales3 +=odbc_result($rs2,"SALES_PD_3"); $sales4 +=odbc_result($rs2,"SALES_PD_4"); $sales5 +=odbc_result($rs2,"SALES_PD_5"); $sales6 +=odbc_result($rs2,"SALES_PD_6"); $sales7 +=odbc_result($rs2,"SALES_PD_7"); $sales8 +=odbc_result($rs2,"SALES_PD_8"); $sales9 +=odbc_result($rs2,"SALES_PD_9"); $sales10 +=odbc_result($rs2,"SALES_PD_10"); $sales11 +=odbc_result($rs2,"SALES_PD_11"); $sales12 +=odbc_result($rs2,"SALES_PD_12"); $sales13 +=odbc_result($rs2,"SALES_PD_13"); $sales14 +=odbc_result($rs2,"SALES_PD_14"); $sales15 +=odbc_result($rs2,"SALES_PD_15"); $sales16 +=odbc_result($rs2,"SALES_PD_16"); $sales17 +=odbc_result($rs2,"SALES_PD_17"); $sales18 +=odbc_result($rs2,"SALES_PD_18"); $sales19 +=odbc_result($rs2,"SALES_PD_19"); $sales20 +=odbc_result($rs2,"SALES_PD_20"); $sales21 +=odbc_result($rs2,"SALES_PD_21"); $sales22 +=odbc_result($rs2,"SALES_PD_22"); $sales23 +=odbc_result($rs2,"SALES_PD_23"); $sales24 +=odbc_result($rs2,"SALES_PD_24"); $sales25 +=odbc_result($rs2,"SALES_PD_25"); $sales26 +=odbc_result($rs2,"SALES_LAST_PD_26"); $sales27 +=odbc_result($rs2,"SALES_CURR"); } $TOTAL = $sales1 + $sales2 + $sales3 + $sales4 + $sales5 + $sales6 + $sales7 + $sales8 + $sales9 + $sales10 + $sales11 + $sales12 + $sales13 + $sales14 + $sales15 + $sales16 + $sales17 + $sales18 + $sales19 + $sales20 + $sales21 + $sales22 + $sales23 + $sales24 + $sales25 + $sales26 + $sales27; $TOTAL = number_format($TOTAL, 2, '.', ','); if($TOTAL<"500") { // do nothing } else { $COMPANY=odbc_result($rs2,"COMPANY"); $CUSTOMER_NUM=odbc_result($rs2,"CUSTOMER_NUM"); $CUSTOMER_NAME=odbc_result($rs2,"CUSTOMER_NAME"); $ADDRESS_1=odbc_result($rs2,"ADDRESS_1"); $ADDRESS_2=odbc_result($rs2,"ADDRESS_2"); $ADDRESS_3=odbc_result($rs2,"ADDRESS_3"); $CITY=odbc_result($rs2,"CITY"); $STATE=odbc_result($rs2,"STATE"); $ZIP_CODE=odbc_result($rs2,"ZIP_CODE"); $SHIP_TO_NAME=odbc_result($rs2,"SHIP_TO_NAME"); $COMPANY=odbc_result($rs2,"COMPANY"); $SHIP_TO_ADDR_1=odbc_result($rs2,"SHIP_TO_ADDR_1"); $SHIP_CITY=odbc_result($rs2,"SHIP_CITY"); $SHIP_STATE=odbc_result($rs2,"SHIP_STATE"); $SHIP_ZIP_CODE=odbc_result($rs2,"SHIP_ZIP_CODE"); $PHONE_1=odbc_result($rs2,"PHONE_1"); $PHONE_2=odbc_result($rs2,"PHONE_2"); $CONTACT_1=odbc_result($rs2,"CONTACT_1"); $CONTACT_2=odbc_result($rs2,"CONTACT_2"); $EMAIL_1=odbc_result($rs2,"EMAIL_1"); $EMAIL_2=odbc_result($rs2,"EMAIL_2"); $WEBSITE=odbc_result($rs2,"WEBSITE"); $CUSTOMER_CLASS=odbc_result($rs2,"CUSTOMER_CLASS"); $SLSP_TERR=odbc_result($rs2,"SLSP_TERR"); $TERMS_CODE=odbc_result($rs2,"TERMS_CODE"); $PRICE_LEVEL=odbc_result($rs2,"PRICE_LEVEL"); $MTD_SALES_AMT=odbc_result($rs2,"MTD_SALES_AMT"); $MTD_COST_AMT=odbc_result($rs2,"MTD_COST_AMT"); $YTD_SALES_AMT=odbc_result($rs2,"YTD_SALES_AMT"); $YTD_COST_AMT=odbc_result($rs2,"YTD_COST_AMT"); $PYR_SALES_AMT=odbc_result($rs2,"PYR_SALES_AMT"); $PYR_COST_AMT=odbc_result($rs2,"PYR_COST_AMT"); $BALANCE=odbc_result($rs2,"BALANCE"); $HIGH_BALANCE=odbc_result($rs2,"HIGH_BALANCE"); $CREDIT_LIMIT=odbc_result($rs2,"CREDIT_LIMIT"); $MESSAGE=odbc_result($rs2,"MESSAGE"); $CUST_PRICE_CLASS=odbc_result($rs2,"CUST_PRICE_CLASS"); $ASSIGNED_DATE=odbc_result($rs2,"ASSIGNED_DATE"); $OPENED_DATE=odbc_result($rs2,"OPENED_DATE"); $LAST_SALE_DATE=odbc_result($rs2,"LAST_SALE_DATE"); $LAST_PMT_DATE=odbc_result($rs2,"LAST_PMT_DATE"); $HIGH_BAL_DATE=odbc_result($rs2,"HIGH_BAL_DATE"); // do mysql insert mysql_query("INSERT INTO yamakoyo_customers VALUES ('0','$COMPANY', '$CUSTOMER_NUM', '$CUSTOMER_NAME', '$ADDRESS_1', '$ADDRESS_2', '$ADDRESS_3', '$CITY', '$STATE', '$ZIP_CODE', '$SHIP_TO_NAME', '$SHIP_TO_ADDR_1', '$SHIP_CITY', '$SHIP', '$SHIP_STATE', '$SHIP_ZIP_CODE', '$PHONE_1', '$PHONE_2', '$CONTACT_1', '$CONTACT_2', '$EMAIL_1', '$EMAIL_2', '$WEBSITE', '$CUSTOMER_CLASS', '$SLSP_TERR', '$TERMS_CODE', '$PRICE_LEVEL', '$MTD_SALES_AMT', '$MTD_COST_AMT', '$YTD_SALES_AMT', '$YTD_COST_AMT', '$PYR_SALES_AMT', '$PYR_COST_AMT', '$BALANCE', '$HIGH_BALANCE', '$CREDIT_LIMIT' , '$MESSAGE', '$CUST_PRICE_CLASS', '$ASSIGNED_DATE', '$OPENED_DATE', '$LAST_SALE_DATE', '$LAST_PMT_DATE', '$HIGH_BAL_DATE', '$TWO_YEAR')"); sleep(5); } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/240908-fastcgi-error/ Share on other sites More sharing options...
jakebur01 Posted July 1, 2011 Author Share Posted July 1, 2011 nevermind... I was just going to fast. My queries were not even right. I was getting ahead of myself. Quote Link to comment https://forums.phpfreaks.com/topic/240908-fastcgi-error/#findComment-1237478 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.