16

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.

3 Answers 3

23

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

And change it to: short_open_tag = On

Sign up to request clarification or add additional context in comments.

1 Comment

short_open_tags are deprecated for a reason
10

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

Comments

8

Looks like you have short_open_tag turned off.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.