MySQL port name confusion

Ryan Schmidt ryandesign at macports.org
Sat Sep 26 22:33:59 PDT 2009


On Sep 26, 2009, at 22:21, Scott Haneda wrote:

> Thanks for all the info, very interesting.  I am glad this came up,  
> as there is a pretty big poop fest over on the twitter dev mailing  
> list about their user_id breaking into 64 bit territory.
>
> They return JSON for most of everything, and most devs are using  
> php5, which most hosts are building out as 32 bit.  From what I can  
> gather, when a 64 bit value comes in as JSON and php gets ahold of  
> it, it will convert it to a float, and essentially break things.

I was not aware of this issue. But it sounds like either a bug in PHP,  
or in the JSON spec or implementation, or in the Twitter API, so  
nothing particularly interesting for MacPorts here, except of course  
the ability to build php5 as 32-bit or 64-bit to test this issue.

> The suggested solution is to built php5 as 64 bits.  Many apparently  
> can not do this.
>
> How does this factor into MacPorts with php5, and all the php5-*  
> modules you can add, with their dependencies?  I am going to wager a  
> good deal of those are not able to be built as 64 bit at this time,  
> does that mean php5 also can not be built 64 bit as well, or the  
> internal core of php5 can, but the modules will happily mix and match?
>
> For what it is worth, I am running 32 bit php, as that is what  
> MacPorts built for me on a PPC dual g5, and I will have to deal with  
> this issue in a twitter app.  Unless of course it is simple to go 64  
> bit php5.
>
> For me, I figure, JSON is just a string anyway, so I can simply  
> massage that string a little, and store it in mysql as a 64 bit  
> value, which even under a 32 bit build will handle it fine.  I am  
> not aware of any direct php modification I would need to do on the  
> JSON output, as long as I can store it safely in MySql, I am not  
> seeing much problem for my apps.

php5 builds fine 64-bit for me on Snow Leopard, and so do the modules  
I've installed. I haven't tried installing them all yet. You're free  
to try 64-bit builds on your G5. Set build_arch to ppc64 in  
macports.conf and rebuild all ports. You may want to set  
universal_archs to ppc ppc64 and rebuild all ports universal; this way  
in case there are some where 64-bit builds are not possible you can  
still build them 32-bit instead of being unable to build them at all.  
Please file bugs if you find any ports that don't work either as 64- 
bit only or as 64-bit/32-bit universal.



More information about the macports-dev mailing list