mulysa Posted August 20, 2007 Share Posted August 20, 2007 Situation: I have 2 files, file: makelink.php and downloadit.php makelink.php 's functional is to logging and avoid direct link abuse. downloadit.php 's functional is to initiate download popup to browse no matter what type of file is. Example: Makelink.php will produce the example link as below. http://localhost/downloadit.php?action=download&fid=1d5bb0f8cf058c1f00df85bd2ea68953 Problem: If these 2 files are on the same server it work fine (). it can issue download dialog (with content-type: octet stream) properly. But, due to bandwidth problem, I have to seperated downloadit.php and makelink.php to difference server. Now, makelink.php generate links as below http://other_of_myserver.com/downloadit.php?action=download&fid=1d5bb0f8cf058c1f00df85bd2ea68953 Now, this is where problem happen makelink.php behave like it used to be properly, but downloadit.php is not. Instead of issue "content-type: octet stream" as it used to be to browser. It 's not. It was issued "content-type: text/html" which mean that even .zip, .rar file all of them will display on the browser window as text. No download popup at all ?? I am 100% sure that downloadit.php was coded in proper way since it working properly if located in the same server as makelink.php I have tried to investigate this issue with Firebug plugin and all possible log messages for 3 days, but still no luck at all. If anyone can shred me some light on this I would be more than glad to thank you. Quote Link to comment Share on other sites More sharing options...
Danosaur Posted August 20, 2007 Share Posted August 20, 2007 your link wont work, your pointing to your localhost Quote Link to comment Share on other sites More sharing options...
mulysa Posted August 20, 2007 Author Share Posted August 20, 2007 That's is not the problem, it's just an example. It do work even on localhost or on production. But, not when makelink.php and downloadit.php located on the difference server. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 20, 2007 Share Posted August 20, 2007 are both servers same version of php and also check if you have whitespace, if whitespace errors (and you are supressing errors) it will display as text/html and not dispay error. check the source code for errors also. (of download.php) Quote Link to comment Share on other sites More sharing options...
mulysa Posted August 20, 2007 Author Share Posted August 20, 2007 are both servers same version of php and also check if you have whitespace, if whitespace errors (and you are supressing errors) it will display as text/html and not dispay error. check the source code for errors also. (of download.php) Both server are not same version , but each of them and produce the good result if both makelink.php and downloadit.php are on the same server. The white space error for this one I am not quite sure. but atleast if it workfine once it located in the same server, I don't think it got this problem anyhow. I will try to double check it again. I have even try to make a symlnk to downloadit.php on other server as below: main server (where makelink.php located): ln -s downloadit.php http://other_server.com/downloadit.php But, It doesnt work, I got this error in http log: Symbolic link not allowed or link target not accessible Quote Link to comment Share on other sites More sharing options...
mulysa Posted August 21, 2007 Author Share Posted August 21, 2007 anyone got idea? ??? 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.