Jump to content

[SOLVED] WAMP Question


Recommended Posts

I just switched to WAMP..a lot easier setting up than Apache and its components heh.

 

But I am having a problem with normal php code still displaying on the pages. From my night of 'googling' I have found out only that it is code that isn't in use and just loads up for fun?

 

 

I managed to turn it off in PHP Settings for the main site (I don't even remember how, just trial & error on the first option I tried lol) - but for my lil admin management page the php code will still pop up everywhere. It is not really any errors, just code in like 'else, if else, etc' statements that seem to want to join the party too uninvited. :|

 

I'm guessing there is some setting you are supposed to change...I will keep googling and trying out these different modes but if someone already went through this before and can guide I would really appreciate it :D

 

(If my question is confusing..let me know and I will host a small snapshot of what I mean)

Link to comment
Share on other sites

It looks that your PHP code is not parsed correctly. That means you haven't configure your apache to find and use PHP code parser. Apache is returning just code as it is - it doesn't know that code should be sent to parser first and only result should be returned.  :(

Link to comment
Share on other sites

Are you using short tags eg (<? ?> or <?= ?>) in your code. These tags are not enabled by default. To enable short tags on WAMP left click the wamp taksbar icon and select PHP > PHP Settings > short open tag.

 

You should also make sure you're placing your code in .php files. PHP code will not be parsed in any other files. However you can configure Apache to parse other files as PHP.

Link to comment
Share on other sites

Are you using short tags eg (<? ?> or <?= ?>) in your code. These tags are not enabled by default. To enable short tags on WAMP left click the wamp taksbar icon and select PHP > PHP Settings > short open tag.

 

You should also make sure you're placing your code in .php files. PHP code will not be parsed in any other files. However you can configure Apache to parse other files as PHP.

Thanks, the 2-3 pages that were acting up like this were written by someone else and enabling short tags fixed those! - To be honest I never knew you could short-hand write those tags like that till I started digging into this problem tonight heh  ::) Not that it saves a lot of time compared to the hassle it can bring.

 

Thanks for the help again :)

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.