Find the answer to your Linux question:
Results 1 to 7 of 7
Hi Linux gurus, I made a big mistake. I installed apache and php for windows and was successful. I can view my php files but not so long.... When I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2003
    Posts
    34

    PHP page cannot be viewed


    Hi Linux gurus,

    I made a big mistake. I installed apache and php for windows and was successful. I can view my php files but not so long....

    When I opened my php file on my windows explorer I was asked to open it using programs listed. I choose mozilla to open it and thats it. My mistake had finally come to pass.

    Instead of opening my php file in my browser using http://localhost/sample.php

    I used programs to open it. Now, whenver i open a php file the codes are being displayed in the browser instead of running it.

    How can I rectify my mistake?

    I already have this entry on my httpd.conf

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .shtml
    AddType application/x-httpd-php-source .phps

    DirectoryIndex index.html index.php index.php4 index.htm default.php index.php3 index.html.var index.shtml
    AccessFileName .htaccess

    Enlighten me

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    hmm...

    Looks like PHP is not parsing the page, do you have the LoadModule lines for php in the httpd.conf?

    You will need to STOP apache and then START it after adding them.

    Jason

  3. #3
    Just Joined!
    Join Date
    Nov 2003
    Posts
    34
    Quote Originally Posted by Jaguar
    hmm...

    Looks like PHP is not parsing the page, do you have the LoadModule lines for php in the httpd.conf?

    You will need to STOP apache and then START it after adding them.

    Jason
    Yes, I do have the LoadModule entries on my httpd.conf.

  4. #4
    Just Joined!
    Join Date
    May 2003
    Posts
    43
    apache 2?

    I had that problem with my apache2/php build, I had to write a shell script/cron job to restart apache every 30 minutes, eventualy I downgraded apache to 1.3.8

  5. #5
    Just Joined!
    Join Date
    Nov 2003
    Posts
    34
    Quote Originally Posted by Cisien
    apache 2?

    I had that problem with my apache2/php build, I had to write a shell script/cron job to restart apache every 30 minutes, eventualy I downgraded apache to 1.3.8
    Thanks Cisien.

    Do you none of what i did affects or had caused the problem; and was all about apache 2?



    To All,

    Any concurrence on the matter?

  6. #6
    Just Joined!
    Join Date
    May 2003
    Posts
    43
    I've just had this experience with apache 2 before. it is also recomended by the php people to use apache 1.3.x with php because of some odd problems that they are still having with apache 2

  7. #7
    Just Joined!
    Join Date
    Nov 2003
    Posts
    34
    Quote Originally Posted by Cisien
    I've just had this experience with apache 2 before. it is also recomended by the php people to use apache 1.3.x with php because of some odd problems that they are still having with apache 2

    Thank you for you help

Posting Permissions

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