Firefox asks me to save php file instead of browsing it

Hi Guys…
I have IIS and Wamp installed on Windows 2000 server. I have setup different port for Apache (8080) on httpd.conf. When I try to browse the php page through firefox or chrome…The browser pops a window asking me to download the php file…I have spend so much time on google but still can’t find the answer…Any helps or suggestions would appreciates…Thanks!!!

Kindly try to use the default port 80 in your httpd.conf file and have a try.

Whoops! That’s NOT the problem (although mixing IIS and Apache isn’t a good idea).

What’s required is:

AddType application/x-httpd-php .php

… in your httpd.conf.

Regards,

DK

Thx guys…I already added dk’s line into my file but still can’t get it worked.

Default port 80 can’t even open html pages…

Anymore ideas? I tried to paste the text into the box but the system said I can’t post a website yet…lol

Jerry,

All I added to my httpd.conf was

LoadModule php5_module "C:/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/Windows"

I would have thought that you would have had your other two lines already - sorry.

Regards,

DK

DK…thx for the suggestion…I have tried your codes but still not working…I changed your line
LoadModule php5_module “C:/PHP/php5apache2_2.dll”
to LoadModule php5_module “C:\wamp\bin\php\php5.2.6\php5apache2_2.dll”

and placed all 3 codes to my httpd.conf…no luck…

I am very frustrated for this problem and really don’t have ideas about this…Would you have any suggestions? Thanks for the help!!

Are you restarting apache each time you edit httpd.conf?

Yes I am…

jerry,

IMHO, using canned programs like you’re doing leads to frustrations like you’re experiencing. If there is a problem with WAMP, XAMPP, yadda-yadda, the best thing you can do is to use their forum as others have likely had the same problem. When they use different file structures, there’s no way to really help other than recommend that you look for the CREATOR’s (Apache.org, PHP.net, etc) file structure for the named file and then SEARCH for it.

That or follow Kevin Yank’s directions in the FREE Chapter One of his first book and install each daemon with the latest and greatest (stable versions) of the software. This is what I do and have never had a problem (of course, my first step was to STOP IIS then edit its properties to prevent autostart - I ONLY want Apache and I want it ON port 80).

Regards,

DK

The “canned” programs have fixed problems for a number of people, I’ve seen a few threads in the forums where people have had trouble with installing them individually, when a “canned” program is used they don’t have any problems.

The problem is most likely a conflict somewhere along the line between Apache and IIS. Do yo need IIS for anything, if not disable it and go with WAMP.

I do need IIS for other 4 websites that were created by NET. I installed WAMP on my machine and it works fine…I even installed IIS on my machine to run. However, when I sent the files to my client’s server. It didn’t work at all…:(. I don’t know what else I could do except teaching my client to install Apache, PHP/MySql individually which is a PAIN!!..:sick:

How are you trying to access Apache?

localhost:<port_number>

?

this is the address I am testing now…

http://www.goodtrend-ce.com.cn/main.php

I asked my client to use http://localhost:8080/main.php to access the page through IE, he said its fine (he doesn’t have firefox or chrome), but when I typed in the address above http://www.goodtrend-ce.com.cn/main.php by using Firefox or Chrome on my computer. It asked me to download the files…:sick:

jerry,

Is your computer HOSTING the www.goodtrend-ce.com.cn domain? If not, then it will look to the DNS for the hosting and go to the online website with its request. localhost is the computer you’re using, whichever one that is, and www.goodtrend-ce.com.cn is only hosted on one computer.

CHECK YOUR DNS settings.

Regards,

DK

Thx Dk
I believe my client purchased the domain name from a website service company and use his own machine as the server. I am not sure what should I check for his DNS settings. Would you please be more specific? Besides, should I need to change “ServerName localhost:8080” to "ServerName www…goodtrend-ce.com.cn:8080 " on httpd.conf? Any suggestions would appreciate…Thx…

Here is what happen when I tried to use IE to browse my php pages. I just found out today…don’t know if it will help you guys to figure out what’s going on…

I tried to browse my php pages by using IE, I can see the pages. However, when I tried type in texts on my search box which is suppose to bring up a search result page, the browser said can’t find the page. It was fine when I tested locally. I am sure I uploaded the search result page and don’t understand when I am still getting this error. I hope it will help you guys to solve my headache. Thanks…

jerry,

You’ve stepped into a bucket of worms with this one!

Yes, you need to tell his “server” that it’s hosting both localhost:8080 and goodtrend-ce.com.cn:8080. On my TEST server, that would mean that I must add settings to my httpd-vhosts.conf AND hosts files. Until you get these straightened out, your client’s site will not be seen (except on his own computer with the localhost:8080).

Regards,

DK

Thanks Dk
for keep helping me out about this worms bucket…

I have asked another MIS guy helping me on their company. He just made the PHP pages browserable by setting few things on IIS…but I got another one which is saying

“Fatal error: Call to undefined function mysql_connect() in E:\goodway\goodtrend-ce\include\connection.php on line 5”

I used phpInfo command to check and found out MySql is not loaded to the Apache server…The guy promised me that he will check it for me…I hope everything turns out well…Thanks guys…any further questions, I will be here again…:smiley:

jerry,

If this “MIS guy” set you up on IIS, i.e., M$'s counterpart to Apache, it would NOT use MySQL because M$ doesn’t rake in $$$ for a free database - you’d have to use mssql or the like which is big bucks!

Get the FREE chapter from Kevin Yank’s book and go through the Installation process there. The one thing that the older versions didn’t make clear enough is that you MUST Stop IIS and set its properties to prevent it starting BEFORE installing Apache. The few configuration “tweeks” for MySQL, PHP and Apache (and myPHPAdmin) are all in there.

Regards,

DK

Well…They have installed Wamp for me…so they have MySql on their machine already.Glad i don’t have to worry about Mssql…“MUST STOP IIS” thing is a big hint…I will make sure he knows it. Again…thanks a lot Dk…you rock!