PPH Posted February 1, 2007 Share Posted February 1, 2007 Anyone else experiencing the csv download for clients in the admin report section trying to download as csvdownload.php? If saved as a .csv file all the info is intact. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted February 1, 2007 Share Posted February 1, 2007 what server os are you on and what browser are you using? 0 Quote Link to comment Share on other sites More sharing options...
webresellers Posted February 2, 2007 Share Posted February 2, 2007 For me, if I click on the CSV EXPORTS for clients, it just opens in the browser window, if I choose the products, it promots me to save or open, if I open, it opens in the browser, if I try to save it, it errors out with: Internet Explorer cannot download ...csvdownload.php?type=products from http://www.domain.com Using CentOS 4.4 on server WHMCS v3 IE 6 browser 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted February 2, 2007 Author Share Posted February 2, 2007 Linux 2.6.17.11-grsechg Internet Explorer 6 Firefox 2 0 Quote Link to comment Share on other sites More sharing options...
dannygoh Posted February 3, 2007 Share Posted February 3, 2007 same as me. 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted February 4, 2007 Share Posted February 4, 2007 Hey, The file downloads as a .php and not as a .csv or .cvs. Whole just change the ending and your good to go... From, Adam 0 Quote Link to comment Share on other sites More sharing options...
dannygoh Posted February 4, 2007 Share Posted February 4, 2007 nope. i try still got some garbage character 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted March 12, 2007 Share Posted March 12, 2007 This is because WHMCS doesn't send a header saying what the name of the file should be so the browser assumes it's the same as the .php file. This is pretty standard, MB does this too. The fix is to send some headers: //// header('Content-type: application/force-download'); header('Content-Disposition: attachment; filename="'. trim(htmlentities($file)).'"'); header("Content-Length: ".(string)(filesize($full))); header("Cache-control: private"); header("Content-Description: ".trim(htmlentities($file))); header("Connection: close"); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.