|
Posted by himilecyclist on 09/07/05 22:30
After running my PHP/MySQL application, I have found that the
associated .MYD and .MYI files remain locked. Even after the browser
is closed, if I try to rename these files, I get the message:
Can't rename filename. It is being used by another person or
program...
These files remain locked until I reboot. I'm running on a Windows XP
machine.
Here is a code snippet that locks the two files:
<?php
//Connect to server and database
$host="localhost";
$user="root";
$password="";
$edenconnect = mysql_connect($host,$user,$password)
or die("Could not connect to server.");
mysql_select_db("eden")
or die("Could not connect to database.");
$sql = "SELECT * FROM edenmaster";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
mysql_free_result($result);
mysql_close(); // Also tried mysql_close($edenconnect);
exit;
?>
After running this snippet and closing the browser, files
edenmaster.myd and edenmaster.myi are locked to renaming until a
reboot.
I thought the mysql_close() would free the files, but it does not.
Any ideas?
Thanks!
[Back to original message]
|