# I just can't get mod_php to work with apache

## MooktaKiNG

Ok i installed apache php mod_php mod_ssl mod_mp3 with the following USE setting: 

 *Quote:*   

> USE="samba acpi apache2 gtk2 gtkhtml imap lirc maildir mpeg curl alsa xv slang readline mmx tcpd libwww ssl ftp perl python oggvorbis gnome X -qt kde motif png tiff xmms usb mozilla x86 3dnow avi gif gtk -java jpeg mpeg truetype"

 

I have installed them and did:

 *Quote:*   

> 
> 
> ebuild /var/db/pkg/dev-php/mod_php-4.3.1/mod_php-4.3.1.ebuild config
> 
> ebuild /var/db/pkg/net-www/mod_ssl-2.8.14/mod_ssl-2.8.14.ebuild config
> ...

 

I edit /etc/config.d/apache and uncommented:

 *Quote:*   

> APACHE_OPTS="-D SSL -D PHP4 -D -MP3"

 

I then start apache and i get this error:

 *Quote:*   

> 
> 
> mooktaking portage # /etc/init.d/apache start
> 
>  * Starting apache...
> ...

 

I searched through the forum, but i couldn't find this same problem. how ever i did find a similar problem and it said to emerge sablotron.

It still didn't work. I even remerged php after that.

Still the same problem.

has anyone had this problem before.

The weirdest thing is i've emerged apache 1.3.27-r3.

But i see that there's a folder called /etc/apache2 aswell. But this folder is  nearly empty, it has conf and couple of files inside conf.

----------

## dputzter82

*I'm using lynx to write this, plase forgive me if the formatting is off*

I am having basically the same problem.  I've been using gentoo for about a month now, and I decided that since I was getting pretty comfortable with it and with what I was going to use it for, that I would reinstall from scratch etc...

Everything has gone flawlessly except for the web server.  I tried to follow the desktop configuration guide, but no go.  What happens here is that after I run

emerge apache php mod_php mod_ssl 

ebuild .....mod_php....ebuild config

ebuild .....mod_ssl....ebuild config

The ssl.so is in the right place under apache/extramodules

but the php.sso is not in the right place.  I edited the php ebuild and figured out where it put the file, and moved it, and after that when I try to start apache, I get the exact same error as above.

I also have read everything I can find in the old posts, but I couldn't find an answer anywhere.

----------

## Durenunde

I also had this problem, you should check to see if you are using the apache2 in your make.conf if so change it to apache, I then removed all evidence of apache then merged them once more and voila it worked... 

hope its as easy for yourself

----------

## MooktaKiNG

Actually now that o check. You are right. I did have apache2 in my USE.

I changed it now to apache. and emerge again with --usepkg, but didn't work. I'm gonna try to compile again (not use --usepkg). But now i'm a bit tired. need sleep, and this dammit chicken pox is killing me   :Mad:   :Mad:   :Mad:   :Mad: 

----------

## MooktaKiNG

 *Durenunde wrote:*   

> I also had this problem, you should check to see if you are using the apache2 in your make.conf if so change it to apache, I then removed all evidence of apache then merged them once more and voila it worked... 
> 
> hope its as easy for yourself

 

YES!!! this did the trick. I woke up this morning and compiled it again.

Thank you my friend, you have been very helpful  :Very Happy: 

----------

## mjerom

apache2 is not stables yet isn't it ?

so even if you have apache2 in your USE

you have to change your make.conf to accept unstable version.

----------

## Durenunde

 *MooktaKiNG wrote:*   

> 
> 
> YES!!! this did the trick. I woke up this morning and compiled it again.
> 
> Thank you my friend, you have been very helpful 

 

Glad it didnt torture you as long as it did me  :Wink: 

I started with experimental packages when I was just getting used to linux (not a good idea I think  :Smile:  ) and when I changed to normal on the next try and that one stumped me for about a day until someone I was talking to said to check that.

 *mjerom wrote:*   

> apache2 is not stables yet isn't it ? 
> 
> so even if you have apache2 in your USE 
> 
> you have to change your make.conf to accept unstable version.

 

