Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trying to get PHP compiled with MySQL support
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
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 1:59 pm    Post subject: Trying to get PHP compiled with MySQL support Reply with quote

I'm trying to install phpBB but I found out that I didn't have MySQL support in PHP. So I thought, "oh no problem, just add mysql to USE and remerge php". Well, that's what I thought until I got these errors:

Code:
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c: In function `zm_info_mysql':
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:467: error: `PHP_MYSQL_TYPE' undeclared (first use in this function)
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:467: error: (Each undeclared identifier is reported only once
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:467: error: for each function it appears in.)
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:469: error: `PHP_MYSQL_INCLUDE' undeclared (first use in this function)
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:470: error: `PHP_MYSQL_LIBS' undeclared (first use in this function)
make: *** [ext/mysql/php_mysql.lo] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: dev-php/php-4.3.8 failed.
!!! Function php-sapi_src_compile, Line 511, Exitcode 2
!!! compile problem


It seems to me that there are either missing environment variables or #defines in the header files. Does anyone have any idea how to correct this? I can reproduce this error as long as mysql is in my USE flag and I'm emerging any version of PHP(tried 5.0 by hand and ebuild then 4.3.8 by ebuild and by hand). Well, any ideas? Cheers.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Jul 29, 2004 2:50 pm    Post subject: Reply with quote

And you do have mysql emerged alreqady ?
If not, try that before emerging php...
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 4:03 pm    Post subject: Reply with quote

adaptr wrote:
And you do have mysql emerged alreqady ?
If not, try that before emerging php...


I've already merged that then remerged it. Perhaps I should try unmerging it and remerging it then doing PHP?
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 4:41 pm    Post subject: Reply with quote

Same deal after doing this:

Code:

# emerge -C mysql
# emerge php (it also installed mysql)


Any other ideas?
Back to top
View user's profile Send private message
codemaker
Guru
Guru


Joined: 03 Jun 2004
Posts: 398
Location: Lisboa, Portugal

PostPosted: Thu Jul 29, 2004 5:02 pm    Post subject: Reply with quote

All I can say is that I only did this:

emerge apache
emerge mysql
emerge php
vim <insert each config file here>

I don't have nothing in my use flags related to this packages and it's working.

:?
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 5:07 pm    Post subject: Reply with quote

codemaker wrote:
All I can say is that I only did this:

emerge apache
emerge mysql
emerge php
vim <insert each config file here>

I don't have nothing in my use flags related to this packages and it's working.

:?


The problem is getting PHP to merge correctly. Also, there might be references in your /etc/make.profile/make.defaults file. :wink:
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Thu Jul 29, 2004 5:36 pm    Post subject: Reply with quote

What is the output of emerge -pv php mod_php

Chances are it's one of the USE variables causing issues.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
codemaker
Guru
Guru


Joined: 03 Jun 2004
Posts: 398
Location: Lisboa, Portugal

PostPosted: Thu Jul 29, 2004 6:34 pm    Post subject: Reply with quote

Pwnz3r wrote:

The problem is getting PHP to merge correctly. Also, there might be references in your /etc/make.profile/make.defaults file. :wink:


make.defaults should be the same for everyone because it gets updated when you sinc and it doesn't have any reference to mysql, php or apache. But mysql appears when I do emerge info thou. It's on my use.defaults file ;)

As for compiling errors, I don't know anything about that. I had some problems compiling but I don't know what to do when that happens :(
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 7:10 pm    Post subject: Reply with quote

kashani wrote:
What is the output of emerge -pv php mod_php

Chances are it's one of the USE variables causing issues.

kashani


Code:
root@Fygor # emerge -pv php mod_php                                   php-4.3.8

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     UD] dev-php/php-4.3.8 [5.0.0]  16 kB
[ebuild  N    ] dev-php/mod_php-4.3.8  +X +apache2 +berkdb +crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix -ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +pdflib +png -postgres -qt -snmp +spell +ssl +tiff +truetype +xml2 -yaz  16 kB

