tags:

views:

44

answers:

3

Im using Debian testing, i have installed php-cli and when i try to execute a php script it output the source instead of executing it.

Example:

 php test.php
 <?
 phpinfo();
 ?>

any ideas how to fix this behavior, i tried reinstalling and purging no results.

A: 

Change <? to <?php. Short tags must not be enabled.

cmptrgeekken
+2  A: 

Looks like you have short_open_tag turned off.

Either change that configuration option or, preferably, use the full opening tag: <?php

salathe
A: 

Find following line in your php.ini file: short_open_tag = Off

And change it to: short_open_tag = On

yasarix
Thank you guys, this did the job.
Xspe
short_open_tags are deprecated for a reason
symcbean