Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot add mysql support to mod_php
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
nightracer
n00b
n00b


Joined: 14 Mar 2003
Posts: 21
Location: Belgium, Leuven

PostPosted: Fri Aug 08, 2003 10:35 am    Post subject: cannot add mysql support to mod_php Reply with quote

Hi all,

I'm trying to set up a server that uses apache2, php and mysql.
Apache2 and php are working fine, php pages are displayed correctly, even phpinfo runs.
Now I'm trying to add mysql to php.
So I edited my make.conf and added mysql to USE.
However after recompiling mod_php it still cannot access a mysql database.
The phpinfo still reads: --without_mysql or some thing like that.
But there are other strange things in phpinfo: e.g.: --with_jpeg, --without_jpeg
How can these 2 flags exist at the same time?

I even tried: USE="mysql" emerge mod_php, to no avail.

How do you guys do it?

Regards
Nightracer
Back to top
View user's profile Send private message
chris4linux
Apprentice
Apprentice


Joined: 13 Nov 2002
Posts: 210
Location: Germany

PostPosted: Fri Aug 08, 2003 11:02 am    Post subject: Reply with quote

I have apache2, php4 and mysql4 on my box...first I installed mysql, than I give the terminal the following line:
Code:

USE="+mysql" emerge apache mod_php"


make sure that your keywords are ~x86...

however, this was my way to get them working....I hope that it will help you...

- Chris
_________________
NOTICE: alloc: /dev/null: filesystem full
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Fri Aug 08, 2003 6:27 pm    Post subject: Reply with quote

USE="+mysql" isn't really valid. USE flags are either "mysql" or "-mysql".
Back to top
View user's profile Send private message
maalth
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2003
Posts: 76
Location: Can't tell you...

PostPosted: Sun Aug 10, 2003 12:42 am    Post subject: Reply with quote

If you're installing on mod_php on apache2, you have to use the following flags -apache apache2 mysql. If you're using apache1, put the - on apache2 instead.
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sun Aug 10, 2003 1:42 am    Post subject: Reply with quote

I recompiled php and it didn't work for me either ...

Until I restarted apache! =)
_________________
http://get.a.clue.de
Back to top
View user's profile Send private message
maalth
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2003
Posts: 76
Location: Can't tell you...

PostPosted: Sun Aug 10, 2003 3:31 am    Post subject: Reply with quote

If you do an emerge -pv mod_php; it will show what flags are enabled. Red flags means it will be compiled in, blue means it will not. You have to make sure that at a minimum of USE="apache2 mysql" are enabled. If you need further help, please post. PHP should also be installed with the same options.
Back to top
View user's profile Send private message
nightracer
n00b
n00b


Joined: 14 Mar 2003
Posts: 21
Location: Belgium, Leuven

PostPosted: Mon Aug 11, 2003 6:48 am    Post subject: Reply with quote

Hi all,

The restart of apache2 did it.

Although a /etc/init.d/apache2 restart did not work, it stopped apache2 but failed to start it. There were errors about '[warn] child process ????? still did not exit, sending a SIGTERM'

Then a /etc/init.d/apache2 start did it. Apache2 is back up and running. phpinfo() now indicated: '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock'.

maalth: you said PHP should also be installed with the same use flags as mod_php. However when i emerge -pv php, only the mysql flag is there, nothing about apache or apache2.

Everybody, thanks very much for helping me.

Regards,
Nightracer
Back to top
View user's profile Send private message
darookee
Apprentice
Apprentice


Joined: 02 Jan 2003
Posts: 162
Location: Long Beach, CA.

PostPosted: Mon Aug 11, 2003 11:51 am    Post subject: Reply with quote

nightracer wrote:
However when i emerge -pv php, only the mysql flag is there, nothing about apache or apache2.

This is because php is not the apache module, so it doesn't need the apache USEflag
Back to top
View user's profile Send private message
zona
n00b
n00b


Joined: 14 Aug 2003
Posts: 1

PostPosted: Thu Aug 14, 2003 3:02 pm    Post subject: Reply with quote

can I emerge mod_php with mysql support and dont have to install mysql?
I'm using a remote mysql and I dont need a database running in my box.
thanks for advise.
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Sat Aug 16, 2003 11:50 pm    Post subject: Reply with quote

Whatever box you are running apache/mod_php on has to have mysql installed on it. Even if you plan to access a remote mysql database, the mod_php needs to have the mysql libs locally at compile-time, which only happens by emerging mysql.
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