tags:

views:

1323

answers:

4

Hello all, I have installed native apache and mysql,php in my linux server. I tried a page using phpinfo() and it worked.But when I try my own pages, the execution of the page stops when it comes to the php tag, even the css tag following it doesn't come to the browser. Please help me how to fix this issue.. Thanks in advance

A: 

Did you make sure the following lines are in your apache2.conf and uncommented:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Rob
If this were the issue wouldny it just show the php as plain text?
prodigitalson
+1  A: 

you probably have an error in your php. At the top of the document try adding:

<?php ini_set('display_errors', 1); ?>

See if there is any error output...

prodigitalson
+1  A: 

Are you using php short tags, by chance?

<? ?> 
<?= ?> 

Ubuntu 10.04 is running php 5.3.2.

Shorts tags were deprecated in 5.3.

simplemotives
And it worked :)
Ramprakash
+1  A: 

If the php file is in public_html directory (userdir), you must edit the file:

/etc/apache2/mods-enabled/php5.conf

and comments from line 8-15

# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#<IfModule mod_userdir.c>
#    <Directory /home/*/public_html>
#        php_admin_value engine Off
#    </Directory>
#</IfModule>
viriathus