Total size of downloads: 33 kB


I've been hacking through code with no avail. I might just b0rk the support in the end but we'll see.

EDIT: Gave up on hacking code. Any other ideas anyone?
Back to top
View user's profile Send private message
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Thu Jul 29, 2004 8:53 pm    Post subject: Reply with quote

Pwnz3r wrote:
kashani wrote:
What is the output of emerge -pv php mod_php

Chances are it's one of the USE variables causing issues.

kashani


Code:
root@Fygor # emerge -pv php mod_php                                   php-4.3.8

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     UD] dev-php/php-4.3.8 [5.0.0]  16 kB
[ebuild  N    ] dev-php/mod_php-4.3.8  +X +apache2 +berkdb +crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix -ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +pdflib +png -postgres -qt -snmp +spell +ssl +tiff +truetype +xml2 -yaz  16 kB

Total size of downloads: 33 kB

EDIT: Gave up on hacking code. Any other ideas anyone?


You can try older versions of PHP (eg, 'emerge <dev-php/php-4.3.8 -pv')
The ebuild for php-4.3.8 seems to be borked, because it has no use flags (same thing for me, wtf?), although older versions of PHP had as much as mod_php-4.3.8
Also, if you're going to use PHP with Apache, you probably want to use mod_php anyway.
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 8:55 pm    Post subject: Reply with quote

I already had mod_php installed. It gives the same errors about MySQL. :\
Back to top
View user's profile Send private message
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Thu Jul 29, 2004 9:08 pm    Post subject: Reply with quote

Did you try older versions of php or mod_php? (mod_php-4.3.8 works for me though)
Playing around with the USE flags can also help. (use equery uses mod_php to find out what USE flags it has got)
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 9:21 pm    Post subject: Reply with quote

integor wrote:
Did you try older versions of php or mod_php? (mod_php-4.3.8 works for me though)
Playing around with the USE flags can also help. (use equery uses mod_php to find out what USE flags it has got)


Could you do emerge -vp mod_php to let me see what USE flags you have on?
Back to top
View user's profile Send private message
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Thu Jul 29, 2004 9:38 pm    Post subject: Reply with quote

Pwnz3r wrote:
Could you do emerge -vp mod_php to let me see what USE flags you have on?

I've disabled as much options as I could to reduce the number of dependencies, because I don't really use PHP. But, if you insist:
Code:

[ark ~]# emerge php mod_php -pv
[ebuild  N    ] dev-php/php-4.3.8   16 kB
[ebuild   R   ] dev-php/mod_php-4.3.8  -X +apache2 +berkdb +crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix +ipv6 -java -jpeg -kerberos -ldap -mcal -memlimit -mssql -mysql -nls -oci8 -odbc -pam -pdflib -png -postgres -qt -snmp -spell -ssl -tiff -truetype -xml2 -yaz  16 kB

It might also be because apache2. I think you should use Apache 2.0 unless you don't have any specific reasons not to.
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 9:41 pm    Post subject: Reply with quote

The problem is getting MySQL to go into it. As you can see in the orginial post, the stuff causing all the trouble is MySQL stuff. In yours, the mysql USE flag is set to off.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Thu Jul 29, 2004 9:58 pm    Post subject: Reply with quote

Your use flags look pretty good, almost exactly what I'm using. The only odd one is ipv6 which I'd remove that on if you don't need it. It can cause strange problems in many case especially if you don't have any ipv6.

There was an odd portage issue that was causing php not to show it's USE flags which is why I had you do both php and mod_php. I think rebuilding portage fixes it, but you may want to search for that before doing anything rash.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 29, 2004 10:35 pm    Post subject: Reply with quote

I got it. It seemed that I didn't have bash fully merged so I merged it and all works fine. Thanks for your replies though.
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