Results 1 to 8 of 8

Thread: Can't Display a PHP file in browser

  1. #1

    Thread Starter
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Can't Display a PHP file in browser

    I am able to view html pages with embeded php scripts but when I attempt to view a php file in my browser I get a file not found error. Here if is my addtype statement from the httpd file:

    AddType application/x-httpd-php .php .phtml .html

    I am sure this is where my problem is but I don't know a that much about php yet.

    Thanks
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    does the file actually exist?
    Like Archer? Check out some Sterling Archer quotes.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Do you also have:

    ScriptAlias /php/ "C:/php/"

    (or wherever you installed it)

    and a


    Action application/x-httpd-php /php/php.exe


    ?

  4. #4

    Thread Starter
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965
    Kows:

    The file does exist I saved it with a .php extension and saved the exact same file with a .html extension. The html file comes up fine and displays the embeded PHP Script but the file with the .php extension states that the file doesn't exist.

    mendhak:

    The only PHP specific entries I have made is the one that I listed in my original post as well as an AddType entry regarding the files types .php .phptml .html (I think, when I get home I will check).

    Where would I enter the following values:

    1) ScriptAlias /php/ "C:/php/"
    2) Action application/x-httpd-php /php/php.exe


    Thanks!
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  5. #5
    New Member
    Join Date
    Jan 2004
    Posts
    13
    Your httpd.conf file

  6. #6

    Thread Starter
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965
    tempest1
    Thanks for the post but do they eed to be in any particular section of the httpd.conf File?



    Thanks again
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    PHP is not (usually) CGI, the ScriptAlias should not be necessary and might be harmful.

    Is mod_php actually installed on your server (i.e. does it actually have PHP support)?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    I don't suggest enabling PHP as CGI.. it doesn't allow much flexibility with file locations on your server and can be quite annoying..
    Like Archer? Check out some Sterling Archer quotes.

Posting Permissions

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



Click Here to Expand Forum to Full Width