Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

Topic: Pagalba dėl funkcijos

Sveiki, gal galite padėti  su šitomis klaidomis?

move_uploaded_file(../user/testas/376247033523.png) [function.move-uploaded-file]: failed to open stream: No such file or directory

move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpgfnjbS' to '../user/Mantas/376247033523.png'

Niekaip neišeina susitvarkyti, o pažėjus failų permission'ą jis 755 ir jo keisti neleidžia


kodas:

if (isset($_FILES["avatar"]["name"]) && $_FILES["avatar"]["tmp_name"] != ""){
$fileName = $_FILES["avatar"]["name"];
    $fileTmpLoc = $_FILES["avatar"]["tmp_name"];
$fileType = $_FILES["avatar"]["type"];
$fileSize = $_FILES["avatar"]["size"];
$fileErrorMsg = $_FILES["avatar"]["error"];
$kaboom = explode(".", $fileName);
$fileExt = end($kaboom);
list($width, $height) = getimagesize($fileTmpLoc);
if($width < 10 || $height < 10){
header("location: ../message.php?msg=ERROR: That image has no dimensions");
        exit();    
}
$db_file_name = rand(100000000000,999999999999).".".$fileExt;
if($fileSize > 1048576) {
header("location: ../message.php?msg=ERROR: Your image file was larger than 1mb");
exit();    
} else if (!preg_match("/\.(gif|jpg|png)$/i", $fileName) ) {
header("location: ../message.php?msg=ERROR: Your image file was not jpg, gif or png type");
exit();
} else if ($fileErrorMsg == 1) {
header("location: ../message.php?msg=ERROR: An unknown error occurred");
exit();
}
$sql = "SELECT avatar FROM users WHERE username='$log_username' LIMIT 1";
$query = mysqli_query($db_conx, $sql);
$row = mysqli_fetch_row($query);
$avatar = $row[0];
if($avatar != ""){
$picurl = "../user/$log_username/$avatar"; 
   if (file_exists($picurl)) { unlink($picurl); }
}
$moveResult = move_uploaded_file($fileTmpLoc, "../user/$log_username/$db_file_name");

Tai pat buvo išėja padaryti kad eitų įkelti paveikslėlį dadėjus prie

if (isset($_FILES["avatar"]["name"]) && $_FILES["avatar"]["tmp_name"] != ""){

šitą: 

['thumbfile']

bet tada neveikė klaidos,tuščias lapas tiesiog buvo,be jokių atsakymų iš serverio. Tikiuosi padėsite,ačiū.

Re: Pagalba dėl funkcijos

Neatidžiai skaičiau, bet iš pirmo žvilgsnio tai tikriausiai, kad klaida yra sekančioje eilutėje:

$moveResult = move_uploaded_file($fileTmpLoc, "../user/$log_username/$db_file_name");

Pabandyk nurodyt PILNą kelią iki target failo. šiuo metu kelias yra releatyvus, ir galbūt tu neteisingai jį sukonstravai.


Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

Re: Pagalba dėl funkcijos

minde teisingai tau sako, jau vien klaida move_uploaded_file(../user/testas/376247033523.png) [function.move-uploaded-file]: failed to open stream: No such file or directory daug ka sufleruoja ..

Re: Pagalba dėl funkcijos

Pilna kelia tai kaip suprantu prie /user prirašyti turėčiau dar nuorodą?


Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

Re: Pagalba dėl funkcijos

http://www.linuxquestions.org/questions … hs-256350/

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer