Forums | MacLife

Wide is the new black

You are not logged in.

#1 2006-06-02 3:27 pm

BenJammin
Tekerson Tech
From: Oakland, CA
Registered: 2000-06-13
Posts: 186

PHP 5.1.4 from source...

Hiya, I posted this elsewhere on the forum, but realized that I should probably have put it here instead.

Following the instructions from http://www.phpmac.com/articles.php?view=252 I downloaded and installed apache 2.2.2 and installed with no errors, however when I moved on to the php 5.1.4 part I can get it to configure but during make is stalls out with the following error:

Code:

/usr/bin/ld: warning multiple definitions of symbol _ERR_print_errors_fp
/usr/local/mysql/lib/libmysqlclient.a(ssl.o) definition of _ERR_print_errors_fp in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libcrypto.dylib(err_prn.o) definition of _ERR_print_errors_fp
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

I checked and made sure I have applied all the updates, etc from Apple. The only thing I can think of is that instead of installing apache 2 in /apache2 I went and installed it in /etc/apache2. But I don't think that should make much of a difference.confused


I am a guy. I do stuff.

Offline

 

#2 2006-06-02 4:57 pm

Miles
Now I fight for wisdom!
Administrator
From: Michigan
Registered: 2001-07-21
Posts: 4456
Website

Re: PHP 5.1.4 from source...

BenJammin wrote:

Hiya, I posted this elsewhere on the forum, but realized that I should probably have put it here instead.

In the future, you can ask a mod to bump it over for you, either in the topic itself or by using the "Report" link. smile

Offline

 

#3 2006-06-07 12:25 pm

mauriciopastrana
Member
Registered: 2006-06-07
Posts: 7

Re: PHP 5.1.4 from source...

Same Here, Im running on a Macbook Pro running 10.4.6

MySQL runs no problem on its own (from the mysql package installer for OS X), PHP 5.1.4 runs good too, I have a phpinfo page up, and Apache 2.2.2 runs EVEN from the system preferences panel, all coming from the http://www.phpmac.com/articles.php?view=252 page.

BUT! when I run phpinfo I dont get anything mysql.

Where is the error? the configure line works wether I add or not --with-mysql=/usr/local/mysql, but IF i add --with-mysql=/usr/local/mysql, then you get this error at make.

here's my terminal dump:

Code:

macbuch:~ mauriciopastrana$ cd php-5.1.4
macbuch:~/php-5.1.4 mauriciopastrana$ ./configure --prefix=/apache2/php --with-zlib --with-xml --with-ldap=/usr --enable-cli --with-zlib-dir=/usr --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-mysql=/usr/local/mysql --with-apxs2=/apache2/bin/apxs

(snip)

+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

macbuch:~/php-5.1.4 mauriciopastrana$ sudo make

(snip)

/usr/local/mysql/lib/libmysqlclient.a(ssl.o) definition of _TLSv1_server_method in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libssl.dylib(t1_srvr.o) definition of _TLSv1_server_method
/usr/bin/ld: warning multiple definitions of symbol _ERR_print_errors_fp
/usr/local/mysql/lib/libmysqlclient.a(ssl.o) definition of _ERR_print_errors_fp in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libcrypto.dylib(err_prn.o) definition of _ERR_print_errors_fp
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
macbuch:~/php-5.1.4 mauriciopastrana$

Offline

 

#4 2006-06-07 2:14 pm

BenJammin
Tekerson Tech
From: Oakland, CA
Registered: 2000-06-13
Posts: 186

Re: PHP 5.1.4 from source...

Hrmm, yeah weird. Looks like the same error, even with a different acrhitecture. I've not gotten anywhere with this one, yet. I caved and hijacked one of the XServes here at work with OS X Server on it. Probably gonna get a talking to, but at least I might be able to get something going on it under server instead of Client. I'll post my results when I give it a shot.


I am a guy. I do stuff.

Offline

 

#5 2006-06-07 4:38 pm

akb825
ph34r teh master sword
From: In a secluded room
Registered: 2003-12-25
Posts: 6335
Website

Re: PHP 5.1.4 from source...

You could try downloading the newest version of the developer tools. (they recently released it with XCode 2.3) One of the fixes had to do with an issue of including multiple copies of a file to have linking errors like that. It mentions it in XCode, but it's possible that it was also a problem with GCC in general. Even if it doesn't work, it's always nice to have the newest version of the compiler. shrug

If it doesn't work,  you should e-mail somebody who is on the project, since it would be a problem they should fix. If that's the case, it's possible that this is a problem on other systems as well.

Last edited by akb825 (2006-06-07 4:42 pm)


My software

"Standards are for n00bs!!!" -Microsoft

Offline

 

#6 2006-06-08 6:01 pm

mauriciopastrana
Member
Registered: 2006-06-07
Posts: 7

Re: PHP 5.1.4 from source...

hmm... well, I just put in xcode 2.3 from the included DVD (this machine is about a week old, so everything new is coming in).

I guess i should report a bug at php.net phew...

I wonder if anyone else has had this problem (other than Ben). I think its too soon to blame intel pcs, but at least its refreshing to know its the SAME error.

-mp

Offline

 

#7 2006-06-08 6:24 pm

mauriciopastrana
Member
Registered: 2006-06-07
Posts: 7

Re: PHP 5.1.4 from source...

ok, here's the bug entry:

http://bugs.php.net/bug.php?id=37756

-mp

Offline

 

#8 2006-06-09 10:52 am

mauriciopastrana
Member
Registered: 2006-06-07
Posts: 7

Re: PHP 5.1.4 from source...

here's an update from php-bugs:

[9 Jun 6:21am UTC] derick@php.net
It's a conflict between two libraries (libmysql and libcrypto) that PHP
links against. Nothing we can do about that as it's not a problem with
PHP.

I m now moving this from php bugs to mysql bugs.

anyone else have this problem?

-mp

Offline

 

#9 2006-06-09 10:59 am

mauriciopastrana
Member
Registered: 2006-06-07
Posts: 7

Re: PHP 5.1.4 from source...

here's the MySQL bug entry:

http://bugs.mysql.com/20362

-mp

Offline

 

#10 2006-06-12 8:45 pm

FishCow
Member
Registered: 2006-06-12
Posts: 2

Re: PHP 5.1.4 from source...

Hi all
I was having the same problem.
I backed my version of MySQL back down to 4.1.20 and was able to compile and install PHP 5.1.4 against those libs.
I have just confirmed that mysql extension is enabled in the php version "test page".

Now I'm thinking I could go ahead and install  mysql 5.0.22 over the top.... hmmmmm
Will keep you posted
Regards
I'm running apache2, mysql 4.1.0, php 5.1.4 on Mac OS X 10.4.6

One further comment - just now confirmed above combination works with phpmyadmin-2.8.1

Last edited by FishCow (2006-06-12 8:49 pm)

Offline

 

#11 2006-06-13 2:05 pm

BenJammin
Tekerson Tech
From: Oakland, CA
Registered: 2000-06-13
Posts: 186

Re: PHP 5.1.4 from source...

I think I've gone and broken everything, just moreso. hmm

I got myself a hold of 10.4 server and went to work updating(breaking) the default install of Apache2 in /opt/apache2

Using a combination of instructions from http://developer.apple.com/tools/subversionxcode.html (I used step 3 from that, apache didn't seem to want to compile with out it) and from kooshballs post here: http://www.entropy.ch/phpbb2/viewtopic.php?t=2327 (I used his bits from adding php5)

I do get an error when installing the php mpkg, however I think the error is just it failing to actually start apache as a test (It's going for the old version of apache) Maybe I'm wrong though.

Apache2 sucessfully ./configure, make and make installed however, when I go to run it I get

httpd: Syntax error on line 234 of /opt/apache2/conf/httpd.conf: API module structure `auth_module' in file /opt/apache2/modules/mod_auth.so is garbled - perhaps this is not an Apache module DSO?

Ugh, so I think installing(updating?) apache2.2.2 over the default install of it on OS X server breaks things?

And here I thought I'd actually get to the php, mysql step. cry


I am a guy. I do stuff.

Offline

 

#12 2006-06-13 5:20 pm

BenJammin
Tekerson Tech
From: Oakland, CA
Registered: 2000-06-13
Posts: 186

Re: PHP 5.1.4 from source...

Ah ha! If I blow away the /opt/apache2 directory first and then do everything I did above, it works. So, yay, of sorts. It works with the php binary from entropy too. Now, on to MySQL roll


I am a guy. I do stuff.

Offline

 

#13 2006-06-14 10:17 am

FishCow
Member
Registered: 2006-06-12
Posts: 2

Re: PHP 5.1.4 from source...

nod   Hmmmm... O.K
So I manually moved all parts of my install of mysql 4.1.0 to the trash and installed Mysql 5.0.22 in its place....and now everything works.

I have apache 2.2.2 ; PHP 5.1.4 and mysql 5.0.22 all running together...... and now I have no idea what to do with it - but it was fun ;-)
Cheers

wink

Last edited by FishCow (2006-06-14 10:52 am)

Offline

 

#14 2006-06-15 6:21 pm

mauriciopastrana
Member
Registered: 2006-06-07
Posts: 7

Re: PHP 5.1.4 from source...

OK, Yep it runs beautifully!!!

thanks everyone, I should have thought about this.

BTW the mysql bug entry was removed as it apparently was already mentioned here:

http://bugs.mysql.com/bug.php?id=19575

it's been known for a while and at best written as a comment on the code. phew!

cheers

-mp

Offline

 

#15 2006-07-05 5:21 pm

dang
Member
Registered: 2006-07-05
Posts: 1

Re: PHP 5.1.4 from source...

If you are wondering how to install mysql4 over mysql5 (when i tried, I got an error in the installer saying there was nothing to install), delete your mysql5 receipts in /Library/Receipts/

After installing mysql4, i was able to install php5 finally.

Offline

 

#16 2006-10-12 12:49 pm

caorfeo
Member
Registered: 2006-10-12
Posts: 2

Re: PHP 5.1.4 from source...

HI,

i have the same problem. But how to downgrade?
Is there a special way to do it)

Thanks

Offline

 

#17 2006-10-13 4:08 am

caorfeo
Member
Registered: 2006-10-12
Posts: 2

Re: PHP 5.1.4 from source...

Hi,

it works!

Offline

 

#18 2007-02-21 8:29 am

alamaz
Member
Registered: 2007-02-21
Posts: 1

Re: PHP 5.1.4 from source...

It seems to works when i install PHP5 with Mysql4 then i upgrade to mysql5, but the problem is that phpMyAdmin says me :
Server version: 5.0.27-max
Client version: 4.1.22
Compilation of PHP5 with MySQL5 works fine when removing -lcrypto in the makefile
any idea ?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson