need2know91 Posted June 23, 2011 Share Posted June 23, 2011 I downloaded and installed Apache 2.2 and the Eclipse PHP developer platform. I got them to work fine together, however whenever I produce a PHP/html code it displays it exactly as its written, as opposed to being compiled and displayed. For example, the code is as follows: <html> <body> <?php echo 'hi'; ?> </body> </html> When saved and run through the Apache server, it displays the exact text as opposed to "hi" as it's supposed to. The address I have for the server file to be run is http://localhost/Folder/file.php What am I doing wrong? Does the server need to be specifically configured to compile php and html code? If yes, how do I do so? Thank you very much in advance. Quote Link to comment https://forums.phpfreaks.com/topic/240176-apache-22-server-displays-the-code-itselfdoesnt-compile-as-php-or-html/ Share on other sites More sharing options...
gizmola Posted June 23, 2011 Share Posted June 23, 2011 What operating system are you running? Did you install php? The first thing you should do is create a script named test.php or something similar in your webroot with this in it: That should come back with information about php but i suspect you don't have php installed, or at least not installed correctly. Quote Link to comment https://forums.phpfreaks.com/topic/240176-apache-22-server-displays-the-code-itselfdoesnt-compile-as-php-or-html/#findComment-1233707 Share on other sites More sharing options...
Amit20 Posted September 17, 2011 Share Posted September 17, 2011 If php is installed do check in your httpd.conf file, whether it is configured to read php file !!!! Quote Link to comment https://forums.phpfreaks.com/topic/240176-apache-22-server-displays-the-code-itselfdoesnt-compile-as-php-or-html/#findComment-1270200 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.