Re: Strange Download-File Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ave,

The error is "The File Could Not Be Found".

Don't know if you got my latest mail regarding this issue, but I did things
a little differently but still the same result.

This was my last post regarding this issue:

Ave,

Alright... Firstly thanks to everyone who's been trying to help me out.
I've been doing a lot of research and finding out a lot of things. The
problem is definitely very clear... I need to convert the Dynamic URL to
Static URL because, as discussed earlier, Microsoft manages to screw up the
Dynamic part of URL's and thus problems occur.

To remind of what's going on.. I run an Apache Web Server on my PowerMAC G5
Macintosh system, and run my websites on it.

I have a "Force-Download" download script that allows registered users to
Download Files assigned to them.

What has been happening is, when the "Save As" dialog box opens, if you hit
"Save", everything goes well - the file is saved to your desires location,
you can open and view it, HOWEVER, if you hit "Open", it opens the
associated application (eg:- Adobe Acrobat Reader) but fails to open the
file, instead gives an error "File Could Not Be Found".

This is what I did:

Added into my Apache's httpd.conf the following:

<Location /download>
ForceType application/x-httpd-php
</Location>

So that anything begins with www.mydomain.com/download will call my
'download' script.

I put my force download script in a file called "download" in the root
directory. 

Now my URL, instead of looking like
http://informed-sources.com/download.php?F=imsafm/rjohari/ccq.pdf looks
like:
http://informed-sources.com/download/imsafm/rjohari/ccq.pdf

In my Download Script, I was using $F as the variable which contained the
File Path & File Name to be downloaded.
I replaced that with $_SERVER[?PATH_TRANSLATED¹] ...

It works! Accept, it works the same way it was working before. You click the
link, the SAVE AS Dialog box opens.. If you hit Save, the file is saved and
can be opened... HOWEVER, if you hit OPEN, it opens the associated
application and gives the same error.

What am I doing wrong?

Thanks,
Rahul S. Johari




On 12/6/04 1:41 PM, "Richard Lynch" <ceo@xxxxxxxxx> wrote:

> Rahul S. Johari wrote:
>> 
>> Richard,
>> 
>> I had a question for you...
>> When you said:
>> 
>>> The goal here is to change the URL that looks like this:
>>> imsafm2_download.php?F=imsafm/rahul/somefile.txt
>>> 
>>> into a URL that looks like this:
>>> imsafm2_download/F=imsafm/rahul/somefile.txt
>> 
>> Did you mean "imsafm2_download/F=imsafm/rahul/somefile.txt" or
>> "imsafm2_download?F=imsafm/rahul/somefile.txt"
>> The difference being the ³?² instead of the ³/²
> 
> No, I meant to use "/" -- The whole point here is to have *NO* ? in the
> URL so Microsoft can't possibly screw up.  And so search engines will
> index it, too.
> 
>> I did actually edited my Apache¹s httpd.conf and added the <Files>
>> directive. And I modified my code... Right now it still gives the exact
>> same
>> error. I¹m using ³imsafm2_download² instead of ³imsafm2_download.php² now
>> in
>> my code. It¹s working on Mac but not on Windows.. Same error on windows.
>> So
>> I do believe I need to do more then just adding that Directive to fix this
>> problem.
> 
> What same error?
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux