prompted to save .php files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
codr
Forum Newbie
Posts: 2
Joined: Sun Nov 02, 2008 1:55 pm

prompted to save .php files

Post by codr »

I'm trying to use a php proxy script from http://sourceforge.net/projects/php-proxy/

I have a website hosted on one server and I want to use this script to have a second identical site.

When I try to use it it gives me the page as a download. The browser prompts me to save the .php file as if it couldn't be displayed. Other then that I think it is working properly. The contents of the downloaded file looks fine to me.

Could there be a problem in the header to make the browser prompt me to save the file?

Thanks
cboileau
Forum Newbie
Posts: 8
Joined: Sun Nov 02, 2008 8:28 am

Re: prompted to save .php files

Post by cboileau »

codr wrote:I'm trying to use a php proxy script from http://sourceforge.net/projects/php-proxy/

I have a website hosted on one server and I want to use this script to have a second identical site.

When I try to use it it gives me the page as a download. The browser prompts me to save the .php file as if it couldn't be displayed. Other then that I think it is working properly. The contents of the downloaded file looks fine to me.

Could there be a problem in the header to make the browser prompt me to save the file?

Thanks
Sounds like a problem with the Mime-types on the server. Either that or you are setting the content type in the PHP to a filetype that it is trying to download.
codr
Forum Newbie
Posts: 2
Joined: Sun Nov 02, 2008 1:55 pm

Re: prompted to save .php files

Post by codr »

Thanks. After looking into the code it wasn't recognizing the mime type.
I added the line

Code: Select all

$mime_dl["text/html; charset=utf-8"]=false;
to the config file and it seems to help.
Post Reply