Hey again,
I just wrote a simple upload script and it wont let me upload a file bigger then 1 M. Internet explorer just says the page cannot be displayed, and a friend said he got a connection error of some sort.
Now i notice alot of peoples scripts have an HTML file seperate from the php file, i do not. Ill include the script at the end of this post.
My upload_max_filesize is 10M (exactly what it says) and my max_post_size is 8M. Memory limit is 20M, max_execution_time is 30, file_uploads is 1, and safe_mode is off. Everything seems to check out on the variable side, so any ideas?
PHP Code:
<?
$readmefileTableSettings = $mainTableSettings;
$readmefileTableSettings["header_colspan"] = 2;
$sql = get_db_conn();
if ($upload_server) {
move_uploaded_file($_FILES['map']['tmp_name'],'/var/www/html/uploads/' . $mod . '/' . $_FILES['map']['name']);
$mapfile = $_FILES['map']['name'];
$sql->Query("INSERT server SET name = '$mapfile', mod = '$mod', status =1");
$contents["header"] = "Success!";
$contents["main"] .= "The file was uploaded successfully and is now avalible on our server\n";
CreateBox($contents, $readmefileTableSettings);
EndRow();
StartRow();
}
// construct the news contents
$contents["header"] = "Upload to Server";
$contents["main"] = "\t\t\t\t<tr bgcolor='" . $TABLECELL_BACKGROUND_COLOR . "'>\n";
$contents["main"] .= "\t\t\t\t\t<td>Map </td>\n";
$contents["main"] .= "\t\t\t\t\t<td align='right'><form method='post' action='?mode=uploadserver&upload_server=1' enctype='multipart/form-data' ><input type='file' name='map'></td>\n";
$contents["main"] .= "\t\t\t\t<tr bgcolor='" . $TABLECELL_BACKGROUND_COLOR . "'>\n";
$contents["main"] .= "\t\t\t\t\t<td>Mod:</td>\n";
$contents["main"] .= "\t\t\t\t\t<td colspan=2 align='right'><input type='radio' name='mod' value='valve'>Valve HL\n";
$contents["main"] .= "\t\t\t\t\t<input type='radio' name='mod' value='cstrike'>Counter-Strike\n";
$contents["main"] .= "\t\t\t\t\t<input type='radio' name='mod' value='tfc'>TFC</td>\n";
$contents["main"] .= "\t\t\t\t</tr>\n";
$contents["main"] .= "\t\t\t\t<tr bgcolor='" . $TABLECELL_BACKGROUND_COLOR . "'>\n";
$contents["main"] .= "\t\t\t\t\t<td colspan=2 align='right'>Make sure you've read about this service, and that the server is mostly playing CS!</td>\n";
$contents["main"] .= "\t\t\t\t</tr>\n";
$contents["main"] .= "\t\t\t\t<tr bgcolor='" . $TABLECELL_BACKGROUND_COLOR . "'>\n";
$contents["main"] .= "\t\t\t\t\t<td colspan=2 align='right'><input type='submit' value='Upload'></form></td>\n";
$contents["main"] .= "\t\t\t\t</tr>\n";
CreateBox($contents, $readmefileTableSettings);
$msg_tag = -10009;
?>