You are here: Freeing .MYD and .MYI Files « PHP Programming Language « IT news, forums, messages
Freeing .MYD and .MYI Files

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!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация