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

Dani AI

Generated

— good that PHP is now running; the remaining issue (classic ASP pages not executing) is a different beast. Classic Active Server Pages (VBScript) is a Microsoft/IIS technology and is not executed by Apache/WAMP out of the box. was on the right track about IIS, and correctly noted that there are third‑party Apache adapters, but those are niche and often incomplete.

Practical recommendation

  • For classic ASP, enable and use IIS (or IIS Express) on your Windows box and place your .asp files under an IIS site or virtual directory. Windows lets you turn on the classic ASP feature via Programs and Features -> Turn Windows features on or off -> Internet Information Services -> World Wide Web Services -> Application Development Features -> ASP. Microsoft documents ASP configuration in IIS here: IIS ASP configuration. If you prefer a WAMP-style dev server, IIS Express is an alternative for development: Using IIS Express.

If you must stay with Apache

  • There are community projects that try to make Apache handle ASP or to bridge to a Microsoft engine, but they vary in compatibility and maintenance. For ASP.NET (not classic ASP) other approaches exist (mod_mono or reverse-proxying to a .NET host), see mod_mono. For classic ASP, though, IIS remains the most reliable option.

Troubleshooting checklist

  • If a .asp file is downloaded or its source is shown, the server simply isn’t handing .asp to an ASP engine — check handler mappings (IIS) or that a proper module is installed (Apache).
  • If enabling IIS alongside Apache, watch for port 80 conflicts (only one service can listen on the same port).
  • Check server error logs and Windows Event Viewer for startup/handler errors.

This keeps the solution focused: use IIS for classic ASP; only use Apache adapters if you accept limited support and extra configuration. For WAMP/PHP work, continue using WampServer (WampServer).

Recommended Answers

All 8 Replies

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.