PHP not working with WAMP
Posted by: ofey (109.77.204.---)
Date: July 29, 2015 01:59AM

Hi,
I have installed WAMPServer
Apache : 2.4.9 MySQL : 5.6.17
PHP : 5.5.12
PHPMyAdmin : 4.1.14
SqlBuddy : 1.3.3
XDebug : 2.2.5

PHMyAdmin is working and I can get phpinfo() page.
I am able to access the Apache server at localhost.
I created a directory at C:wamp/www/test
and put there a file called test.html which has HTML, PHP and JavaScript.
test.html

<html>
<p>
Hello world!
</p>
<a href="[www.google.com">search<];
<?php echo "hiya"; ?>
<script>
alert("hey"winking smiley;
</script>
</html>

The HTML and JavaScript are working fine but the PHP echo is not.
Something else strange is that the 'test' directory is under 'Projects' but when i click on test I get an error page at [test] instead of being sent to localhost/test which is where I should be directed to.

Any help would be appreciated.
Thanks,



Edited 1 time(s). Last edit at 07/29/2015 02:03AM by ofey.

Options: ReplyQuote
Re: PHP not working with WAMP
Posted by: Otomatic (Moderator)
Date: July 29, 2015 09:28AM

Hi,

> and put there a file called test.html
No, only files with extension *.php work.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PHP not working with WAMP
Posted by: ofey (109.79.144.---)
Date: July 29, 2015 10:20AM

Yes you are correct. I renamed the file test.html.php and the PHP now works.
Thanks for your help much appreciated.

Options: ReplyQuote


Sorry, only registered users may post in this forum.