I cannot get the database.mysql file to load into phpmyadmin it throws up this error

Warning: filesize() [function.filesize]: stat failed for C:\WINNT\TEMP\php16.tmp in d:\Inetpub\wwwroot\phpmyadmin\libraries\read_dump.lib.php on line 162

Warning: fread() [function.fread]: Length parameter must be greater than 0 in d:\Inetpub\wwwroot\phpmyadmin\libraries\read_dump.lib.php on line 162

can work out the problem have looked in that file and it says

$content = fread($file, filesize($path));

confused here and can't seem to find any help on phpmyadmin or drupal to cover anything like this

Comments

chrisd’s picture

Can you load any other mysql file (create a dummy one) ?

If you can't load any file, I would guess that you have a permission issue on your Windows server. Make sure your PHP temp folder (C:\WINNT\TEMP\?) has write permissions for your IIS_Anonymous_User (if using Anonymous access)....

Also if you plan on having this be a public server your might want to move the temp folder to a none critical drive (just in case someone tries to fill your c: drive with temp files). In general avoid putting anything on the c: drive (system drive) and even move anything but the system from that drive.

Cheers,
Chris
Tech. articles with a WAMP+IIS+Drupal focus
Need a break: Visit France

phollan1’s picture

In the end I copied the sql commands out of the file and ran them this then worked

jadwigo’s picture

The function stat is not supported on windows as far as I know... (it's a native unix/linux function)

Newer versions of phpmyadmin have a workaround for that.

chrisd’s picture

To execute mysql code, I use the free MySQL Query Browser at:
http://dev.mysql.com/downloads/administrator/1.1.html

I pretty much open the .mysql file and execute the code.

That tool has much more features (it's pretty much the SQL 2000 Enterprise Manager for MySQL).

Cheers,
Chris
Tech. articles with a WAMP+IIS+Drupal focus
Take a break: Guide to France