I have an admin area that uploads files. It works perfect on a PC but sometimes hangs on a Mac. It takes about 5 minutes to process the script on the mac when trying to upload a 50kb file - or it just hangs up the site all together.
$img_res = my_query("SELECT * FROM $main_table WHERE Bh_id=\"$the_id\"");
$img = mysql_fetch_array($img_res);
@unlink($base_dir."images/article_images/widescreens/$img[Bh_image_loc]");
//makes it here fine
copy_file($widepic, $base_dir."images/article_images/widescreens/", $wide, 350);
copy_file is this:
function copy_file($mainpic, $directory, $main, $maxwidth)
{
$destination = $directory.$main;
die("$destination");
// copy image
copy($mainpic, $destination);
//edited out more code that doesn't apply
}
I don't understand how it could hang up before the function even tries to copy anything. I used the die to see if the script would make it that far, but it didn't. Any ideas?
I