Jump to content

jponte

Members
  • Posts

    45
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jponte's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, In have a Apache server with MySQL/PHP running on a Windows machine (Quad Core, 4Gb RAM). I have SSL enabled as well. I can upload a 150Mb file without any issues. Now, if I use a Filemanager to download the files here is that happens: Files of upto 20Mb work great after that they do not downlaod. For example, if I try a 150Mb file, I get prompted to download the file but it just saves a 0K file. I have a local WAMPS server which I use to develop and without SSL everything works OK. I have not re-created locally with SSL. I though at the begining that the problem was with the file manager but with a second different code the exact same thing happens. Any settings at the server level that will prevent this to happen? Why the smaller files download perfectly? I saw issues with 2G files but they do not get even close to that. Peace, JP
  2. Hi, I want to add that large files work OK locally with WAMPS and not SSL so I think the problem is related to SSL. Regards, Jack P
  3. Hi, In have a Apache server with MySQL/PHP running on a Windows machine. I have SSL running as well. I downloaded a couple of already coded Filemanagers and they are working OK with small files up to a few MB. However, if I try a 150Mb file it point to downloading the file but it just saves a 0K file. I though at the begining that the problem was with the file manager but with a second different code the exact same thing happens. Any settings at the server level that will prevent this to happen? Why the smaller files download perfectly? Peace, Jack P
  4. Hi, I'm using this awesome PHP File Manager written by Gerd Tentler http://www.gerd-tentler.de/tools/filemanager/index.php?page=introduction&PHPSESSID=a3a1da453c38470eb6856239e9b1f477 The toold worked well when used without SSL. I added SSL and started not to load a page for the download. If I removed the s from the HTTPs URL it works as well but the problem is that files of a few megabytes and higher do not download. They show as 0K. Small files do work. Has anyone encountered anything similar anywhere? Is this a server side setting? Here is the link to the tool http://www.rogers-esc.com/logs/admin/ pass: esc Regards
  5. Got it.... I just got rid of the line alltogether...
  6. Hi, The error is 2. Where can I check it? Thanks, JP
  7. Hi, I changed it to ; Maximum allowed size for uploaded files. upload_max_filesize = 200M ; Maximum size of POST data that PHP will accept. post_max_size = 200M Now my code stops in the middle giving my own error: Error: Please select the file by clicking on the Browse button }elseif (!$_FILES['uploadedfile']['tmp_name']){ echo "<center><b>Error: Please select the file by clicking on the Browse button"; Thanks for your help, JP
  8. Hi, I have a code to upload files to a directory after is created. It works great with small files. After I try uploading a 30Mb file and it dies with the following error: Here is my code: <?php $ticket_number = $_POST['ticketnumber']; $target_path = "uploads/$ticket_number/"; $filename = basename($_FILES['uploadedfile']['name']); //Check the form for completion of fields If (!$_POST['ticketnumber']){ echo "<center><b>Error: Please enter a valid ticket number"; }elseif (!$_FILES['uploadedfile']['tmp_name']){ echo "<center><b>Error: Please select the file by clicking on the Browse button"; } else { //If the directory with the ticket number does not exists one is created if (!file_exists($target_path)) { chdir ("D:/"); mkdir("uploads/$ticket_number", 0777); chmod("uploads/", 0777); chmod("uploads/$ticket_number", 0777); } //Check if the file name inside the directory already exists if (file_exists($filename)) { echo "<center><b>There is a file in your same directory already uploaded with the same name, please change the name and try again!</b>"; echo getcwd() . "<br>"; exit(); }else { $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); } //Move the file to the path selected above if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded<br><br>"; echo "Upload: " . $_FILES["uploadedfile"]["name"] . "<br />"; echo "Type: " . $_FILES["uploadedfile"]["type"] . "<br />"; echo "Size: " . ($_FILES["uploadedfile"]["size"] / 1024) . " Kb<br />"; } else{ echo "There was an error uploading the file, please try again!"; echo "If the error persists please contact Rogers ESC at 1-866-939-3282"; } } ?> Any ideas what is happening? Is it a server side problem? This is a windows server. Peace, JP
  9. Hi, I resolved it through a chdir ("D:/"); Peace, JP
  10. Hi, I had a similar problem and happened that I did not have the correct directort selected. You can use the realpath() function to help you: http://www.php.net/manual/en/function.realpath.php echo the directories you are using and you'll see You can try this code as well to echo all information: <?php $myDir = '../../dir/targetDir/'; if(chmod(realpath($myDir), 0777)) { echo 'Successfully changed dir to 0777 permissions!'; } echo '<br />Safe Mode is: ' . ini_get('safe_mode'); echo '<br />'; clearstatcache(); echo 'Permissions: ' . substr(sprintf('%o', fileperms('/tmp')), -4); echo '<br />'; if(chmod(realpath($myDir), 0755)) { echo 'Successfully changed dir to 0755 permissions!'; } echo '<br />'; clearstatcache(); echo 'Permissions: ' . substr(sprintf('%o', fileperms('/tmp')), -4); ?> Peace JP
  11. Hi, I would like to upload my files do another drive in my windows server but I do not know how to write the new path to the E drive: I tried but does not seem to be working $target_path = "../../../../../uploads/$ticket_number/"; I'm located righ now in: C:\Dir1\Dir2\Dir3\Website\logs Thanks for the help, JP
  12. Hi, Thanks PFMaBiSmAd. As you said, I did not have the file name to be write, So I added/changed the following 3 $target_path = "uploads/$ticket_number/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { Peace, JP
  13. Hi, I'm having issues uploading a file file to my server with a very small and simple script. It works when I do not create a new folder and leave everything in the Uploads folder but I would like to create an individual folder with the ticket number provided in the form and store all submited files there. <?php $ticket_number = $_POST['ticketnumber']; mkdir("uploads/$ticket_number", 0777); chmod("uploads/", 0777); chmod("uploads/$ticket_number", 0777); $mydir = "uploads/$ticket_number"; if(chmod(realpath($myDir), 0777)) { echo 'Successfully changed dir to 0777 permissions!'; } $target_path = "uploads"; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path .'/'. $ticket_number)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded<br>"; echo $ticket_number; } else{ echo "There was an error uploading the file, please try again!"; } clearstatcache(); echo 'Permissions: ' . substr(sprintf('%o', fileperms($mydir)), -4); // Result here is 0777 ?> The paths are all fine. Here are the errors I get: Warning: move_uploaded_file(uploads/ww) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\Documents and Settings\jack.ponte\Desktop\Website\logs\uploader.php on line 56 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'c:/wamp/tmp\php13E.tmp' to 'uploads/ww' in C:\Documents and Settings\jack.ponte\Desktop\Website\logs\uploader.php on line 56 Any help will be appreciated. Jack P
  14. Hi, I knew the code was good. The "connection" word I guess it is reserved so I changed the field name and voila. It works. Peace, JP
  15. Hi, I have looked at this code forever and I cannot see the fault. Let me know if anyone is able to. Thanks again, JP
×
×
  • Create New...

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.