Date: Thu, 7 Apr 2005 14:36:03 +0200 From: Yoann Le Bihan <ylebihan@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: how to enable PHP on Apache? Message-ID: <7c263b6d05040705363e39daa7@mail.gmail.com> In-Reply-To: <200504070941.42684.haimat@lame.at> References: <200504070941.42684.haimat@lame.at>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello ! :-) You just need to install mod_php port. It's located into /usr/ports/www (there are a mod_php4/ and a mod_php5/ directories). Just "make install clean" from one or two of these directories and it must be installed. Because I think it's not installed (even if it's mentionned in httpd.conf... it's strange by the way :-). Don't forget to make a "/usr/local/sbin/apachectl restart" after (if it's not already done from the port's installation). Best regards, YLB. yoann.lebihan@softroad.net On Apr 7, 2005 9:41 AM, Matthias F. Brandstetter <haimat@lame.at> wrote: > Hi all, > > I did a "make install clean" to compile and install phpmyadmin, which > installed PHP4 as well. Then I added these lines into my httpd.conf: > > --------------------------------------------------------------------- > ... > LoadModule php4_module libexec/apache/libphp4.so > ... > AddModule mod_php4.c > ... > <IfModule mod_dir.c> > <IfModule mod_php3.c> > <IfModule mod_php4.c> > DirectoryIndex index.php index.php3 index.html > </IfModule> > <IfModule !mod_php4.c> > DirectoryIndex index.php3 index.html > </IfModule> > </IfModule> > <IfModule !mod_php3.c> > <IfModule mod_php4.c> > DirectoryIndex index.php index.html > </IfModule> > <IfModule !mod_php4.c> > DirectoryIndex index.html > </IfModule> > </IfModule> > </IfModule> > ... > <IfModule mod_php3.c> > AddType application/x-httpd-php3 .php3 > AddType application/x-httpd-php3-source .php3s > </IfModule> > <IfModule mod_php4.c> > AddType application/x-httpd-php .php > AddType application/x-httpd-php-source .phps > </IfModule> > ... > Alias /phpmyadmin /usr/local/www/phpMyAdmin > ... > --------------------------------------------------------------------- > > But when I now point my browser to <domain>/phpmyadmin, Firefox tells me, > it wants to download a PHTML file. And when I point it to > <domain>/phpmyadmin/index.php, I get a .php file, which Firefox wants to > download as well. > > So, how can I setup Apache/PHP to interpret my php files, instead of > sending them 1:1 to the client? Do I miss a configuration here (see > above)? > > Greetings and TIA, Matthias > > -- > And thank you most of all for nuclear power, which is yet to cause a > single proven fatality, at least in this country. > > -- Homer Simpson > Oh Brother, Where Art Thou?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7c263b6d05040705363e39daa7>