Celeborn Posted August 19, 2010 Share Posted August 19, 2010 Hello,When a customer buys, and then downloads the product from my website the files are no longer working.On investigation, I've found out this is because the get-file.php script is adding a line of whitespace to the original document therefore breaking it. See attached image.The line break on Line 1 should not be there (file should start with 'PK') and this error does not exist in the downloads folder which leads me to believe that get-file.php is adding this whitespace.Any suggestions on how to fix this would be welcome! Link to comment Share on other sites More sharing options...
Celeborn Posted August 19, 2010 Author Share Posted August 19, 2010 The file in questions is a 'Smart Notebook - .notebook extension' file which to my knowledge is XML based. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 19, 2010 Share Posted August 19, 2010 try adding these lines: ob_clean(); flush(); before this line: readfile($file); at the bottom of the file. Link to comment Share on other sites More sharing options...
Celeborn Posted August 19, 2010 Author Share Posted August 19, 2010 no that doesn't work. Thankyou though!Any other idea's? I'm using 1.2.5 btw - Even tried using the latest versions get-file.php and still the same issue! Link to comment Share on other sites More sharing options...
Celeborn Posted August 20, 2010 Author Share Posted August 20, 2010 Anyone able to lend a hand? The next process is to zip all the files up and link them again which I fear will be my only option since the latest version of Prestashop is adding the whitespace also. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 21, 2010 Share Posted August 21, 2010 Are you sure it's not your webserver doing it? Link to comment Share on other sites More sharing options...
Celeborn Posted August 22, 2010 Author Share Posted August 22, 2010 How can I determine if its the server or not? If I type in the exact hash file name to the downloads folder, the file downloads just fine and has not been changed (no line break). I also setup a standalone readfile(); example and that worked fine also. Link to comment Share on other sites More sharing options...
Celeborn Posted August 23, 2010 Author Share Posted August 23, 2010 Last ditch effort before crying ensues over ziping hundreds of files and re-attaching them to the products.Any last attempts of help on this matter? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now