CodeIgniter Forums
Not processing PHP scripts in View files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Not processing PHP scripts in View files (/thread-36373.html)



Not processing PHP scripts in View files - El Forum - 11-29-2010

[eluser]spider pig[/eluser]
I'm uploading a site to a web server and it displays the View files without processing them so the output is:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
&lt;title&gt;&lt;?= $al_page_title ?&gt;&lt;/title&gt;
&lt;link rel="Shortcut Icon" href="&lt;?= base_url() ?&gt;images/favicon.ico" /&gt;
&lt;link rel="stylesheet" type="text/css" href="&lt;?= base_url() ?&gt;css/screen.css" /&gt;
&lt;!--[if IE 7]>&lt;link rel="stylesheet" type="text/css" href="&lt;?= base_url() ?&gt;css/ie7.css" /&gt;&lt;![endif]--&gt;
&lt;!--[if IE 6]>&lt;link rel="stylesheet" type="text/css" href="&lt;?= base_url() ?&gt;css/ie6.css" /&gt;&lt;![endif]--&gt;
[removed][removed]
[removed][removed]
[removed][removed]
&lt;?= $al_extra_header ?&gt;
&lt;/head&gt;
...

It's an Apache server running PHP 5.2.14 with the Server API set to CGI. I have removed the .htaccess file.

The we server is at Melbourne IT.

I have never seen anything like this before.

Any ideas on what's causing the problem?


Not processing PHP scripts in View files - El Forum - 11-29-2010

[eluser]skunkbad[/eluser]
php short tags on?


Not processing PHP scripts in View files - El Forum - 11-30-2010

[eluser]spider pig[/eluser]
Thanks Brian. The short tags were off. That fixed the problem. You're a legend!


Not processing PHP scripts in View files - El Forum - 11-30-2010

[eluser]CroNiX[/eluser]
You can also enable the use of short tags in the config which lets you use them in environments where they are turned off via php.ini.