Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not even a simple IF, ELSEIF works

Status
Not open for further replies.

jabw

Technical User
Apr 30, 2003
103
NL
Hi all,

I'm facing a strange problem.
After installing PHP 4.x on Windows 2003 with IIS6 I can make a simpel test.php page with the phpinfo() command in it. And it works...........
I thought that phpinfo() should be enough to check if PHP is running on the server.

But.
If I add in a simple i.e. IF ($a>$b) etc. (yes, with $a being larger than $b) it doesn't work. the page is completely empty and the HTML code shows an empty <body></body>

Is IF ELSEIF etc. using somekind of library or is it depending on something else that not activated by default on a Windows 2003 system?

Did the same install procedure on an other full installed 2003 production(!) server and also on a 2000 pro system and both work just fine.

I'm using W2003 in a workgroup with a minimum of modules installed.
 
show us your.....






CODE.


P.S - Hi All :)

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
<html>
<head>
<title>PHP Test</title>
</head>
<body>

<?php

echo '<p>Hello World</p>';

$a = 5;
$b = 4;

if ($a > $b)
print "a is groter dan b";

?>
</body>
</html>

That's it.
 
No rocket science in there then, and should produce some output.

What level of error reporting to you have set in you php.ini ? E_ALL should help if there are any configuration errors.

What version of PHP , and any safe mode restrictions?

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
What level of error reporting to you have set in you php.ini ? E_ALL should help if there are any configuration errors.

- I expect that there's a configuration error. Should I just remove the ; and that's it?
; - error_reporting = E_ALL [Code Cleanliness, Security(?)]


What version of PHP , and any safe mode restrictions?
- it's 4.4.0

Safe mode. Info taken from the phpinfo() output:
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value

What does this do and/or what to look for.
 
What is the name of you file? It needs to end in ".php" if the PHP interpreter is to be invoked.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top