View previous topic :: View next topic |
Author |
Message |
stealthy Tux's lil' helper
Joined: 08 Aug 2002 Posts: 118 Location: ONTARIO CANADA
|
Posted: Thu Aug 08, 2002 4:14 am Post subject: Apache & PHP, php not working |
|
|
Hello everyone, Guess I need help
I've emerged apache, php & ,mod_php.
But php isn't working, because when I access a php page, its just shows the code.
I've done everything exactly the same as I did on my last gentoo installation(about two months ago), except then, just emerging php was enough to make php work in apache.
But getting back to the point. After emerging and editing the /etc/conf.d/apache file. PHP didn't work.
I sort of know where the problem is:
this is because when I did
ebuild /var/db/pkg/dev-php/mod_php-4.2.2/mod_php-4.2.2.ebuild config
I got an error:
ebuild /var/db/pkg/dev-php/mod_php-4.2.2/mod_php-4.2.2.ebuild config
!!! No message digest file found: /var/db/pkg/dev-php/mod_php-4.2.2/files/digest-mod_php-4.2.2
!!! Type "ebuild foo.ebuild digest" to generate a digest.
This is the same for both php & mod_php, I mean I get the same error.
Then I generated the digests for both php & mod_php as follows:)
mod_php-4.2.2 # ebuild mod_php-4.2.2.ebuild digest
>>> Generating digest file...
>>> Computed message digests.
mod_php-4.2.2 # ebuild mod_php-4.2.2.ebuild config
>>> md5 php-4.2.2.tar.bz2
mod_php-4.2.2 # cd ..
php-4.2.2 # ebuild php-4.2.2.ebuild digest
>>> Generating digest file...
>>> Computed message digests.
php-4.2.2 # ebuild php-4.2.2.ebuild config
>>> md5 php-4.2.2.tar.bz2
Even after this I still don't have php working
I've tried emerge php, mod_php, apache again..still no luck
can someone please tell me what I am doing wrong? |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Aug 08, 2002 4:39 am Post subject: |
|
|
Two things to check in /etc/apache/conf/apache.conf:- Is the php module loaded? Do you have "LoadModule php4_module /usr/lib/apache/1.3/libphp4.so"?
- Is a handler defined? Do you have "AddType application/x-httpd-php .php"?
_________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
stealthy Tux's lil' helper
Joined: 08 Aug 2002 Posts: 118 Location: ONTARIO CANADA
|
Posted: Thu Aug 08, 2002 5:16 am Post subject: Thanks Rac |
|
|
Although I had already tried
LoadModule php4_module extramodules/libphp4.so
it didn't work...
but here is what has worked
in /etc/apache/conf/apache.conf
I added
LoadModule php4_module /usr/lib/apache/libphp4.so
&
AddModule mod_php4.c
and in /etc/apache/conf/commonapache.conf
I added the php handler as you had suggested
seems like everything is working now
Thank you very much. |
|
Back to top |
|
|
steblublu n00b
Joined: 12 Jul 2002 Posts: 49 Location: montreal, canada
|
Posted: Thu Aug 08, 2002 6:28 am Post subject: Re: Thanks Rac |
|
|
you do not need to install the "php" package. just the "mod_php" if you will be using it with apache.
after doing an 'emerge mod_php' it will explain that you need to run a config on the ebuild...ex: "ebuild /var/db... mod_php.ebuild config"...DO THIS.
it will place a few lines (LoadModuile and AddModule) in your 'apache.conf' file.
steb |
|
Back to top |
|
|
|