SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: PHP problem

  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP problem

    Hi
    I am having problems running a PHP script. I used kevin yanks guide to mysql and PHP to get this far.
    So far under a win32 platform I have installed
    mysql to c:\mysql
    php to c:\php
    apache to c:\program files\apache
    I did all of the suggested setup configuration according to his article

    http://www.webmasterbase.com/article.php?pid=0&aid=525

    He give a sample script to use "today.php.txt"
    Here it is:

    <html>
    <head>
    <title>Today's Date</title>
    </head>
    <body><p>Today's Date (according to this Web server) is
    <?php
    echo( date("l, F dS Y.") );
    ?></p>
    </body>
    </html>

    I saved it as "today.php.txt" to this directory:
    C:\Program Files\Apache Group\Apache\htdocs

    but when I attempt to access the file via IE5.5 using

    http://localhost/today.php

    The date portion of the code will not display in browser, although the text will ie.("Today's Date (according to this Web server) is")
    So I assume the script is not being handled. Can someone please help me resolve this.

    Thanks,
    Andrew

    P.S.

    When starting the apache server v1.3.23 the console give indication that PHP 4.1.1 is running as well.

  2. #2
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You need to save it as .php rather than .php.txt in order for it to be parsed....
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  3. #3
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome......
    Now that was easy..

    Thanks,

    Andrew

  4. #4
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    heh - no probs - now the fun starts for ya - you'll be back soon

    H
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS


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
  •