Jump to content


This topic is now archived and is closed to further replies.


Forbidden 404 error file upload / unable to load phpfreaks.com

Recommended Posts

I am trying to successfuly run a file upload script, however when i press the submit button, I get the following error


my code is as follows:

$maxsize=28480; //set the max upload size in bytes
if (!$HTTP_POST_VARS['submit']) {
  $error=" ";
//this will cause the rest of the processing to be skipped
//and the upload form displays
if (!is_uploaded_file($HTTP_POST_FILES['upload_file']['tmp_name']) AND
!isset($error)) {
  $error = "<b>You must upload a file!</b><br><br>";
if ($HTTP_POST_FILES['upload_file']['size'] > $maxsize AND !isset($error)) {
  $error = "<b>Error, file must be less than $maxsize bytes.</b><br><br>";
if($HTTP_POST_FILES['upload_file']['type'] != "image/gif" AND
$HTTP_POST_FILES['upload_file']['type'] != "image/pjpeg" AND
$HTTP_POST_FILES['upload_file']['type'] !="image/jpeg" AND !isset($error)) {
  $error = "<b>You may only upload .gif or .jpeg files.</b><br><br>";
if (!isset($error)) {
  print "Thank you for your upload.";
  echo ("$error");

<form action="<?=$PHP_SELF?>" method="post" enctype="multipart/form-data">
Choose a file to upload:<br>
<input type="file" name="upload_file" size="40">
<input type="submit" name="submit" value="submit">

Also on another note, I cannot access phpfreaks.com or any of its directory pages.. All i get is a blank page, and this is on the computer that i installed wamp on which has php mysql and apache on it. can someone please help me with this because it is a pain transfering information from on computer to another just to request for help on this forum. thanks.

Share this post

Link to post
Share on other sites
Thank you soooooo much, it worked :)

now i just need help in viewing phpfreaks.com / I have no idea why i'm not able to view it on my computer.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.