php installation not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dragon52
    New Member
    • Jun 2009
    • 72

    php installation not working

    Hi,

    I have installed MySQL, Apache and PHP on my PC. I think Apache works because when I "http://localhost" I get the "It Works" reply.

    I then want to test PHP. I created a simple test file "phpinfo.ph p" with the text
    Code:
    <?php phpinfo(); ?>
    . When I "http://localhost/phpinfo.php" the browser displays the php code rather than the expected php information.

    Can someone tell me where to look for the problem???

    details:
    the test file "phpinfo.ph p" is in the same folder as "htdocs/index.html"

    I have modified the Apache "httpd.conf " file as follows:

    LoadModule php5_module "c:/program files (x86)/PHP/php5apache2_2.d ll"

    AddType application/x-httpd-php .php

    PHPIniDir "C:/program files (x86)/PHP"



    Apache not recognising .php extension? Can anyone help ????

    I am using Windows 7 (64).

    thanks
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    Code:
    #the proper path of php5apache2_2.dll 
    LoadModule php5_module "C:/Program Files(x86)/PHP/php5apache2_2.dll"
    #copy php.ini file to apache directory and 
    PHPIniDir "C:/Program Files(x86)/apache"
    SetEnv TMP "C:/Program Files/(x86)/PHP/tmp"
    first take a backup of your httpd.conf file and then look for PHPIniDir and other directives in the above code. And try to fix them according to your proper path. after that restart you apache server and then try again.

    Comment

    • dragon52
      New Member
      • Jun 2009
      • 72

      #3
      i have it working now, thanks very much

      Comment

      • johny10151981
        Top Contributor
        • Jan 2010
        • 1059

        #4
        Hey,
        can you please tell me how you make it work?
        did you follow my instruction or you followed something else, if you followed something else, would you please post it here :)

        Comment

        • dragon52
          New Member
          • Jun 2009
          • 72

          #5
          No, I didn't try your suggestion.

          I think my problem was I didn't have the server running. I didn't reboot my PC.

          I still don't know how to start the PHP server mannually.

          Anyway, the next day the system worked.

          Thanks for your help all the same.

          PS, I followed this link to stall MySQL, Apache and PHP

          Install PHP on Windows 7 operating system - detailed instructions with screenshots. Get PHP running on your Windows 7 computer quickly and without problems.

          Comment

          Working...