Configuring Webserver (apache) for PHP

Discussion in 'PHP' started by WhitneyM, Oct 29, 2009.

  1. #1
    Hello,

    I just downloaded apache 2.2, php 5, and mysql 5.1. My mysql seems to be working fine and so does my apache server. However when I make pages with php code on them they show up on the webpage. I am not having this problem with the html on the pages. I think it may be due to the fact that I didn't configure it properly. The book I have that explains how to configure the programs tells me to do the following:
    to php: take ; out of ;extension=php_mysqli.dll (i did this and didn't have a problem)
    to apache: add addtype application/x-httpd-php .php (i also did this and didn't have an issue)
    activate module by removing # from #loadmodule php5_module "c:/php/php5apache2.dll" There was no module for this so I added it and it told me there was an error when i went to restart it. I tried naming the module loadmodule php5_module "c:/php/php5apache2_2.dll" because I have a file that came with the php download named that. It told me there was an error for that also. I also have a file named php5apache2_2_filter.dll but i wasn't sure what that is.

    So I don't really know how to configure apache for the php file. If anyone could help me figure this out that would be great. O and by the way I am using windows xp. Thanks.
     
    WhitneyM, Oct 29, 2009 IP
  2. techbabu

    techbabu Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi..

    Did you check this http://www.easyphp.org/

    I hope It will help you.

    Techbabu
    Don't just make a website: Make an impact
     
    techbabu, Oct 29, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Just install Xampp and all the stuff will be installed properly u will not need to compile anything just install it
     
    Bohra, Oct 29, 2009 IP
  4. sunchiqua

    sunchiqua Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Assuming that you've installed PHP into C:\PHP5 ( if not, change the path ):

    LoadModule php5_module "C:/PHP5/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    PHPIniDir "C:/PHP5"
    Code (markup):
     
    sunchiqua, Oct 29, 2009 IP
  5. wildogre

    wildogre Well-Known Member

    Messages:
    1,018
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    128
    #5
    check out www.appservnetwork.com you don't need to configure its already configured for a local system. Best of luck.
     
    wildogre, Oct 29, 2009 IP
  6. kind_of_the_cash

    kind_of_the_cash Active Member

    Messages:
    852
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    85
    #6
    easyphp is good choice comes with

    pre configured

    Linux , apache , mysql , php there :)
     
    kind_of_the_cash, Oct 29, 2009 IP
  7. WhitneyM

    WhitneyM Guest

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ok, so I downloaded from appservnetwork because I didn't need linux and when I went to the website to figure out where to save the files for the website because there is no htdocs file it said to save them under www and when i type in localhost/filename it doesn't show up, only if I type in the actual location on my computer. Do I need to save the files someplace else?
     
    WhitneyM, Nov 3, 2009 IP
  8. adwebtiser

    adwebtiser Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I use Appserv and I put all my files in C:/Appserv/www/filename.php

    and I will type in http://localhoost/filename.php and it works perfectly

    Did you uninstall all the applications (PHP, MySQL & Apache) before installing Appserv?

    If not uninstall everything as well as appserv and start a fresh install.
     
    adwebtiser, Nov 3, 2009 IP
  9. WhitneyM

    WhitneyM Guest

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I uninstalled it and then reinstalled it and saved it and it runs fine. I didn't uninstall the apache from before. Thanks everyone for all of your help!
     
    WhitneyM, Nov 3, 2009 IP