osxman Posted November 5, 2009 Share Posted November 5, 2009 Hello, I have just set up Apache 2, MYSQL and PHP 5 on OpenSuse 11.1. I am able to see my phpinfo page. I have uploaded my website to the server and experiencing some odd behaviour. The website works fine on a windows 2003 platform. PHPmyadmin also works fine. Here is the ouput of a page, it should display a login box. (the same file works fine on our windows server) Any ideas what is going on and how to fix it? thanks in advance \n"; echo " \n"; echo $header; echo " \n"; echo " \n"; echo " \n"; include("includes/admin/menu.inc.php"); echo $menu; echo " \n"; echo " \n"; echo $content; echo " \n"; echo " \n"; } } else { include("includes/admin/login.inc.php"); echo $login; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 5, 2009 Share Posted November 5, 2009 Ummm. Posting the output is nice, but seeing the source code that produces that output would directly allow someone to tell you why it is not being seen as php code. Best guess, you got caught using the lazy-way short open tag <? and need to change you code to use full opening <?php tags. Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/#findComment-951817 Share on other sites More sharing options...
osxman Posted November 5, 2009 Author Share Posted November 5, 2009 Ah! yeah, I have taken the lazy route! Rather than change all my code I just changed 'short open tag' to on, which has resolved my problem. Thanks for the tip. Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/#findComment-952050 Share on other sites More sharing options...
DavidAM Posted November 5, 2009 Share Posted November 5, 2009 You realize you just took the lazy route again! Right? This too will come back and bite you in the back-end someday. Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/#findComment-952077 Share on other sites More sharing options...
PFMaBiSmAd Posted November 5, 2009 Share Posted November 5, 2009 someday. And that would be every time you move to a different server or someone updates your server and does not change the setting from the recommend default (OFF) value. In the time you have lost working on this problem, you could have used a programming editor's global file search/replace and gone through all your files and fixed the problem. Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/#findComment-952119 Share on other sites More sharing options...
osxman Posted November 6, 2009 Author Share Posted November 6, 2009 Hi, Well, I cannot ignore your advice so I have change my code and turned off short open tag. Thanks to all for your assistance and setting me on the write road. Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/#findComment-952456 Share on other sites More sharing options...
Vebut Posted December 1, 2009 Share Posted December 1, 2009 Hi, Well, I cannot ignore your advice so I have change my code and turned off short open tag. Thanks to all for your assistance and setting me on the write road. You did the right thing, we're proud. Quote Link to comment https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/#findComment-968732 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.