I made a php upload script that would be executed after a form with the upload was submitted.
$game_tmp = $game_file['tmp_name'];
$game_name = $game_file['name'];
$game_dest = "/games/" . game_name;
if (move_uploaded_file($game_tmp, $game_dest)) {
echo "<b>SUCCESS:</b><br />";
}
else {
echo "Error.";
}
It always output Error, so I checked my php.ini file and phpinfo(). my php.ini shows upload_tmp_dir with no value and so does the value in phpinfo(). I changed the calue of the directory to /upload, and changed the open_basedir to have a value of upload_tmp_dir. Yet, when I look into phpinfo(), it still shows upload_tmp_dir with a local and master value of no value. I believe this is the problem that is stopping my upload script from working. I created a /upload folder also and gave its permission value 777. Yet, this problem persists. I am not sure what is causing this problem.