Tagg Posted July 25, 2009 Share Posted July 25, 2009 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 (If my question is confusing..let me know and I will host a small snapshot of what I mean) Quote Link to comment https://forums.phpfreaks.com/topic/167378-solved-wamp-question/ Share on other sites More sharing options...
anthylon Posted July 25, 2009 Share Posted July 25, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/167378-solved-wamp-question/#findComment-882583 Share on other sites More sharing options...
wildteen88 Posted July 25, 2009 Share Posted July 25, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/167378-solved-wamp-question/#findComment-882586 Share on other sites More sharing options...
Tagg Posted July 25, 2009 Author Share Posted July 25, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/167378-solved-wamp-question/#findComment-882589 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.