Jump to content

Recommended Posts

Posted

I installed Group-Office for an Intranet, but the download.php script doesn't work on the TCH server (works on my dev box, PHP 4.2.1 Apache 1.3.22). It displays the unencoded document in the browser.

 

Anyone have a download script that works on TCH?

 

Thanks!

Ellen

Posted (edited)

Ellen, I'm not sure what you need from a PHP download script. Download count? Referrer tracking? I know I posted something about this here on the forums not long ago but I can't seem to find the post :dance:

Anyway, these google searches provided some links which might give you what you need.

 

Hope this helps.

 

If it's not what you want or if you need help setting it up, just post a message here and I'll be glad to help you find something that suits your needs or help you with the instalation of the script :D

Edited by borfast
Posted

I'm using the download script to view various files online that are located outside of the document root so that I can maintain security on who can view the files. For example, if you go to http://www.atlrecsvc.com/groupoffice and login with pro1/pro1 - then click on the "Files" icon - click on the Daily Report folder - you will see a link to a word document. Right now the download.php script shows the document un-encoded. The download script works fine on my Linux server at home running PHP 4.2.1, and I can view the MS Word document.

 

The download script is responding just like the cPanel "Show File" in the File Manager. Is this how File Manager is supposed to behave?

 

Thanks!

Ellen

Posted

Hmm... that seems like an incorrect MIME type...

 

Check the MIME types on your CPanel, perhaps you're missing the MS Word one. If that's the case, try adding it:

application/msword

 

But I don't think that's the problem, though, since all servers have (or at least should have) that MIME type installed by default.

 

I don't know Group-Office but I'd say the problem is that the PHP code isn't setting the MIME type for the downloaded data, and so the browser thinks it's receiving an HTML page instead of a Word attachment, so it proceeds accordingly: it shows the document on it's window instead of offering a download dialog to the user.

 

Still, you say this works on your linux dev-box, so it should work here at TCH without any problems...

 

I guess I'll have a look at that Group-Office and try to find the problem. I'll post here if I find something.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...