Reputation: 40754
If I ran my template locally, the template code can expand properly
<html>
<head>
<? include $template ?>
</head>
<body>
<div id="chart_div"></div>
</body>
</html>
However if I ran from an apache+php, it failed to expand.
I checked the error.log under /var/log/apache2 but cannot find any error message related to this template/php file.
On my local PC (OSX), php version is 5.5.20
On the apache, php version is:
$ dpkg -s php5
Package: php5
Status: install ok installed
Priority: optional
Section: php
Installed-Size: 29
Maintainer: Ubuntu Developers <[email protected]>
Architecture: all
Version: 5.5.9+dfsg-1ubuntu4.5
Depends: libapache2-mod-php5 (>= 5.5.9+dfsg-1ubuntu4.5) | libapache2-mod-php5filter (>= 5.5.9+dfsg-1ubuntu4.5) | php5-cgi (>= 5.5.9+dfsg-1ubuntu4.5) | php5-fpm (>= 5.5.9+dfsg-1ubuntu4.5), php5-common (>= 5.5.9+dfsg-1ubuntu4.5)
Where should I start to investigate this problem?
I have zero exposure to php before.
Upvotes: 0
Views: 63
Reputation: 30893
Most installs do not allow short tags, so you need <?php ?>
for proper syntax.
Upvotes: 1
Reputation: 2439
the syntax for your php short tags must contain equal sign after the opening php tag..
try this out <?=include $template; ?>
Upvotes: 1