SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: No today.php

  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question No today.php

    Reference: Build Your Own Database Driven Website using PHP & MySQL, by Kevin Yank.

    I did everything according to the Chapter 1, Installation as depicted. I entered the URL: http://localhost and the proper web page came up. The section titled: Your First PHP Script I copy/paste the code into a today.php script then put the today.php script into the .../Apache/htdocs. When I entered the URL: http:://localhost/today.php I came up with a dialog window that ask me to opne, save or cancel the .php file. I was expecting the "Today's Date..." web page.

    What should I do to rectify this prob? Is the today.php file not in the correct dir? The "Today's date..." does come up but only after I clk the "open" button. Any ideas?

  2. #2
    SitePoint Zealot rrreview's Avatar
    Join Date
    Jul 2002
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a problem with Apache. Have you registered the PHP file type(s) to be executed, rather than opened (default)?

    If not, add this to the end of the httpd.conf file...

    Code:
    LoadModule php5_module c:/php/php5apache.dll
     AddModule mod_php5.c
     AddType application/x-httpd-php .php
     AddType application/x-httpd-php-source .phps

  3. #3
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What rrreview said, except you might need to use php4 instead of php5 if that's what you have installed.


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
  •