problem med php-filer i public_html i ubuntu 10.04 [LÖST]
-
- Inlägg: 111
- Blev medlem: 22 okt 2007, 16:11
- OS: Kubuntu
- Utgåva: 18.04 Bionic Beaver LTS
- Ort: Ornäs/Sverige
problem med php-filer i public_html i ubuntu 10.04 [LÖST]
Apache verkar ha problem med php-filer som ligger i [HOME]/public_html/. Försöker jag surfa till 127.0.0.1/~reinfallt försöker firefox hämta en phtml-fil. Php-filer som läggs i /var/www fungerar fint. Jag upptäckte problemet nu när jag installerat apache i Lucid och jag har inte haft problemet i någon tidigare ubuntu-version.
Senast redigerad av 1 reinfallt, redigerad totalt 2 gånger.
Re: problem med php-filer i public_html i ubuntu 10.04
Att kunna köra php i public_html kräver en ändring i filen /etc/apache2/mods-enabled/php5.conf.
Kommentera bort delen <IfModule mod_userdir.c> ... </IfModule> som i exemplet här:
Starta om apache2 med
Kod: Markera allt
sudo gedit /etc/apache2/mods-enabled/php5.conf
Kod: Markera allt
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# 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>
</IfModule>
Kod: Markera allt
sudo service apache2 restart
-
- Inlägg: 111
- Blev medlem: 22 okt 2007, 16:11
- OS: Kubuntu
- Utgåva: 18.04 Bionic Beaver LTS
- Ort: Ornäs/Sverige
Re: problem med php-filer i public_html i ubuntu 10.04
Nu fungerar det 
Jag googlade runt lite och det verkar ju vara något påfund i Lucid.

Jag googlade runt lite och det verkar ju vara något påfund i Lucid.