Link to home
Start Free TrialLog in
Avatar of awarraic
awarraicFlag for United States of America

asked on

PHP page not rendering properly

I have a php page that is not rendering properly. Just trying to test database connection and the page just shows the code as an output.

all it does is shows all the php code. I have enclosed the code input/output.

I tried to find out what's on the server but info() function didn't run either.
Both code behind and output is the following:
=============================================
<html>
<title>db test</title>
<?php 
$link  = oci_connect('test', 'test', 'myOracleServer'); 
if (!$link) { 
die('Could not connect to Oracle: ' . oci_error()); 
} 
echo 'Connection OK'; oci_close($link); 

?>
<body>

<?php
echo info();
</body>
?>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Lukasz Chmielewski
Lukasz Chmielewski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of awarraic

ASKER

Have separate installation of apache and PHP or that's what my network admin told me.
Read this for a proper configuration of apache with php installed.
Or you could just install XAMPP to do it for you, there shouldn't be any problems with getting php to work.
http://www.apachefriends.org/en/xampp.html

If you would decide to run xampp, uninstall apache and php prior to that.
Avatar of Deja Anbu
your http://localhost/ - displays anything?

are you using WAMP or IIS?

try to display

<?php
phpinfo();
?>

PHP was not installed on apache... ODD