View Full Version : Download feature returns permission denied/cannot mod header

12-23-2005, 10:31 PM
First, let me say that I've read the other posts on similar topics, tried them all and nothing has worked, so please bear with me =)
When a user attempts to download a purchased file, they get something with the filename (document.doc or spreadsheet.xls), but it's only 4K and the contents are this:

<br />
<b>Warning</b>: mkdir(/home/****/public_html/catalog/pub/.smtscpxzietweyvm): Permission denied in <b>/home/****/public_html/catalog/download.php</b> on line <b>91</b><br />
<br />
<b>Warning</b>: symlink(): No such file or directory in <b>/home/****/public_html/catalog/download.php</b> on line <b>92</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/****/public_html/catalog/download.php:91) in <b>/home/****/public_html/catalog/includes/functions/general.php</b> on line <b>29</b><br />

So there's two obvious problems, right? BUT my pub directory is already CHMODd 777, as is my download directory and my catalog directory. For good measure, I made the files inside the directory 777 as well. I know that the prob is that it can't write the little generated file inside /pub, but I don't understand why, as it is 777.
So an obvious workaround would be to disable the redirect feature in the admin panel's download settings. Done! But I'm still getting the same error, from line 91. So I comment out the code that does the redirect method. Still get the error referencing line 91. So I delete those lines of code, leaving just the command from the "else" option (minus the closing bracket, of course). Still get the error, still referencing line 91. I'm clearing my cache, etc etc so I don't know how this can be.
Without that problem being fixed, I barely addressed the "headers already sent", except to check for extraneous spaces, run BBEdit's "zap gremlins" and even comment out the code that sends the headers. Still the exact same error code, except for the randomly generated string of characters for the /pub file to be written.
I'm stumped. The permissions are 777. The code still returns errors even when the line does not exist.
But I still need to sell these documents and spreadsheets. Arrgh! Any help would be a wonderful Christmas present! Thanks.