tags:

views:

134

answers:

2

Hi all, I hope this question is ok for Stack Overflow – If it’s not appropriate then let me know and I’ll remove if that’s the case.

Magento has been recently giving me the following error when I visit the shop on a windows machine:

SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘C:\WINDOWS\TEMP#sql_ac0_0.MYI’ (Errcode: 17)

I have ensured I am using a database user with all permissions.

The thing that baffles me about the error is its reference to C:\WINDOWS\TEMP … as that’s a local file on the windows machine. May I add that the issue only ever appears when I’m testing on windows machines, and not on my Mac.

The machines I test on all have cookies enabled.

What function of Magento requires to write to the user’s PC apart from leaving a cookie? (and even if it is just a cookie, why should it break the site?)

+1  A: 

Probably you installed Magento in a folder without write permissions. This is a mySQL error not a PHP one.

People from Magento have a forum entry about this. The solution is to change permissions though MAMP or whatever server you use to read and write for folders and files

Elzo Valugi
A: 

Hi!

Thanks Elzo for your response.

I have essentaily arrived at the conclusion that the issue was with my web host.

The conenction to the database server was constantly being lost.

I have changed to a new host and all is running perfectly now (and its the same shop)!

Shaun