Jump to content

[SOLVED] PHP code displayed


Recommended Posts

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; } ?>

Link to comment
https://forums.phpfreaks.com/topic/180415-solved-php-code-displayed/
Share on other sites

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.

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.

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.