Page 1 of 2

how to remove the error in error log of xampp

PostPosted: 22. March 2020 12:35
by sreekar1
[Sun Mar 22 16:25:50.003107 2020] [ssl:warn] [pid 5153] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Mar 22 16:25:50.026672 2020] [ssl:warn] [pid 5153] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 22 16:25:50.026789 2020] [suexec:notice] [pid 5153] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Sun Mar 22 16:25:50.097921 2020] [auth_digest:notice] [pid 5154] AH01757: generating secret for digest authentication ...
[Sun Mar 22 16:25:51.000740 2020] [ssl:warn] [pid 5154] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Mar 22 16:25:51.000781 2020] [ssl:warn] [pid 5154] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 22 16:25:51.000879 2020] [lbmethod_heartbeat:notice] [pid 5154] AH02282: No slotmem from mod_heartmonitor
[Sun Mar 22 16:25:51.409017 2020] [mpm_prefork:notice] [pid 5154] AH00163: Apache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.20 mod_perl/2.0.8-dev Perl/v5.16.3 configured -- resuming normal operations
[Sun Mar 22 16:25:51.409068 2020] [core:notice] [pid 5154] AH00094: Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP'

Re: how to remove the error in error log of xampp

PostPosted: 22. March 2020 22:50
by Nobbie
Which error? I cant see any.

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 04:28
by sreekar1
Nobbie wrote:Which error? I cant see any.

but why uploading file using php is not working but its not saving in folder but showing in php code
Code: Select all
<?php
include 'header.php';
$profile_id=$user['username'];
$imgSrc="";
$result_path="";
$msg="";

if(!isset($_POST['x']) && !isset($_FILES['image']['name'])){
    $temppath='profile_pics/'.$profile_id.'_temp.jpeg';
    if(file_exists($temppath)){@unlink($temppath);}
}
if(isset($_FILES['image']['name'])){


    $ImageName=$_FILES['image']['name'];
   
   
    $ImageSize=$_FILES['image']['size'];

    $ImageTempName=$_FILES['image']['tmp_name'];


    $ImageType=@explode('/',$_FILES['image']['type']);
   
    $type=$ImageType[1];
 
    $uploaddir=$_SERVER['DOCUMENT_ROOT']."/profile_pics";
    $file_temp_name=$profile_id.'_original.'.md5(time()).'n'.$type;
    $fullpath=$uploaddir."/".$file_temp_name;
   
    $file_name=$profile_id.'_temp.jpeg';
    $fullpath_2=$uploaddir."/".$file_name;
   
     
    $move=move_uploaded_file($ImageTempName,$fullpath);


     chmod($fullpath,0777);
   
 
   if(!$move){
 

 die('file not uploaded');
       }
    else{
      $imgSrc="profile_pics/".$file_name;
       $msg="upload complete";
        $src=$file_name;
     
       
       
    }
    clearstatcache();
    $original_size=getimagesize($fullpath);
    $original_width=$original_size[0];
    $original_height=$original_size[1];
    $main_width=500;
    $main_height=$original_height/($original_width/main_width);
    if($_FILES["image"]["type"]=="image/gif"){
        $src2=imagecreatefromgif($fullpath);
    }
    elseif($_FILES["image"]["type"]=="image/jpeg" || $_FILES["image"]["type"]=="image/pjpeg"){
        $src2=imagecreatefromjpeg($fullpath);
    }
    elseif($_FILES["image"]["type"]=="image/png"){
        $src2=imagecreatefrompng($fullpath);
    }else{
        $msg.="There was an error uploading the file please upload a .jpg, .gif or .png file <br/>";
    }
    $main=imagecreatetruecolor($main_width,$main_height);
    imagecopyresampled($main,$src2,0,0,0,0,$main_width,$main_height,$original_width,$original_height);
    $main_temp=$fullpath_2;
    imagejpeg($main,$main_temp,90);
    chmod($main_temp,0777);
    imagedestroy($src2);
    imagedestroy($main);
    @ unlink($fullpath);
   
}
if(isset($_POST['x'])){
    $type=$_POST['type'];
    $src='profile_pics/'.$_POST['src'];
    $finalname=$profile_id.md5(time());
    if($type=='jpg'||$type=='jpeg'||$type=='JPG'||$type=='JPEG'){
      $targ_w=$targ_h=1500;
        $jpeg_quality=90;
        $img_r=imagecreatefromjpeg($src);
        $dst_r=imagecreatetruecolor($targ_w,$targ_h);
        imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],$targ_w,$targ_h,$_POST['w'],$_POST['h']);
        imagejpeg($dst_r,"profile_pics/".$finalname."n.jpeg",90);
       
    }else if($type=='png'||$type=='PNG'){
        $targ_w=$targ_h=150;
        $jpeg_quality=90;
        $img_r=imagecreatefrompng($src);
        $dst_r=imagecreatetruecolor($targ_w,$targ_h);
        imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],$targ_w,$targ_h,$_POST['w'],$_POST['h']);
        imagejpeg($dst_r,"profile_pics/".$finalname."n.jpeg",90);
        }else if($type=='gif'||$type=='GIF'){
        $targ_w=$targ_h=150;
        $jpeg_quality=90;
        $img_r=imagecreatefromgif($src);
        $dst_r=imagecreatetruecolor($targ_w,$targ_h);
        imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],$targ_w,$targ_h,$_POST['w'],$_POST['h']);
        imagejpeg($dst_r,"profile_pics/".$finalname."n.jpeg",90);
    }
       
    imagedestroy($img_r);
    imagedestroy($dst_r);
    @ unlink($src);
    $result_path="profile_pics/".$finalname."n.jpeg";
    $insert_pic_query=mysqli_query($db,"UPDATE profile SET image='$result_path' WHERE username='$userLoggedIn'");
    header("Location:" .$userLoggedIn);
   
}
?>
<div id="Overlay" style="width:100%; height:100%; border:0px #990000 solid; position:absolute; top:0px; left:0px; z-index:2000; display=none;"></div>
<div class="main_column column">
<div id="formExample">
  <p><?=$msg?></p>
   <form action="upload.php" method="post" enctype="multipart/form-data">
    Upload something :<br/><br/>
       <input type="file" id="image" name="image" style="width:200px; height:30px;"/><br/><br/>
       <input type="submit" value="Submit"  style="width:85px; height:25px;"/>
   
    </form><br/><br/>
 </div>
