keyura Posted November 16, 2010 Share Posted November 16, 2010 I get the payment through paypal, i get the emails also + even my customer receives the email and invoice. Everything works fine till here. But when the customer clicks on the link to download, acrobat reader notifies that it is either not supported format or becuase the file is damaged.I tried going to pHpmyAdmin and checked the hash codes do match.Moreover i even wrote the code ob_end_flush(); in get-file.phpi am not the master but i tried searching the forum and whatever help i could find, i have implemented.All efforts in vain, any help will be highly appreciated.I am using the prestashop version 1.3.2.3. Link to comment Share on other sites More sharing options...
keyura Posted November 16, 2010 Author Share Posted November 16, 2010 There is no body to help or what. AM really stressed please help me out. Without my problem getting solved I have no use of my shop. Please help. Link to comment Share on other sites More sharing options...
tomerg3 Posted November 16, 2010 Share Posted November 16, 2010 Try to enable error reporting in /config/config.inc.php (line #4), then try to right click on the invoice and "save as", open the file with notepad and see there are any errors in it. Link to comment Share on other sites More sharing options...
keyura Posted November 17, 2010 Author Share Posted November 17, 2010 In config/config.inc.php, I have changed it as follows:From/* Debug only */ini_set('display_errors', 'off');define('_PS_DEBUG_SQL_', false);to/* Debug only */ini_set('display_errors', 'on');define('_PS_DEBUG_SQL_', false);Thereafter I have tried as you said and i opened the invoice with notepad and it is as attached here. Please have a look at it as I am not that techy savyy. Hope you will be able to recognize something. pdf-invoice.txt Link to comment Share on other sites More sharing options...
tomerg3 Posted November 17, 2010 Share Posted November 17, 2010 There is no error in the file, I am not sure why it's not showing. Link to comment Share on other sites More sharing options...
keyura Posted November 17, 2010 Author Share Posted November 17, 2010 Ok after a while I did this...I opened the invoice and the link i was clicking to download. I did right click on it and save it as... then saved it as txt file.THe following contents are there in that notepad file. Warning: readfile() has been disabled for security reasons in /home/freemone/public_html/onedollarshop/get-file.php on line 264 Kindly help further please. What do i have to do now?I found the following code at that position in get-file.php/* Set headers for download */header('Content-Transfer-Encoding: binary');if ($mime_type) header('Content-Type: '.$mime_type);header('Content-Length: '.filesize($file));header('Content-Disposition: attachment; filename="'.$filename.'"');readfile($file); Link to comment Share on other sites More sharing options...
tomerg3 Posted November 17, 2010 Share Posted November 17, 2010 Talk to your host about enabling that function readfile() , or ask them what they allow to use instead. Link to comment Share on other sites More sharing options...
keyura Posted November 17, 2010 Author Share Posted November 17, 2010 SUre, I am just now going to talk to them, and will update this post.Thank you very much. Link to comment Share on other sites More sharing options...
keyura Posted November 17, 2010 Author Share Posted November 17, 2010 By the way just for curiosity i was checking the download folder/download/.htaccess and i found the following within the .htaccess file.Order deny,allowDeny from allCan it make any difference? Link to comment Share on other sites More sharing options...
keyura Posted November 17, 2010 Author Share Posted November 17, 2010 You are the master and a half tomerg3.readfile() was enabled by my host and it really worked. Thank you so so so much for your help and advise. I tested and bingo. 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