hughesa1 — 2012-04-17T15:28:01-04:00 — #1
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.
mittineague — 2012-04-17T17:01:37-04:00 — #2
My localhost is working on Windows7
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
hughesa1 — 2012-04-17T18:11:51-04:00 — #3
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’s date (according to this web server) is
echo date('l, F dS Y.');
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
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?
spacephoenix — 2012-04-18T01:58:52-04:00 — #4
When you installed WAMP, did you remove all traces of the previous installs first?
What file extension are you using?
system — 2012-04-18T08:03:22-04:00 — #5
hughesa1 — 2012-04-18T11:05:02-04:00 — #6
It turned out I was using file://C/Wamp... instead of localhost for the file location. Sorted it now. Thanks for the help.