noooooooooobxor Posted December 16, 2006 Share Posted December 16, 2006 Hello, I am running a Windows XP Professional Service pack 2 and am new to PHP. I have setup apache and php, and apparently I did something wrong (even though they were both the .msi installer packages). Even though apache is running, when I open hello.php (which is in c:/program files/php/cgi-bin and contains nothing but this script <html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html>) with internet explorer, rather than "hello world" coming up, the source code (which is in the above paranthesis) is shown. Please someone help me, I think I will otherwise become insane.note: I am running apache Quote Link to comment Share on other sites More sharing options...
rolf Posted January 1, 2007 Share Posted January 1, 2007 It looks like apache is not recognizing php. It might be a good idea to check that your apache's httpd.conf file to make sure you have an entry like this:LoadModule php4_module "c:/php/sapi/php4apache2.dll"<IfModule php4_module> <Location /> AddType text/html .php .phps AddHandler application/x-httpd-php .php AddHandler application/x-httpd-php-source .phps </Location></IfModule>If your using php5, there'll be something analogous.Good luck,Rolf Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 1, 2007 Share Posted January 1, 2007 If you used the PHP installer then that does not mean PHP has been setup with Apache. The installer does nothing other than unpack the files to where you told PHP to be installed to. It does nothing else. However it does attempt automatically configure itself to the server you are using but this usually doesnt work out. I all ways recommend to get the zipped binaries instead. To configure Apache to parse PHP files with PHP do what rolf advised above. Quote Link to comment Share on other sites More sharing options...
Draicone Posted January 12, 2007 Share Posted January 12, 2007 If you aren't familiar with installing PHP and configuring Apache, you can use wamp server for a test server >> [url=http://wampserver.com/en/]http://wampserver.com/en/[/url] << but don't use it for a production server as it's terribly insecure. Quote Link to comment 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.