Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache & PHP, php not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
stealthy
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2002
Posts: 118
Location: ONTARIO CANADA

PostPosted: Thu Aug 08, 2002 4:14 am    Post subject: Apache & PHP, php not working Reply with quote

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 :roll:

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Aug 08, 2002 4:39 am    Post subject: Reply with quote

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
View user's profile Send private message
stealthy
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2002
Posts: 118
Location: ONTARIO CANADA

PostPosted: Thu Aug 08, 2002 5:16 am    Post subject: Thanks Rac Reply with quote

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
View user's profile Send private message
steblublu
n00b
n00b


Joined: 12 Jul 2002
Posts: 49
Location: montreal, canada

PostPosted: Thu Aug 08, 2002 6:28 am    Post subject: Re: Thanks Rac Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum