Php file upload

Username (e.g. epiz_XXX) or Website URL

(http://www.macroprime.cf)

Error Message

(Shows errror upload failed after i have uploaded some other files)

Other Information

(So, i made this photo sharing website, where you can sign in and share photos. The problem is when i upload a few photos the mysgl insert into database failed error kicks in just like that. I need help guys)

  • Pornographic/adult content
  • Proxy scripts
  • Chat scripts
  • Bitcoin / cryptocurrency faucet sites

File sharing / file storage scripts

  • Autolike scripts
  • Hacking scripts / PHP shell scripts
  • Phishing
  • Mass mail scripts
  • Website scraping/crawling/downloading scripts
  • Torrents
  • Warez
  • Cracked/pirated content of any kind

This is mentioned in ToS (https://infinityfree.net/terms/)

File hosting or File Sharing is not allowed in infinityfree and your account will be suspended by admin if you violate it.
Please refer the ToS Terms of Service - InfinityFree

@anon77371365 Couldn’t you say why you’ve listed these content? For who doesn’t have read ToS it’ll be a bit of non-sence, Address to the Terms of service and which .No you’ve taken it from next time!

@simon12345 We do not allow file sharing/hosting, if you want you can use Image hosting API’s to host their images when they press upload button, otherwise you cannot host this content with us.

5 Likes

Couldn’t you say why you’ve listed these content? For who doesn’t have read ToS it’ll be a bit of non-sence, Address to the Terms of service and which .No you’ve taken it from next time!

Okay @anon19508339 hereafter I will mention it

Yes you mentioned ToS but still didn’t say the reason for listing these.

1 Like

Can you please share the FULL error message you SEE? You say you get a “upload failed” or “database failed” error? Does it say anything else?

4 Likes

$upload = mysqli_query($link,“INSERT INTO photos VALUES($i,‘$name’,‘$width x $height’,‘$imagepath’,‘$size’,‘$username’,‘$category’, ‘$useremail’,0,0)”) or die(“Couldn’t upload.”);

Well, i will have to upgrade then, thank you.

Just FYI: file sharing sites are not allowed on premium hosting either. The terms of service are not different between free and premium hosting, the only difference is how strictly they are enforced.

As for your issue, it would help a lot if you could get the actual error message from the database query. Right now, you only know if it breaks, but not why it breaks.

You can do that by changing your code like so:

$upload = mysqli_query($link,"INSERT INTO photos VALUES($i,'$name','$width x $height','$imagepath,'$size','$username','$category', '$useremail',0,0)");

if ($upload === false) {
    die("Couldn't upload: ".mysqli_error($link));
}
2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.