<?php
    if($imgSrc){
        ?>
   
        <script>
            $('#Overlay').show();
        $('#formExample').hide();
        </script>
           
            <div id="CroppingContainer" style="width:800px; max-height:600px; background-color:#fff; margin-left:-200px; position:relative; overflow:hidden; border:2px #666 solid;z-index:2001; padding-bottom:0px;">
            <div id="CroppingArea" style="width:100px; max-height:400px; position:relative; overflow:hidden; margin:40px 0px 40px 40px; border:2px #666 solid; float:left; ">
            <img src="<?=$imgSrc?> " border="0" id="jcrop_target" style="border:0px #990000 solid; position:relative; margin:0px 0px 0px 0px; padding=0px;"/>
            </div>
            <div id="InfoArea" style="width:100px; height:150px; position:relative; overflow:hidden; margin:40px 0px 0px 40px; border:0px #666 solid; float:left;">
            <p style="margin:0px; padding:0px; color:#444; font-size=18px;">
            <p>Crop Profile Image</p><br/><br/>
            <spam style="font-size:14px;">
            Crop / Resize your uploaded profile image<br/>
            Once you are happy with your profile image then please click save.
            </spam>
            </p>
            </div>
            <br/>
            <div id="CropImageForm" style="width:100px; height:30px; float:left; margin:10px 0px 0px 40px;">
            <form action="upload.php" method="post" onsubmit="return checkCoords();">
            <input type="hidden" id="x" name="x"/>
            <input type="hidden" id="y" name="y"/>
            <input type="hidden" id="w" name="w"/>
            <input type="hidden" id="h" name="h"/>
            <input type="hidden" value="jpeg" name="type"/><?php //$type ?>
            <input type="hidden" value="<?=$src?>" name="src"/>
            <input type="submit" value="Save" style="width:100px; height:30px;"/>
    </form>
</div>
           <div id="CropImageForm2" style="width:100px; height:30px; float:left; margin:10px 0px 0px 40px;">

            <form action="upload.php" method="post" onsubmit="return cancelCrop();">
                <input type="submit" value="Cancel Crop" style="width:100px; height:30px; "/>
               </form>
</div>
</div>

<?php
    }
      ?>
</div>
<?php if($result_path){
    ?>
<img src="<?=$result_path?>" style="position:relative; margin:10px auto; width:150px; height:150px;"/>
<?php } ?>
<br/> <br/>
?>
           
   
v

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 11:18
by Nobbie
How do you start that script?

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 11:26
by sreekar1
i kept all the script there in above thing

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 11:39
by Nobbie
How do you execute that script? Dont you understand my question? What are you doing in order to run that script?

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 11:48
by sreekar1
i am typing in brackets and using xampp as server and php language and ubuntu is the operating system lampp version is 5.6.20

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 12:49
by Nobbie
What? Your answers are crazy, sorry, but i cannot help you if you keep on writing plain shit.

A very last try: In which file is this PHP Script stored, how do you apply the filename to the browser? What do you enter into the browser?

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 12:51
by sreekar1
sorry i think you are asking this one /opt/lampp/htdocs

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 12:52
by Nobbie
Ok - you are a troll. Bye.

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 12:54
by sreekar1
wait upload.php is the file name

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 12:56
by Altrea
How do you access upload.php exactly to upload a file?
What is the contents of your browsers address bar at the time it is not working?

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 12:58
by sreekar1
localhost/upload.php
124.123.136.163/upload.php

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 13:13
by Nobbie
Sure? Do really enter manually the filename? Or dont you simply click on upload.php in your file explorer?

Re: how to remove the error in error log of xampp

PostPosted: 23. March 2020 13:18
by sreekar1
:lol: nobbie r u playing with me