Click to See Complete Forum and Search --> : php-apache windows


ace21
06-14-2001, 06:08 AM
I have php, apache and mysql up and running to a certain degree. The problem I am having is with php/apache. I have phpMyAdmin up and that works with no problems. I am able to create databases/modify etc. So I can see that something is working.

However when I created my own file in php I have the following problem:
anytime I do an echo to print something to the screen the webpage appears blank. I can do any number of php statements as long as I son't try to echo or print anything. Normal HTML outside of the php tags doesn't print with either of these included. If you take them out normal HTML will print to the webpage.

Has anyone else had this problem? Does something need to be set for every folder you make under htdocs?

Thanks for your help as you can see this problem severly limits what I can do for the time being.

Ace21

ame12
06-14-2001, 02:47 PM
So if you used this page and called it hello.php, you wouldn't see anything?


<title>PHP Test Page</title>
<!- Save this to the webroot directory as a PHP file...
->
<body bgcolor="#CCDDEE" text="#000000">
<center>
<font face=verdana size=2><br>
<?php
$t = "<bPHP says Hello!</b><br>";
echo($t);
echo("<br>Today is ".date("F j, Y, g:i a")."<br>");
?>
</font>
</center>
</body>


Dave

===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
Share files... get PHP up and running fast
===========================================

Anon
06-14-2001, 05:59 PM
Thanks for taking the time, I have solved it. Although I have come up with a question to help when it happens again. This one has to do with setting up the error messages for either php or apache.

I forgot a semicolon (yes please laugh at my expense I would) but what irks me is that I didn't get an error message saying missing semicolon missing at line 12. This was the way it was set up at my old job.
instead what I would get is the following line at the top after I right-clicked view source.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> followed by the
<BODY></BODY>with no text between them.

What step did I miss when setting up either apache or php so that I would get the correct errors?

Ace21

Anon
06-15-2001, 05:38 AM
thanx