SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Not Working on My Computer

    I am working through Sitepoint's Build Your Own Database Driven Website with PHP and MYSQL. I am at chapter 3. I followed the installation instructions and installed PHP, MYSQL and APACHE individually. I did everything it asked. The problem I have is PHP does not seem to be working. When I go through the URL query string example in Chapter 3, the echo statement is not displaying anything. I checked the today.php script (which displays the time) we created earlier and the PHP is not working here either (in other words, it displays the HTML content but does not show the time). I have also uploaded a script of mine and all that is displayed is either a blank page for some pages and all the PHP stuff in plain text for other pages. This script works fine when I uploaded it to my host.

    I have installed the following:

    Apache HTTP Server 2.2.22 (httpd) - Win32 Binary without crypto (no mod_ssl) (MSI Installer)
    MySQL 5.5.22 - Windows (x86, 64-bit), MSI Installer
    PHP 5.3.10 - VC9 x86 Thread Safe

    I am tempted to just install WAMP or something similar but I would much rather keep them individually installed and get to the bottom of this problem. Plus, I am not even sure how I would uninstall the individual packages.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,481
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)
    My localhost is working on Windows7

    I installed
    Apache httpd-2.2.22-win32-x86-no_ssl.msi

    MySQL mysql-essential-5.1.61-winx64.msi
    I couldn't get mysql-5.5.21-winx64.msi to work

    PHP php-5.3.10-Win32-VC9-x86.zip not the installer

    If you have Windows7 you could try those, though it sounds like you're only having problems with PHP

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll never guess what. Installed WAMP and I have the exact same problem as before. Let me explain. I have this small script:

    <p>Today&rsquo;s date (according to this web server) is
    <?php
    echo date('l, F dS Y.');
    ?>
    </p>

    But when I run the page today.php in my browser, all that it displays is:

    Today’s date (according to this web server) is

    No date.

    I have also reinstalled my real estate script and once again the pages are either showing as blank or the php code is being shown as plain text. What has gone wrong?

  4. #4
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,909
    Mentioned
    96 Post(s)
    Tagged
    0 Thread(s)
    When you installed WAMP, did you remove all traces of the previous installs first?

    What file extension are you using?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  5. #5

  6. #6
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    When you installed WAMP, did you remove all traces of the previous installs first?

    What file extension are you using?
    It turned out I was using file://C/Wamp... instead of localhost for the file location. Sorted it now. Thanks for the help.


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
  •