Re: Install Question / Help

From: John-Paul Stewart (jpstewart_at_binaryfoundry.ca)
Date: 08/01/04


Date: Sun, 01 Aug 2004 11:21:48 -0400

Arthur wrote:
> Hi All,
>
> I'm a bit of a newbie with Linux, so I'm hoping someone can help me.
>
> I want to install Squirrelmail. I believe that I have PHP4 installed:
>
> [root@nitelife conf]# rpm -qa | grep php
> php-4.3.2-8.ent
> php-odbc-4.3.2-8.ent
> php-imap-4.3.2-8.ent
> php-pgsql-4.3.2-8.ent
> php-ldap-4.3.2-8.ent
> php-mysql-4.3.2-8.ent
>
> And of course, I have apache installed. I followed the Squirrelmail
> install instructions several times, both as a package and as a .tar,
> but I've gotten noplace.
>
> Two things are happening. I tried to test my PHP4 install by creating
> a .php file and loading it into my web browser. However, rather than
> getting the PHP information that I expected to get, I only got this:
>
> <?php
> phpinfo();
> ?>

Apache isn't configured to support PHP yet. It's currently treating the
PHP file the same way it would an HTML file (just sending it to the
client) instead of running the PHP file.

In order to get the desired behaviour, you'll have to tell Apache to
load the PHP module. Find the Apache config file containing all the
other "LoadModule" directives (probably /etc/apache/httpd.conf or
/etc/apache/modules.conf) and then add this line after the last existing
"LoadModule" line:

LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

Note that the path /usr/lib/... may need to be adjusted to suit your
system. 'locate libphp4.so' should tell you the right path to the
module on your system.

Now find the Apache config file containing the "AddType" directives
(likely /etc/apache/httpd.conf or /etc/apache/srm.conf) and add the line:

AddType application/x-httpd-php .php

Restart Apache and you should be good to go. (I think...I may have
missed a step...it's been a while.)



Relevant Pages

  • Re: PHP Tutorials
    ... >> In this tutorial we assume that your server has activated support for PHP ... install a web server locally (not just Apache). ...
    (comp.lang.php)
  • RE: [PHP] Question before upgrading to 5
    ... We only use php for intranet applications I create, ... so the server is basically dead at nights, which is when I do most of my ... so your going to shut down apache on ... install of apache would allow you to do. ...
    (php.general)
  • Re: [SLE] updating to PHP5
    ... while running PHP 5 for my stuff. ... managed by SuSE staff where you can download latest apache with all ... SLES 9 doesn't need PHP for its default configuration. ... Thus, it seems possible to remove PHP4, install a new Apache instance, PHP5 ...
    (SuSE)
  • RE: Problem with apache, php and mysql after FC4 upgrade: SegmentationFault ...
    ... the config options are that php/apache is seeing for php... ... this will install in the default dirs.... ... i'm curious to know if the rpms for php with FC4 are somehow screwed up... ... > Group apache ...
    (Fedora)
  • Re: Can not get Php (4.4 - Windows) configured to open secure URLs (https)
    ... to do something more in php or in Apache httpd.conf? ... To use the CSR and key generation functions from PHP, you will need to install an openssl.cnf file. ... The Windows environment variable OPENSSL_CONF is set to C:\OpenSSL\bin\openssl.cnf (and that is where I have installed OpenSSL. ...
    (comp.lang.php)