NerdConcepts Posted August 24, 2007 Share Posted August 24, 2007 this is the error An error occurred in script '/home/DOMAIN/public_html/csvtophp/classes/dn_records_csv.php' on line 46: Query: LOAD DATA INFILE '/home/DOMAIN/public_html/csvtophp/csv_storage/TECH016348708201310PM.csv' INTO TABLE `dn_records_temp` FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' ESCAPED BY '\\' IGNORE 1 LINES (`ACKNOWLEDGED`,`MGT_AREA`,`TECH_NUMBER`,`UNITS`,`CSG_STATUS`,`WORK_ORDER_TYPE`,`CSG_LAST_CHANGED_DATE`,`AUTO_ASSIGNED_TECH_NUMBER`,`SCHEDULED_DATE`,`ACTIVITY`,`CUSTOMER_NAME`,`CUSTOMER_PHONE`,`CSG_ACCT_NUMBER`,`WORK_ORDER_NUMBER`,`MDU`,`CUSTOMER_ADDRESS`,`CUSTOMER_CITY`,`CUSTOMER_ZIP`,`SERVICE_CODES`,`HARDWARE_DELIVERY`,`CLASSES`,`WO_CREATE_DATE`,`WO_INSERT_DATE`,`REASON1`,`REASON2`,`REASON3`,`REASON4`,`RESO1`,`RESO2`,`RESO3`,`RESO4`,`NBU`,`RR_CANDIDATE`,`RBU_WORKED`,`CATEGORY`,`SEGMENT_OUTPUT`,`SECONDARY_PH`,`RETAILER_NAME`,`WORK_ORDER_STATE`,`ROUTE_DATE`,`ROUTE_ID`,`ROUTE_NAME`,`ROUTE_STOP_SEQUENCE`,`USERLOGINID`,`ONSITE_TIME`,`COMPLETE_TIME`,`ESTIMATED_DURATION`,`MILEAGE`,`SCHEDULE_STATUS`,`VAN_DESCRIPTION`,`RADIO_DESCRIPTION`,`PREVIOUS_SCHEDULED_DATE`,`CUSTOMER_STATE`,`TECH_STATE`,`SECOND_ASSIGNED_TECH`,`DISPATCHER_NOTES`,`ACTIVE`,`VISITED`,`LEP`,`DEADLINE`,`AGE`,`PRECALL_STATUS`,`WO_COST`,`ACCT_DESIGNATION`,`COMPASS`,`NETWORKS`,`CHANNELS`,`OTA`,`WB`) MySQL Error: Can't get stat of '/home/DOMAIN/public_html/csvtophp/csv_storage/TECH016348708201310PM.csv' (Errcode: 13) I have no idea what is going on. It works on a local server, but after I upload it kicks out this error when trying to use .csv or .txt to import into MySql. I have no idea what it means by "Can't get stat..." anyone? Quote Link to comment https://forums.phpfreaks.com/topic/66556-load-data-infile-error/ Share on other sites More sharing options...
MadTechie Posted August 24, 2007 Share Posted August 24, 2007 MySQL Error: Can't get stat or error 13, both mean the file isn't found (or can't access the file) maybe try LOAD DATA LOCAL INFILE Quote Link to comment https://forums.phpfreaks.com/topic/66556-load-data-infile-error/#findComment-333446 Share on other sites More sharing options...
NerdConcepts Posted August 25, 2007 Author Share Posted August 25, 2007 Hmm, the LOCAL command with LOAD DATA isn't allowed on any of my servers/hosting packages. But if the file isn't found, well that makes not since so it must mean it cannot access it. Hmmmm. This makes no sense at all since I've had it working on the server before. Quote Link to comment https://forums.phpfreaks.com/topic/66556-load-data-infile-error/#findComment-333629 Share on other sites More sharing options...
MadTechie Posted August 25, 2007 Share Posted August 25, 2007 add an if(file_exists($file) && is_file($file)) just to be sure Quote Link to comment https://forums.phpfreaks.com/topic/66556-load-data-infile-error/#findComment-333847 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.