Image upload not working
Hi,
i have the following problem on my local machine. I used data assist for the results, delete and insert pages. When i insert a record (with an image upload field) with an image which size is about 200KB everything is working great (database insert and upload to a folder) but when i try to insert and upload images which size is about 3 or 4 MB it is not working. In firefox i can only see "waiting for localhost". I tried to change everything in my php.ini but it is still not working.
PHP.INI settings--------------------------------------------------------------------
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; upload-tmp-dir
upload_tmp_dir = "c:/wamp/tmp"
; Maximum allowed size for uploaded files.
; upload-max-filesize
upload_max_filesize = 100M
post_max_size = 100M
...
Page--------------------------------------------------------------------------
<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("../webassist/file_manipulation/helperphp.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../Slike galerija/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "3",
'ResizeWidth' => "0",
'ResizeHeight' => "600",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "path", "2", "[NewFileName]_[Increment]", "false", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $Ambasada;
$WA_table = "slike";
$WA_sessionName = "WADA_Insert_slike";
$WA_redirectURL = "slike_Results.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_indexField = "slika_id";
$WA_fieldNamesStr = "naziv|path";
$WA_fieldValuesStr = "".((isset($_POST["naziv"]))?$_POST["naziv"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."";
$WA_columnTypesStr = "',none,''|',none,''";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_Ambasada;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>
It also doesnčt matter if i remove the resize behavior or upload a file with any other extension.
Please help, thanks in advance...