Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Idiot needs help enabling php in apache or apache2

0 views
Skip to first unread message

Land Haj

unread,
May 5, 2007, 4:30:08 AM5/5/07
to
Hi!

I guess I'm an idiot, and I'm certain this is somewhere right in front of my
eyes, but I can't seem to enable php on my webserver. I've tried both apache
and apache2, following the instructions from www.debian-administration.org. I
get the webserver working, and I apt-get install libapache-mod-php4 (or for
apache2, or the php5 equivalent for either apache version), and I use
apache-modconf or a2enmod to enable the module, but still the browsers won't
recognize the php file I point them at. I must be missing something very
obvious :(.

Here's what works:

Straight html files in my users public_html, htaccess etc.

Here's what doesn't:

php scripts in my users public_html (the browser wants to download them or open
with an editor)

What I want to be able do is to install the latest wordpress version (i e not
the one distributed with etch) in my users public_html. I do this as a test
run, because I need to use that wordpress version on a remote non-debian server
later. My mysql database is set to go, and everything required for wordpress
has been installed afaik (for instance, if I do apt-get install wordpress, it
only needs the wordpress package). I just can't get apache to recognize php.

If anyone reads this and thinks: 'duh! simple!', it would help tremendously if
you would throw me a line or two!

/landhaj

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Land Haj

unread,
May 5, 2007, 4:40:10 AM5/5/07
to

--- Indraveni <indr...@yahoo.co.in> wrote:

> Hi,
>
> You add the following lines in your apache conf file,
> probably, your httpd.conf or apache.conf file.
>
> AddType application/x-httpd-php php PHP
> AddType application/x-httpd-php-source .phps
>
>
> let me know, if it works
>


It did, because it made me discover that I needed to clear the browser cache
:). I truly am an idiot! Sorry for bothering, and thanks a lot!

Martin Marques

unread,
May 5, 2007, 8:50:07 AM5/5/07
to
Land Haj wrote:
> --- Indraveni <indr...@yahoo.co.in> wrote:
>
>> Hi,
>>
>> You add the following lines in your apache conf file,
>> probably, your httpd.conf or apache.conf file.
>>
>> AddType application/x-httpd-php php PHP
>> AddType application/x-httpd-php-source .phps
>>
>>
>> let me know, if it works
>>
>
>
> It did, because it made me discover that I needed to clear the browser cache
> :). I truly am an idiot! Sorry for bothering, and thanks a lot!

Nah, just add the apropiate links from mods-available to mods-enabled.
Something like:

ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled

Restart apache2 and you are done.

--
21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18
---------------------------------------------------------
Lic. Martín Marqués | SELECT 'mmarques' ||
Centro de Telemática | '@' || 'unl.edu.ar';
Universidad Nacional | DBA, Programador,
del Litoral | Administrador
---------------------------------------------------------

Mathias Brodala

unread,
May 5, 2007, 9:00:08 AM5/5/07
to
Hi Martin.

Martin Marques, 05.05.2007 14:43:


> Land Haj wrote:
>> --- Indraveni <indr...@yahoo.co.in> wrote:
>>> You add the following lines in your apache conf file,
>>> probably, your httpd.conf or apache.conf file.
>>>
>>> AddType application/x-httpd-php php PHP
>>> AddType application/x-httpd-php-source .phps
>>>
>>>
>>> let me know, if it works
>> It did, because it made me discover that I needed to clear the browser
>> cache
>> :). I truly am an idiot! Sorry for bothering, and thanks a lot!
>
> Nah, just add the apropiate links from mods-available to mods-enabled.
> Something like:
>
> ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled
> ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled

Or just:

# a2enmod php5

(Does exactly the same but is easier to remember and type.)


Regards, Mathias

--
debian/rules

signature.asc
0 new messages