SitePoint Sponsor

User Tag List

Results 1 to 23 of 23
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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!!!

  2. #2
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kindly try to use the default port 80 in your httpd.conf file and have a try.

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Whoops! That's NOT the problem (although mixing IIS and Apache isn't a good idea).

    What's required is:
    Code:
    AddType application/x-httpd-php .php
    ... in your httpd.conf.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Jerry,

    All I added to my httpd.conf was
    Code:
    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
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  6. #6
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!!

  7. #7
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Are you restarting apache each time you edit httpd.conf?

  8. #8
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I am....

  9. #9
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    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
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  10. #10
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,068
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    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.
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  11. #11
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!!........

  12. #12
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,068
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    How are you trying to access Apache?
    HTML Code:
    localhost:<port_number>
    ?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  13. #13
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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............

  14. #14
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    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
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  15. #15
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    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...

  16. #16
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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...

  17. #17
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    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
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  18. #18
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    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....

  19. #19
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    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
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  20. #20
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    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!

  21. #21
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    jerry,

    No problem! This is how we all learn!

    On the other hand, the more we know, the more we forget ...

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  22. #22
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    On the other hand, the more we know, the more we forget ...



    DK
    I like it....haha....

  23. #23
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    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!
    Apache doesn't use MySQL either -- web servers don't use database servers (unless someone writes an odd extension), our programs (PHP and such) do. And all the languages that IIS can run play well with MySQL.

    In any .NET language, the CLR provides 3 interfaces to MySQL, through ODBC.NET, OLEDB.NET and native MySQL .NET providers for ADO.NET.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •