Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 550
  • Last Modified:

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

0
awarraic
Asked:
awarraic
  • 3
  • 2
1 Solution
 
Lukasz ChmielewskiCommented:
Do you have a separate installations of Apache and PHP ? Or you use XAMPP, WAMP etc. ?
Seems like Apache couldn't find your php engine.
0
 
awarraicAuthor Commented:
Have separate installation of apache and PHP or that's what my network admin told me.
0
 
Lukasz ChmielewskiCommented:
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Lukasz ChmielewskiCommented:
0
 
dejaanbuCommented:
your http://localhost/ - displays anything?

are you using WAMP or IIS?

try to display

<?php
phpinfo();
?>

0
 
awarraicAuthor Commented:
PHP was not installed on apache... ODD
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now