Ubuntu users in Ontario, Canada?

Kirk Bridger kbridger at shaw.ca
Thu Jun 26 05:43:48 UTC 2008


Here, try these commands geo and send the output please.  Apache2 has 
two tools that let you enable and disable modules without worry about 
linking etc.

a2enmod

This will then ask you what module you want to enable.  You should see 
php5 in the list (this list btw is all the modules you have installed on 
your machine, as far as apache knows - installed but not necessarily 
activated/enabled).  Type php5 (assuming it is in the list) and hit 
Enter.  If will tell you if it is already enabled, or will tell you it 
was successfully enabled, or will throw an error.  Please send the 
output and interactions you have.

Note you can also use

a2dismod

to disable modules.  You could use this to see what is already enabled - 
hopefully php5 is listed.  If not then use a2enmod as above.  If you 
want to quit either tool without making any changes type "CTRL-C" to 
return to the command line.

Once the php5 module is enabled in apache, restart it (apache2ctl 
restart) and then see if the PHP file works properly in Firefox.

Kirk



geo wrote:
> I was trying to implement your advice. I was creating the files 
> "php5.conf" and "php5.load" and their respective contents and 
> permissions by hand.....then I realized I don't have a modules directory!
>
> This is the contents of my /etc/apache2/ directory:
>
> (Directories)
> conf.d
> mods-available
> mods-enabled
> sites-available
> sites-enabled
>
> (Individual files)
> apache2.conf
> enwars
> httpd.conf
> ports.conf
>
> And that's all that's in /etc/apache2/ !!!
>
> There is no /etc/apache2/modules/ path!
>
> YIKES! What has happened? Why isn't there one there?
>
> geo
>
> --- On *Wed, 6/25/08, Andrew Mathenge /<mathenge at gmail.com>/* wrote:
>
>     From: Andrew Mathenge <mathenge at gmail.com>
>     Subject: Re: Ubuntu users in Ontario, Canada?
>     To: yaktur at yahoo.com, "The Canadian Ubuntu Users Community"
>     <ubuntu-ca at lists.ubuntu.com>
>     Date: Wednesday, June 25, 2008, 9:46 PM
>
>     The problem you have is that PHP modules aren't being loaded by
>     apache. You mentioned that when you wrote:
>
>     >> I don't have any such files named php5.conf and php5.load in
>     /etc/apache2/mods-enabled/. Nothing there even starts with php.
>
>     I have PHP working on my system. My /etc/apache2/mods-enabled/dir.conf
>     file looks like this:
>
>     <IfModule mod_dir.c>
>               DirectoryIndex index.html index.cgi index.pl index.php
>     index.xhtml index.htm
>     </IfModule>
>
>     Inside the folder /etc/apache2/mods-enabled folder, I also have the
>     following links:
>
>     lrwxrwxrwx 1 root root   27 2008-04-26 22:26 php5.conf ->
>     ../mods-available/php5.conf
>     lrwxrwxrwx 1 root root   27
>      2008-04-26 22:26 php5.load ->
>     ../mods-available/php5.load
>
>     Notice that these are links (or shortcuts) pointing to the following
>     files in /etc/apache2/mods-available
>
>     -rw-r--r-- 1 root root 133 2008-02-27 15:49 php5.conf
>     -rw-r--r-- 1 root root  59 2008-02-27 15:49 php5.load
>
>     Those files have the following contents:
>
>     php5.conf looks like this:
>
>     <IfModule mod_php5.c>
>       AddType application/x-httpd-php .php .phtml .php3
>       AddType application/x-httpd-php-source .phps
>     </IfModule>
>
>
>     And php5.load looks like this:
>
>     LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
>
>     Which means that the file in /usr/lib/apache2/modules/libphp5.so MUST
>     exist or PHP will not work.
>
>     One final comment. Removing "index.php" from
>     /etc/apache2/mods-enabled/dir.conf means that the file index.php won't
>     be loaded by default. PHP files will still be processed because of
>      the
>     /etc/apache2/mods-enabled/php.conf file.
>
>     Hope this moves you a step closer!
>
>     Andrew.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-ca/attachments/20080625/88b35cf3/attachment.html>


More information about the ubuntu-ca mailing list