I installed Wampserver on my machine and everything else seems to be working well except that scripts on html pages are not being executed by the server. I previously had Apache 2.0.59 and still experienced the same problem.
E.g on the code below:

<html>
<body><?php
echo "Hello World";
?>
My name is Dorc
</body>
</html>

The result I am getting on the browser is 'My name is Dorc' and the 'Hello World' is not being executed. I get the same result using ASP. What can I do to solve this problem

The result I am getting on the browser is 'My name is Dorc' and the 'Hello World' is not being executed. I get the same result using ASP.

How are you viewing the pages? If your address bar says something like "C:\abc\123\webroot\myPage.php" then the server code is not going to run.

except that scripts on html pages are not being executed by the server

Also, if the page includes php code, then the extension must be .php, and if the page includes asp code, then the extension must be .asp, unless you have set up on your server to parse .html or whatever extension using either of those two languages.

I previously had Apache 2.0.59 and still experienced the same problem.

The two things I have mentioned above are version-independent. These are simple things, but without providing any more information about your problem, I cannot determine your level of expertise or where the problem could be.

~ mellamokb

Is your WAMP server running ? What do you see when you type http://localhost in the url ? Does it show Wamp startup screen or page not found ? Also check if apache service is started when you start WAMP.

Is your WAMP server running ? What do you see when you type http://localhost in the url ? Does it show Wamp startup screen or page not found ? Also check if apache service is started when you start WAMP.

My WAMP server is running and my apache service is also started. When I type http://localhost, I see the WAMP start up page very well.

mellamokb - I am using the file extensions .asp and .php on asp and php pages respectively. On the address bar I am typing http://localhost/guestbook/test.php. I have added guestbook as one of the aliases in the httpd.conf file and the html pages are being executed correctly. The problem is on php and asp scripts

Use the tool phpinfo. When you see the Wamp startup page, click on phpinfo. If you see a page with php information, then theres no problem with php. I am not sure about running asp files using wamp though.

Thank you vey much guys for the help. Now I can run php pages but still having problems with the asp ones. I don't know if WAMP server is meant for running asp as well. Anyone with an idea?

I *think* you need to have IIS to run ASP scripts.

Apache *can* run asp and I dont *think* its unnecessary to add IIS when I do have Apache already

I would think yould need a module.. like this?
apache-asp assume that works, never tryed it my self

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.