nope its not stable yet there are still some things they are ironing out and php still isnt stable with it AFAIK though I never had any problems with it when I used in with the windows release before I moved everything over to linux.

----------

## mjerom

i choosed to iunstall stable branch cauz i'm a NOOB (with a big N)

this allows me to find many howto & tutorials about installing,configuration,......

----------

## Durenunde

there are getting to be some great sites out there but still alot of stuff that I personally like to see documented a bit better as I had some real problems with ODBC stuff and what not but here is a list of some of the sites I've been using since I started

http://www.tldp.org - The Linux Documentation Project

http://samba.org - Quite a good site for documentation

http://www.unixodbc.org - its alright if you are using a GUI but better documentation is sorta needed for those that don't  :Smile: , I actually found how to do it here on the gentoo forums.

http://www.pureftpd.org/documentation.shtml - quite straight forward once its down and in there, I decided to go for this one because it was much easier than vsftpd just seemed to work with less effort needed

http://apache.org - Apache's documentation is fantastic in my opinion it always has got my problem solved pretty fast if I had one.

http://php.net - another great site which led me by the hand when needed and taught me a great deal with its tutorials

http://phpmyadmin - a great tool for using mysql databases with apache and php and documented pretty well.

sorry a little off topic but there ya have it now

----------

## MooktaKiNG

I do have another question, which has been baffled me since the first time i installed a webserver (~6 months). How owuld you turn mp3 streaming on for apache?

I have installed mod_mp3 but, that doesn't work.

I usually publish my website using Flash MX, and have an mp3 player that streams mp3. But doesn't work on my server, however when i put it somewhere else lit does stream.

I can't firgure it out.

----------

## Durenunde

for video and media I use the <embed></embed> tags on the page that way it comes up on screen with a little box for playing. other than that I have no idea how to load support for it actually into apache, sounds interesting I may look into it personally as I run 2 web servers.

----------

## Durenunde

http://media.tangent.org/faqs/mod_mp3.html

found this as I'm now trying out mod_mp3 I'm following this hopefully it help you also

----------

## MooktaKiNG

i already knew about that and tried it, it didn't work.

----------

## Durenunde

K I got it working rilliantly

if you want to check it out *edited out for now as I decided it best not to tempt fate  :Smile: *

heres what I did

1. emerge mod_mp3

2. ebuild /var/db/pkg/net-www/mod_mp3-x.xx-r2/blah blah

3. edit your /etc/conf.d/apache. my one now looks like this "APACHE_OPTS="-D SSL -D PHP4 -D MP3"

4. I made a virtual host and followed this...

 *Quote:*   

>        <VirtualHost *>
> 
>                 ServerName my.own.name
> 
>                 MP3Engine On
> ...

 

note: make sure you have your virtual host module loaded in

5. restart apache and viola

----------

## MooktaKiNG

No i want to play the mp3's that i have in my website which is made using Flash FX. 

Click the link below and see if you here the music  :Smile: 

----------

## Durenunde

I think what you want to do is actually embed your tracks onto your page not use apache as a streaming audio player then... I think anyway. Although you could embed a player onto a page that runs through your own songs from inside your server that would work I think, I'm not further help I'm afraid on the subject

----------

## MooktaKiNG

but when you have an mp3 song at 128kps it gets to be 3megs  :Very Happy:  :Very Happy: 

so streaming is best.

----------

## weazy

apache 2 is most certainly stable. if you go to the apache.org web site, you will see that apache 2 is the build the organization recommends you use. i use 1.3.27 personally, but its not accurate to say apache 2 isnt stable

----------

## spectre

I have PHP4 working with apache2. I had to do 2 things.

Uncomment the line in /etc/conf.d/apache2 and add "-D PHP"

Also, there is a soft link in /etc/php4 called "lib" that points to a non-existent location. Change it to /usr/lib/apache2-extramodules

It worked fine for me after that.

----------

## xedx

How does mod_mp3 compare to icecast?

----------

