Ubuntu users in Ontario, Canada?
Andrew Mathenge
mathenge at gmail.com
Thu Jun 26 01:46:19 UTC 2008
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.
On Wed, Jun 25, 2008 at 7:26 PM, geo <yaktur at yahoo.com> wrote:
> I re-edited the /etc/apache2/mods-enabled/dir.conf file and saved it, then I
> opened a terminal window (Alt + F2) and tried to restart Apache.
>
> No success. Here is the result:
>
> root at Dell1:~# /etc/init.d/apache2 restart
> * Restarting web server apache2
> Syntax error on line 4 of /etc/apache2/mods-enabled/dir.conf:
> Invalid command 'index.php', perhaps misspelled or defined by a module not
> included in the server configuration
> [fail]
> root at Dell1:~#
>
> Then I tried to force it.....
>
> root at Dell1:~# /etc/init.d/apache2 force-reload
> Syntax error on line 4 of /etc/apache2/mods-enabled/dir.conf:
> Invalid command 'index.php', perhaps misspelled or defined by a module not
> included in the server configuration
> ...fail!
> root at Dell1:~#
>
> I don't have any such files named php5.conf and php5.load in
> /etc/apache2/mods-enabled/. Nothing there even starts with php.
>
> This is what my /etc/apache2/mods-enabled/dir.conf file looks like:
>
> <IfModule mod_dir.c>
>
> DirectoryIndex index.html index.htm index.shtml index.cgi
> index.php index.php3 index.pl index.xhtml
>
> </IfModule>
>
>
> So I edited out the index.php phrase to make it look like this:
>
> <IfModule mod_dir.c>
>
> DirectoryIndex index.html index.htm index.shtml index.cgi
> index.php3 index.pl index.xhtml
>
> </IfModule>
>
> I then opened a terminal window again and tried to restart Apache.
> This time it did start but with some errors I don't understand.
>
> Here is the result:
>
> root at Dell1:~# /etc/init.d/apache2 restart
> * Restarting web server apache2
> apache2: apr_sockaddr_info_get() failed for Dell1
> apache2: Could not reliably determine the server's fully qualified domain
> name, using 127.0.0.1 for ServerName
> httpd (no pid file) not running
> apache2: apr_sockaddr_info_get() failed for Dell1
> apache2: Could not reliably determine the server's fully qualified domain
> name, using 127.0.0.1 for ServerName
> [ OK ]
>
> Then I tried to force-reload apache, thinking maybe it didn't read some file
> change? Who knows!
>
> Here is the result:
>
> root at Dell1:~# /etc/init.d/apache2 force-reload
> * Reloading web server config
> apache2 13675
> apache2: apr_sockaddr_info_get() failed for Dell1
> apache2: Could not reliably determine the server's fully qualified domain
> name, using 127.0.0.1 for ServerName
> [ OK ]
> root at Dell1:~#
>
> I still don't understand the cause for the error messages.....but at least
> it's running like an old car that backfires and belches smoke.
>
> I still cannot run the file test.php I placed in the root of my web domain:
>
> http://georutkay.homelinux.org/test.php
>
> Firefox pops up asking what to do with such a file, Open with Firefox or
> Save to disk?
>
> So I assume that PHP is still royally (bleeped) up! Why? I don't get it.
>
> This is the contents of the file test.php:
>
> <?php
> echo phpinfo();
> ?>
>
> I don't know if it's right or wrong.
>
> At least Apache is running again, but I'm back to square one after all of
> that wheel-spinning.
>
> geo
>
>
> --
> ubuntu-ca mailing list
> ubuntu-ca at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-ca
>
>
More information about the ubuntu-ca
mailing list