Fatal error , when import csv

Topics brought up by the TimeTrex open source community.
Locked
thdc08
Posts: 2
Joined: Fri Jan 25, 2013 2:12 am

Fatal error , when import csv

Post by thdc08 »

Hello all,

I'm trying to import csv by using the import feature from Timetrex Gui. ( Company menu/ import), and i got this error
<br />
<b>Fatal error</b>: Call to undefined function mime_content_type() in <b>C:\TimeTrex\timetrex\interface\upload_file.php</b> on line <b>253</b><br />

I did alot search to figure out this error, but can not reslove it. Could anyone give me advise to slove it please.
Any advice would be greatly appreciated!
Have a nice weekend, everyone!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Fatal error , when import csv

Post by shaunw »

If you edit c:\timetrex\php\php.ini file and find the following line:

Code: Select all

;extension=php_mime_magic.dll
Replace it with:

Code: Select all

extension=php_mime_magic.dll
Then restart the TimeTrex service, that should correct the issue for you.
thdc08
Posts: 2
Joined: Fri Jan 25, 2013 2:12 am

Re: Fatal error , when import csv

Post by thdc08 »

Thanks shaunw. That error was sloved well. however, I get another error : Uploaded file is not a properly formatted CSV file compatible with importing. You uploaded a file of type'

this is my csv file:
"company_id","status_id","user_name","password","sin","first_name","middle_name","last_name","address1","city","province","postal_code","hire_date"
,1,10,"johnsmith","test","111223333","John","F","Smith","10 Main St","Anywhere","MD","11","01/23/2013"
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Fatal error , when import csv

Post by shaunw »

Its a problem with PHP and that extension, you will have to wait until the next version of TimeTrex is released (hopefully within the next week) and it should solve it for you.
pilee
Posts: 9
Joined: Tue Feb 26, 2013 12:22 am

Re: Fatal error , when import csv

Post by pilee »

Hi shaunw,

is this issue fixed ?

We are now running the Time Trex standard version, got problem with import punch data from exist system,

it also got problem with import the example csv file which come with Time Trex, FYI, thanks


Pilee
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Fatal error , when import csv

Post by shaunw »

Yes, the original issue mentioned in this topic is corrected in the latest version of TimeTrex, v5.3.0.
pilee
Posts: 9
Joined: Tue Feb 26, 2013 12:22 am

Re: Fatal error , when import csv

Post by pilee »

Hi shaunw,

I am new with TimeTrex, the first version I use is v5.3.0-20130204, it got the import issue,

I just tried to download the latest release, but it seems the same file, could you confirm what's the latest version you have ?

BTW, I tried import the exmaple csv files (import_punches.csv and import_punches2.csv ) which come with the TimeTrex,

I import it via Company > Import > Punches > choose one of the csv file > map columns seems ok > Data verification successful > but got error: Operation cannot be completed

this is a new installation system without any change, only add some testing data manually, FYI,

Hope We can find the root cause soon, thanks



Pilee
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Fatal error , when import csv

Post by shaunw »

Did you make any modifications to the .csv files that you are trying to import, for example to use correct employee names and such?
Locked