apache - PHP displays a code in browser rather then execute but only for virtual hosts -


i have installed fresh lamp on ubuntu 13.10 after installation php works fine if put php code default localhost web folder /var/www

i created virtual host. did before , never had problems added file /etc/apache2/mods-enabled , activated

but when enter virtual host in browser can see code of index.php file in browser.

also when execute php code command line can see source of code , not executed.

what can be?

try use <?php , ?> not short tags, or if want use (their use discouraged due compatibility issues), ensure php.ini configuration have:

short_open_tag=on 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -