i downloaded e-novative wamp server from the net and installed it...i tried to run my script...but i cannot get the output..it just displays the code which i typed in the notepad...i stored my script coding in www folder in wamp...can anyone guide me ..

Dani AI

Generated

The symptom described by — the browser showing raw PHP source instead of executed output — means the webserver did not hand the request to a PHP engine. Replies from , and point in the right direction; below are focused, practical checks that go deeper than the basic suggestions already offered.

  • Verify which program actually served the page: open your browser dev tools, inspect the Network response headers and note the Server header. If it names an unexpected server, that explains why PHP wasn’t run.
  • Run a minimal runtime test. Create a file named info.php with the contents below and request it from the same location as your script. If this still shows source, PHP is not integrated with the server.
<?php
phpinfo();
?>
  • Confirm the webserver is loading the PHP module/handler. On Windows WAMP builds this is visible in the tray control panel or by checking Apache configuration for the PHP module/handler load lines. A module-load failure will also leave traces in the logs.
  • Inspect logs immediately after a restart: the Apache error log and the PHP startup/log files often contain module-load errors, handler registration failures, port conflicts or permission problems.
  • Watch for file-encoding and tag issues: files saved with a UTF-8 BOM or using short tags can behave as if PHP is not processed. Save without BOM and use full <?php tags.

If the test phpinfo() renders, the interpreter works and the problem is a mapping between server and file. If it does not, focus on the server-module integration lines and the startup logs. For older/uncommon WAMP distributions, consider trying a maintained stack (WampServer/XAMPP/Laragon) to rule out package-specific integration bugs.

Recommended Answers

All 3 Replies

Suggestions:
Make sure that Apache is running. If you're not sure if it's running check the processes section of the task manager. Some versions of WAMP require you to manually start Apache.
Also make sure you are previewing the file under localhost in the browser.
Should look something like http://localhost/wamp/ or just http://localhost/

Are you saving you script with a .php extension?

If you are only seeing the code you wrote, then apache is running, but its not seeing the .php extension. If you are using a text editor like note pad, when you save as, make sure file type is set to All Files and save your script with a .php extension like this: "example.php". Let me know if you are doing this, if you are then the problem lies in your apache httdp.config file. If it is this, then I will guide you through the steps to configure it properly:)

i downloaded e-novative wamp server from the net and installed it...i tried to run my script...but i cannot get the output..it just displays the code which i typed in the notepad...i stored my script coding in www folder in wamp...can anyone guide me ..

di you make changes in the httpd.conf file of apache to support .php extensions? if not then edit the httpd.conf file of apache server to support .php etension files

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.