Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My php code not working under directory of mod_userdir (~/user) but working fine at /var/www/ , how I can dealing with this problems ? when I open a php file under ~/user my browser prompt to download

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Please look in /etc/apache2/mods-enabled/php5.conf, it has this comment:

# 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.

After you changed the file, restart Apache with service apache2 restart.

share|improve this answer
    
Thanks you! this helps! –  Smile.Hunter Aug 1 '11 at 11:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.