View Full Version : Errors since migration !
Hi
I'm new to this forum so I hope I don't make any mistakes.
Since migration I am experiencing some errors on my hosting which 'support' seem unable to answer. My site (www.store.simply-e.net) was functioning correctly until it was migrated also my hosted zip files could be downloaded correctly before migration.
In the site I am now getting 404 Not Found errors when looking for a file in a generated directory (name begins with .) this did not happen on the old platform.
The second issue is with zip files above about 3mb. In one example a 4mb zip file terminates before completion and in the second a 24mb zip file gets downloaded as 0mb and I have tried re-uploading. These errors occur in both explorer and firefox.
Again these worked correctly before migration.
Any help would be much appreciated.
Kind regards
Chris
I have just verified the problem with directories with leading periods. What is happening is that the webserver sends a "301 Moved Permanently" response to your browser, redirecting your browser to your local system (your public IP address). I'll send a request to support.
I'm not sure about the zip file issue, though (I don't really use my site as a website, so I've never done that before). Is the problem when you are trying to download a zip file from the website, or when you are trying to upload it to the web site? Also, how are you trying to transfer the file -- FTP, PHP script, etc?
I have just verified the problem with directories with leading periods. What is happening is that the webserver sends a "301 Moved Permanently" response to your browser, redirecting your browser to your local system (your public IP address). I'll send a request to support.
I'm not sure about the zip file issue, though (I don't really use my site as a website, so I've never done that before). Is the problem when you are trying to download a zip file from the website, or when you are trying to upload it to the web site? Also, how are you trying to transfer the file -- FTP, PHP script, etc?
Hi
Thank you for your promt reply.
The problem with zip files is when downloading from a link such as - http://simply-e.net/getmyfile.php?file=scoubies_300.zip (zip file is 4mb) using a web browser. (I hope it's ok to put links in posts) the getmyfile script points to the correct directory. This file only partially downloads.
Hi
Thank you for your promt reply.
The problem with zip files is when downloading from a link such as - http://simply-e.net/getmyfile.php?file=scoubies_300.zip (zip file is 4mb) using a web browser. (I hope it's ok to put links in posts) the getmyfile script points to the correct directory. This file only partially downloads.
I don't really do much with websites, but it sounds like you're probably having an issue with the PHP timeout referenced in this thread:
http://forum.powweb.com/showthread.php?t=66886
Try to download the file again, and keep an eye on the time. Try to see if it's stopping at (around) 60 seconds.
Unless I'm mistaken, once the php script finds the file and the file starts to download, it would no longer be an issue with php or it's timeout function. File downloading is done via HTTP once the download process begins.
chrisw,
I was able to download the file you linked to above and it downloaded completely with no corruption, using Firefox and IE
Unless I'm mistaken, once the php script finds the file and the file starts to download, it would no longer be an issue with php or it's timeout function. File downloading is done via HTTP once the download process begins.
chrisw,
I was able to download the file you linked to above and it downloaded completely with no corruption, using Firefox and IE
You might be right. I don't have a lot of experience with PHP, so without seeing the file, I couldn't say. I do know that the request for the file does not redirect you anywhere else, and the file is downloaded with the following request and response:
GET /getmyfile.php?file=scoubies_300.zip HTTP/1.1
Host: simply-e.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://forum.powweb.com/showthread.php?p=387380
HTTP/1.1 200 OK
Date: Sun, 09 Jul 2006 06:07:32 GMT
Server: Apache
X-Powered-By: PHP/4.4.2
Content-Disposition: attachment; filename="scoubies_300.zip"
Content-Length: 4595404
Connection: close
Content-Type: application/x-zip
<binary data>
Just by looking at that, it looks like the PHP processor is the one sending the file, so I'm guessing that the script is running until the download is complete. I'm guessing that you and I didn't have problems downloading the file because we're on fast connections, so our downloads completed before 60 seconds were up. chrisw, is it possible for you to post the contents of your getmyfile.php file?
Hi
I am only getting 2.5mb of this 4.4mb file.
Withe this - http://www.simply-e.net/getmyfile.php?file=ebook_webstore8.zip
I get 0mb and so have other people, it should be 23mb.
This is the script
<?php
//Path to where the requested files should be (needs trailing slash);
$path="xxxxxx/";
if (!function_exists('mime_content_type')) {
function mime_content_type($f) {
$f = escapeshellarg($f);
return trim( `file -bi $f` );
}
}
$file = $_GET['file'];
if( ( !$file ) or ( !file_exists( $path . $file ) ) ) {
die( "OOPS! Access denied! Contact the website now!" );
}
$filetype=mime_content_type($path.$file);
header("Content-Disposition: attachment; filename=\"$file\"");
header('Content-type: '.$filetype);
readfile( $path . $file );
?>
This worked on the old platform even with files as large as 30mb.
Hi
I am only getting 2.5mb of this 4.4mb file.
Withe this - http://www.simply-e.net/getmyfile.php?file=ebook_webstore8.zip
I get 0mb and so have other people, it should be 23mb.
I, too, am immediately getting a 0-byte file. Here's the full request/response:
GET /getmyfile.php?file=ebook_webstore8.zip HTTP/1.1
Host: www.simply-e.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://forum.powweb.com/showthread.php?p=387382
HTTP/1.1 200 OK
Date: Sun, 09 Jul 2006 06:29:27 GMT
Server: Apache
X-Powered-By: PHP/4.4.2
Content-Disposition: attachment; filename="ebook_webstore8.zip"
Content-Length: 0
Connection: close
Content-Type: application/x-zip
The server is telling that the client that there is no data in the file, and is not sending any data. Can you download this file directly (by specifying it's direct URL instead of calling getmyfile.php)? I'll take a look at the getmyfile.php file and see if I can figure anything out.
Hi Guys
Thank you so much for your help with this it seems like its the script that is giving the problems on the new hosting. I tried downloading without the script and it works correctly.
Just the directories with leading periods to fix now.
The file download problem does appear to be caused by the PHP timeout. According to the other thread referenced in my earlier post, tech support said that there is a strict 60-second time limit for PHP scripts. I just uploaded a 100MB zip file to my site, along with this getmyfile.php file. I tried to download the zip file using getmyfile.php, but it stopped after exactly 60 seconds. Unfortunately, I don't think there's any way around this other than redirecting the user to the destination file itself. I'm assuming that you have your reasons, but I'll ask anyway. Is there any specific reason you're using a PHP file to retrieve and send the file as opposed to directing people the the file's actual location?
As for the issue of the directories with leading periods, I did send a support request, but haven't heard anything yet
I just used the php file to mask the actual location of my files.
That's what I figured. In that case, you don't want to redirect people to the actual destination. I wonder if there's any other way to do what you want, maybe using Perl or another scripting method.
I'm am going to evaluate another download protection script, it was just that the one I used was OK until the migration and as I am pretty new to php I never realised that it could be a problem with php script timing.
After reading the other thread it seems that alot of people are having problems with the 60sec. timeouts.
I'm am going to evaluate another download protection script, it was just that the one I used was OK until the migration and as I am pretty new to php I never realised that it could be a problem with php script timing.
After reading the other thread it seems that alot of people are having problems with the 60sec. timeouts.
Good luck, but I seriously doubt you'll get anything to work. It's not only PHP that's restricted to a 60-second runtime, but all CGI apparently. I just created a shell script and tried to download my 100MB file, and it stopped at 60 seconds.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.