View previous topic :: View next topic |
Author |
Message |
nightracer n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Mar 2003 Posts: 21 Location: Belgium, Leuven
|
Posted: Fri Aug 08, 2003 10:35 am Post subject: cannot add mysql support to mod_php |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
chris4linux Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/20950877263e7d7a6359d3e.jpg)
Joined: 13 Nov 2002 Posts: 210 Location: Germany
|
Posted: Fri Aug 08, 2003 11:02 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
rizzo Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/7070208983e8345b9651f5.png)
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Fri Aug 08, 2003 6:27 pm Post subject: |
|
|
USE="+mysql" isn't really valid. USE flags are either "mysql" or "-mysql". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
maalth Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Southpark/avatar44.gif)
Joined: 06 Jun 2003 Posts: 76 Location: Can't tell you...
|
Posted: Sun Aug 10, 2003 12:42 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
splooge l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 30 Aug 2002 Posts: 636
|
Posted: Sun Aug 10, 2003 1:42 am Post subject: |
|
|
I recompiled php and it didn't work for me either ...
Until I restarted apache! =) _________________ http://get.a.clue.de |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
maalth Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Southpark/avatar44.gif)
Joined: 06 Jun 2003 Posts: 76 Location: Can't tell you...
|
Posted: Sun Aug 10, 2003 3:31 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nightracer n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Mar 2003 Posts: 21 Location: Belgium, Leuven
|
Posted: Mon Aug 11, 2003 6:48 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
darookee Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/196664879144e44783c4ac5.png)
Joined: 02 Jan 2003 Posts: 162 Location: Long Beach, CA.
|
Posted: Mon Aug 11, 2003 11:51 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
zona n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Aug 2003 Posts: 1
|
Posted: Thu Aug 14, 2003 3:02 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
rizzo Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/7070208983e8345b9651f5.png)
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Sat Aug 16, 2003 11:50 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|