Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Originally Posted by Sepodati
    Two ****ing days later and you finally read the goddamn warning message. Congrats!
    Last time I was online was 26th Jan (when you made your previous reply which I did not see as most likely you made it after i logged-off). Now back after 5 days.

    I was reading the WARNING mssg all along but did not understand it. It did not "occur" to me what it was trying to tell me. Still does not, really.
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Originally Posted by Sepodati
    The code you copy and paste is fine, for the most part. If it were written better, you wouldn't be getting the second NOTICE message at all, though. There's a logic flaw there.

    The **** part comes when you get your ****beaters on the code. What the hell is a file type of "upload/mp4"? Do you know the difference between bytes and bits? Between 8Mb and 8MB?
    The original code on line 6 is:

    PHP Code:
    $allowed = array("jpg" => "image/jpg""jpeg" => "image/jpeg"
    I switched it to:

    PHP Code:
    $allowed = array("mp4" => "upload/mp4"); 
    Because, the allowed extension is video files (mp4). The original script was allowing img files.
    https://www.tutorialrepublic.com/php...ile-upload.php

    Yeah, I know the difference between bits & bytes as 8 bits make a byte. A byte is a character such as "s" and that byte is 8 bits or 8 ones & zeros such as "11100010".
    1024Byte = 1MB.
    1024MB = 1GB.
    1024GB = 1TB (terra byte).

    Can't remember anything beyond that.
    Ones & zeros represent "on" & "offs". "Current Passing" & "Current not passing" on a transistor or whatever.
    A bit like morse code they used in WW2. "On", "Off", "On", "Off".
    They used the "On" & "Offs" to send electromagnetic waves or sound waves as code to represent chars to send messages to their army.
    They started doing the same back in 50's (using the morse code technic) when building the circuit board. If I remember correctly, the transistor holds the "On" & "Offs". The electronics circuit revolves around "On" & "off" which they call "ones" & "zeros".
    I did study a little electrical engineering back in 1997 and electronics back in 1998. Was rubbish at both so quit the courses. What I just told you is from memory from back 1997/8 and so I may have got somethings wrong.
    So, don't worry. I'm not a total dumbo or fool like you think. Infact, you probably never studied electrical engineering or electronics engineering.
    Ohms Law, Kirchoffs Law, Norton's Law and some other LAWs which I can't remember after 19-20yrs. V=IR (Volts = Current Times Resistance) (electrical engineering).
    Was rubbish at maths and you need to know good maths for electronics engineering.
    I am 20yrs older now and so more matured in the brain (no don't tell me I ain't because right this instant I am mature enough to read your mind. I can read you like a BOOK through your device screen) and so whatever did not sink in my head back then when I was a young adult might sink in now.
    You never know, I might build you a gadget. My invention. How-about a mind reading helmet ? Na! Too many variables in reading electro signals from the brain waves. Will make errors in translating the signals and get the wrong message from your head.
    Might aswell build a glass for you instead that reads the emitted light (your brain signals) through your eyes pupils and see if the light spectrum has more range or not compared to the electro signal. If so, then the more accurately of your thoughts would be read.
    You know what Sedo Baby, Just to quieten you up a little I thought about this concept of reading brain signals through your eyes on the spot and I realize now that it is actually technically possible to read brain signals like this. Did I stumble upon a new form of technology or I wonder if the world scientists are already into this sort of thing all working for the Anti Christ ? Most likely they are.
    I might give you some of my already built .exe tools to impress you. That should make you see me more respectively.
    Yep. I'm a dropout. I studied Mechanical Production Engineering with subjects such as Maths, Science, Engineering Materials, Business Studies (environment, etc.). It was a 2yr course and after the 1st yr someone enrolled into electronics engineering and I got a little greedy and enrolled into that too by going to 2 more colleges for the electronics courses. At the end, couldn't copy 3 colleges at the same time and dropped out from the new 2.
    That was in late 90's.
    First heard about the internet in 1997. It came-out in 1993.
    Been a webaholic since 1998 always on the look-out to learn more on to make it easy to make the easy big buck online. Lessened the surfing from 2011 when I got into bot building (.exe). Was obsesses with bot building from 2011-2017 continuous 6-15hrs a day, 7 days a week, 12 months a yr. Probably took altogether 3-7 days off from it per year.
    Got into php in late 2015 at first for under a month and then 1.5yrs later returned to it in early 2017 to HAUNT you LOT.

    My point is, I was into Mechanical and Electrical and Electronics Engineering in the 90's. And so have a little background in them. Did not excell at them for being weak at maths and so quit dreaming in those areas.
    Then got dreaming about making it big online when the Millennium started. Still dreaming. Could not make the dreams come true because too much competition. Everyone doing the same thing. Hence, always on the lookout for unique traffic & money making ideas online. Been thinking of some things since 2004 but never really got them off the ground due to not knowing how to program. Attempted Perl around 1998 and Basic and Basic Liberty but I quit. Too complicated.
    Everyone talks about php and so giving it a try after nearly 2 decades. They now say Python simpler and so thinking of giving that a try as I know I won't become a php pro because php is complicated like C since it's syntax is a sort of copy of C.
    Anyway, I believe you are surprised to learn that I had a little background in Mechanical, Electrical & Electronics engineering. But, knowing you, I'd say that, you will reply that you are surprised that I'm a drop-off or have technical background but do silly things when it comes to programming. How-about that (my guessing your thoughts) ? Do you give me the green light to attempt to build a mind reading helmet for you ? Just don't blame me if it zaps your brain and tries taking out all your php skills and transfers it to mine instead ! Or worst, if it turns you into a mute frankenstein.
    Last edited by UniqueIdeaMan; January 31st, 2018 at 10:00 AM.
  4. #18
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,929
    Rep Power
    4554
    -- Cigars, whiskey and wild, wild women. --
  6. #19
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Sepodati,

    I'll tell you this much Sedo,

    Women like that do not like cigars nor whiskey. But, I can't help in admiring your weird taste in wild, wild, western women of that age! Lol!
    I guess I satisfied your curiosity of whether I know what a bit and a byte is. Right dude ?
  8. #20
  9. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,929
    Rep Power
    4554
    -- Cigars, whiskey and wild, wild women. --
  10. #21
  11. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,395
    Rep Power
    2105
    Originally Posted by UniqueIdeaMan
    Everyone talks about php and so giving it a try after nearly 2 decades. They now say Python simpler and so thinking of giving that a try as I know I won't become a php pro because php is complicated like C since it's syntax is a sort of copy of C.
    If you think that PHP is "complicated" you might fair better witn Python, but from my perosnal experience, Python is a lot harder to pick up. It's a powerful language, but has a very steep learning curve.

    And... PHP is not a C "copy". The syntax is close because that's what was popular at the time, but PHP and C have nothing else in common.

    To be honest, if you can't pick up what we're trying to tell you in PHP, you won't make it in another langauge. Sorry to say, but that's true. Before you say anything, the syntax has nothing to do with it. What you have problems with is logic flow, debugging, and no general understanding of hwo programming should work. You refuse to go back and learn basics, you keep on asking the sme questions about things that are really simple and any first-year student would know, and you still don't put any effort into actually understanding anything, just copy-and-paste and say "why doesnt this work?". Shoud you keep trying? Yes. Should you do some learning before you ask questions that are as simple and obvious as this? Again, yes!
  12. #22
  13. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Originally Posted by Catacaustic
    If you think that PHP is "complicated" you might fair better witn Python, but from my perosnal experience, Python is a lot harder to pick up. It's a powerful language, but has a very steep learning curve.

    And... PHP is not a C "copy". The syntax is close because that's what was popular at the time, but PHP and C have nothing else in common.

    To be honest, if you can't pick up what we're trying to tell you in PHP, you won't make it in another langauge. Sorry to say, but that's true. Before you say anything, the syntax has nothing to do with it. What you have problems with is logic flow, debugging, and no general understanding of hwo programming should work. You refuse to go back and learn basics, you keep on asking the sme questions about things that are really simple and any first-year student would know, and you still don't put any effort into actually understanding anything, just copy-and-paste and say "why doesnt this work?". Shoud you keep trying? Yes. Should you do some learning before you ask questions that are as simple and obvious as this? Again, yes!
    Lol! I did not mean php an exact copy of C. Meant similar.
    I did learn the basics of function, echo, variable, constant, loops, methods (get, post) etc. It is the advanced that I struggle on. And ofcourse, sometimes you forget a little here and there on the basics and need reminding.
    Best to copy & paste and experiment and debug. That way, you gain work experience. Otherwise, you'll go in a very bad snail pace.
    Copy-pasting leads to encountering errors and debugging and learning from others experienced on how they fixed the issues. A sort of head-start in the learning (in my opinion).
    Php error or warning messages are complicated. Hence, learn them and then forget them double quick. If the errors were a bit simpler then this never would have happened. The puzzle game, I mean.
    Last edited by UniqueIdeaMan; February 1st, 2018 at 04:19 AM.
  14. #23
  15. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Originally Posted by Sepodati
    I am surprised that it was too much for you to take regarding the electronics basics I was trying to explain to you. Nevermind. (And I thought I was the only one rubbish at electronics stuffs! I'm glad I now have a partner who's more down the line of the rubbish can! Lol!).
  16. #24
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Actually, there was nothing wrong with my following code:

    PHP Code:
    <?php 

    // Check if the form was submitted
    if($_SERVER["REQUEST_METHOD"] == "POST"){
        
    // Check if file was uploaded without errors
        
    if(isset($_FILES["video_verification_file"]) && $_FILES["video_verification_file"]["error"] == 0){
            
    $allowed = array("mp4" => "video/mp4");
            
    $filename $_FILES["video_verification_file"]["name"];
            
    $filetype $_FILES["video_verification_file"]["type"];
            
    $filesize $_FILES["video_verification_file"]["size"];
        
            
    // Verify file extension
            
    $ext pathinfo($filenamePATHINFO_EXTENSION);
            if(!
    array_key_exists($ext$allowed)) die("Error: Please select a valid file format.");
        
            
    // Verify file size - 1000GB maximum
            
    $maxsize 1024 1024 1024 1024 1024;
            if(
    $filesize $maxsize) die("Error: File size is larger than the allowed limit.");
        
            
    // Verify MYME type of the file
            
    if(in_array($filetype$allowed)){
                
    // Check whether file exists before uploading it
                
    if(file_exists("video/" $_FILES["video_verification_file"]["name"])){
                    echo 
    $_FILES["video_verification_file"]["name"] . " is already exists.";
                } else{
                    
    move_uploaded_file($_FILES["video_verification_file"]["tmp_name"], "video/" $_FILES["video_verification_file"]["name"]);
                    echo 
    "Your file was uploaded successfully.";
                } 
            } else{
                echo 
    "Error: There was a problem uploading your file. Please try again."
            }
        } else{
            echo 
    "Error: " $_FILES["video_verification_file"]["error"];
        }
    }

        
    ?>
        
    <form enctype="multipart/form-data" action="" method="POST">
        <fieldset>    
        <p align="left"><h3><?php $site_name ?> Video Verification Form</h3></p>
        <div class="form-group">
            <p align="left"><label>Video File:</label>
            <input type="file" name="video_verification_file" id="video_verification_file" value ="Uploaded Video Id"></p>
        </div>    
        </fieldset>    
        <p align="left"><button type="video_verification_submit" class="btn btn-default" name="video_verification_submit">Submit!</button></p>
    </form>
    </body>
    </html>
    I kept getting this error:

    Warning: POST Content-Length of 28575184 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

    Notice: Undefined index: video_verification_file in C:\xampp\htdocs\test\upload.php on line 33


    And so, following the instructions on the following link I solved the issue.

    I found php.ini file from this path. C:\xampp\php or from xampp folder.

    2. Then opened php.ini file and changed the following:

    1. post-max-size (changed 8M to 100000M).

    2. upload-max-filesize (change d2M to 100000M).

    3. Restared Apache server and MySQL.

    https://stackoverflow.com/questions/...t-of-8388608-b


    Issue solved. Thread can now be closed.
  18. #25
  19. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,395
    Rep Power
    2105
    Sorry, but it's not "solved".

    Think about it for a second. How is your server going to handle file uploads of almost 100GB each? How long are your script timeouts set to? Do you even have enough storage space available for 5 or 6 videos of 500MB each?

    I have said in another thread why that is a bad idea, and gave you alternatives to doing it this way, but it seems like those might also be "too hard".

    What you're doing now is what you've done all along. It's called a "band-aid" solution. It works right in initial testing, but anyone with even a slight bit of experience will tell you that it will fall apart under real-world conditions.
  20. #26
  21. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,929
    Rep Power
    4554
    The difference between "works" and "right", this is. Been using that phrase for the decade I've been here, I think.
    -- Cigars, whiskey and wild, wild women. --
  22. #27
  23. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Originally Posted by Catacaustic
    Sorry, but it's not "solved".

    Think about it for a second. How is your server going to handle file uploads of almost 100GB each? How long are your script timeouts set to? Do you even have enough storage space available for 5 or 6 videos of 500MB each?

    I have said in another thread why that is a bad idea, and gave you alternatives to doing it this way, but it seems like those might also be "too hard".

    What you're doing now is what you've done all along. It's called a "band-aid" solution. It works right in initial testing, but anyone with even a slight bit of experience will tell you that it will fall apart under real-world conditions.
    I closed this thread and so how did you open it ?
    Anyway, thanks for the post.
    Do you mind pointing out that particular post in that particular thread where you gave the alternatives ? I have to jog my memory.

    I had forgotten about time-out! Yeah, have to add that or my server will slow down or worst jam!

    Anyway, which part of the script you call it band aid solution ? Will have to amend this.
    Anyway, I'm experimenting the script structure tonight. I will open another thread regarding this tomorrow night or so. That way, my script exits asap when user has made input errors and processes no further thus freeing the bandwidth and reserving it for those users who really deserve it.

    And yes, we can't afford to have my script fall apart in real life condition. My users would stop earning half-way and my brand will get a bad rep!
  24. #28
  25. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2017
    Posts
    757
    Rep Power
    0
    Originally Posted by Sepodati
    The difference between "works" and "right", this is. Been using that phrase for the decade I've been here, I think.
    Mmm. Everything is starting to become very clear now. Something that works now does not mean it is best for a million users. I get you 2's point.
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo