Php code display in browser instead of executing it wamp

Wamp shows PHP code in browser ( not processing php script )

Posted by: synbitz (---.154-247-81.adsl-dyn.isp.belgacom.be)

Date: February 06, 2010 05:27PM


Ok I recently reformatted my computer and now I'm setting everything up again.
I came across some problems, wich are now solved.

But now when I browse to 127.0.0.1 when wamp2.0 is running it displays me the PHP code I got no idea how to get it working as I am already browsing for a couple of hours to find the problem. I'm not using short php tags ... still the php code gets displayed instead of processed ....

I'm on windows 7 64 bit


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: synbitz (---.108-64-87.adsl-dyn.isp.belgacom.be)

Date: February 07, 2010 01:05PM

no thats not the problem...


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: synbitz (---.108-64-87.adsl-dyn.isp.belgacom.be)

Date: February 07, 2010 03:40PM


what do you mean? no...

I've already made a sucessfull root document change.

I totally dont understand... i've done everything exact the same way when i set up wamp for the first time and now its suddently not working :/


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)

Date: February 07, 2010 03:43PM


u changed the document root?

why didnt u say this in the first post.

you dont undertand? how can we understand if you dont explain the details...

it doesnt jsut suddently stopped if it was working..
and you didnt say it was working before

Steven Martin


PampServer.com - [pampserver.com]

Edited 1 time(s). Last edit at 02/07/2010 03:46PM by stevenmartin99.


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: synbitz (---.108-64-87.adsl-dyn.isp.belgacom.be)

Date: February 07, 2010 03:48PM


It was working before i downloaded the latest version of wamp... I reformatted my computer and now run windows 7

.... anything more you need to know?

thanks


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)

Date: February 07, 2010 03:55PM


so you installed wamp new... on a clean pc...

and its not working...

is wamp working?

is the wamp icon white?

is http:/ /localhost working?

is http:/ /localhost/phpmyadmin working?

Steven Martin


PampServer.com - [pampserver.com]


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: ChazUK (---.141.39.188.available.above.net)

Date: February 08, 2010 12:28PM


Make sure that you are using long PHP tags

Or you can enable short tags click on wamp icon > PHP > PHP Settings > short open tags. Make sure that is checked.


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: cerritos (---.adsl2.static.versatel.nl)

Date: February 08, 2010 03:06PM


replaced

Edited 2 time(s). Last edit at 02/09/2010 10:49AM by cerritos.


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: synbitz (---.54-65-87.adsl-dyn.isp.belgacom.be)

Date: February 08, 2010 05:45PM


Uhm, short tags is not the problem, I'm not using short php tags. Anyways wamp runs normally, fully white icon. Browsing to localhost gives me my php index page, but not processed,... displayed as php code!

I'm going crazy

Php code display in browser instead of executing it wamp


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: synbitz (---.54-65-87.adsl-dyn.isp.belgacom.be)

Date: February 08, 2010 05:49PM

oh yeah when i browse to phpmyadmin,, it works.. :/ i'm totally confused


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: kirayamato_00 (---.cproxy.cz)

Date: August 18, 2010 04:59AM

hi i'm new to php almost knowing nothing and i'm having a problem to execute my php file in notepad i dont know were to save it and how it is being executed. everytime i save it to www folder it open as notepad same as the index folder..than you for responding


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: yfastud (Moderator)

Date: August 18, 2010 05:01AM



Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: kirayamato_00 (---.cproxy.cz)

Date: August 18, 2010 07:56AM

oh god thanks yfatud it runned..can you add me in facebook so i can chat you fast if i have some more questions,,thanks,,almost crying lol..


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: gogaz (---.fbx.proxad.net)

Date: July 02, 2013 03:38PM


Hello,
I had the same problem today and in fact it's really easy to fix:
Left click on WAMP icon into Windows' running icons and go to PHP > PHP Settings > Expose PHP
Hope it'll help.

gogaz

EDIT: no, sorry, still not working for me :/

Edited 1 time(s). Last edit at 07/02/2013 03:50PM by gogaz.


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: RiggsFolly (---.as13285.net)

Date: July 02, 2013 03:56PM


gogaz,

Check the filename of the script. It must end in .php and not .php.txt. Some basic editors assume all files edited should be .txt extensions and add that to the end of the filename.

Also it should not end in .html either, it must be .php


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: gogaz (---.fbx.proxad.net)

Date: July 02, 2013 04:07PM

No, the filename already is php.
I'm sure because Windows asked me if i'm sure i wanted to change


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: RiggsFolly (---.as13285.net)

Date: July 02, 2013 04:16PM

Ok, so are you running this by entering the address in the browser, or by double clicking on the filname in explorer?


Re: Wamp shows PHP code in browser ( not processing php script )

Posted by: denniswaish (---.orange.co.ke)

Date: June 04, 2016 10:53PM

I've downloaded wamp server 2.5 but its not working


Sorry, only registered users may post in this forum.


Why is my PHP code showing in browser?

You've written your first PHP program, but when you go to run it, all you see in your browser is the code—the program doesn't actually run. When this happens, the most common cause is that you are trying to run PHP somewhere that doesn't support PHP.

Why PHP code is printing instead of executing?

It might be PHP is not enabled in your apache configuration. You can uncomment PHP module by removing '#' sign at the beginning from httpd. conf file. Save file and then restart the web server.

Is WAMPServer are used to execute PHP script?

So WAMPServer makes sure it has the right php. ini file in the Apache \bin folder when you switch versions of Apache or PHP.

Where do I put PHP code in WAMPServer?

When you installed WAMP server you will get wamp folder in your C drive. In this folder there is another folder name www. To run php code we have to put all php files in this folder.