Unable to add hosts using bulkupload
Opened this issue · 1 comments
haijubin commented
kwadroke commented
I know that this is an old issue, but I just ran into it today.
This is my quick fix to get around this error incase anyone else comes across it.
Apparently PHP is prepending the C:\fakepath\ to the filename and causing an issue with the csv2json.sh shell script.
I had to remove the C:\fakepath\ text and then it would run the shell script correctly.
plugins-lib/smorg_hosts_bulktools_btn_impl.php line 831
$csvfile = str_replace( "C:\\fakepath\\", '', $query_str["filename"] );
$cmd = "scripts/csv2json.sh \"upload/".$csvfile."\"";
a few lines down I fixed the error message not showing up.
$retval["message"] = "Error converting CSV. Exit Status: ".$exit_status." | Command: ".$cmd." | Output: ".$output;
Hopefully this will help someone else having the same issue.