Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php-cli outputs instead of executing

Tags:

php

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.

like image 952
Xspe Avatar asked Mar 09 '10 21:03

Xspe


2 Answers

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

And change it to: short_open_tag = On

like image 172
Yaşar Şentürk Avatar answered Oct 08 '22 18:10

Yaşar Şentürk


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

like image 39
cmptrgeekken Avatar answered Oct 08 '22 16:10

cmptrgeekken