Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

php5-uuid on Mac OS X

140 views
Skip to first unread message

ruflin

unread,
Apr 17, 2010, 8:19:36 PM4/17/10
to pandra-user
I'm developing on Linux and Mac OS X. On Ubuntu it's easy to install
php5-uuid like Michael describes in the Pandra documentation. But does
anyone have an idea how to install it under Mac OS X?


--
Subscription settings: http://groups.google.com/group/pandra-user/subscribe?hl=en

mjpearson

unread,
Apr 17, 2010, 9:01:14 PM4/17/10
to pandra-user
I'm not completely sure how to do this nicely under OS X, but can add
support for the pecl uuid library. It was discussed in
http://github.com/mjpearson/Pandra/issues/closed#issue/29 but not
rolled out in 0.2. Happy to fast track it if you like (unless you
really want to use ossp).

.michael.

ruflin

unread,
Apr 18, 2010, 5:51:25 AM4/18/10
to pandra-user
Probably it would be nice to have the option with the pecl uuid
library. But at the moment I always receive errors if I try to compile
it under OS X. I was able to install ossd uuid, but that doesn't
really help.

What are the other options instead of using php5-uuid or the pecl
library?

Perhaps it would be a good idea that you provide an abstract UUID
class. So everyone can write its own UUID class without overwriting
your class.

On 18 Apr., 03:01, mjpearson <mjpear...@gmail.com> wrote:
> I'm not completely sure how to do this nicely under OS X, but can add
> support for the pecl uuid library.  It was discussed inhttp://github.com/mjpearson/Pandra/issues/closed#issue/29but not

mjpearson

unread,
Apr 18, 2010, 6:51:10 AM4/18/10
to pandra-user
I played with http://www.shapeshifter.se/2008/09/29/uuid-generator-for-php
initially and found a few bugs, but have solutions for that now and
can integrate it as a native php solution without external
dependencies. I can whip out an abstract with 3 packaged options
(ossp, pecl and shapeshifter) in the next day or so. I'll make a note
here once that's done, and you can give it another try. UUID's seem
fairly problematic for php.

-michael

ruflin

unread,
Apr 18, 2010, 7:27:39 AM4/18/10
to pandra-user
Sounds good. If I can help somehow, let me know.

I plan to modify your code (class names) that it fits into the Zend
Framework naming conventions if that's ok for you. I know, there is
already a Zend_Cassandra project: http://github.com/julesbravo/Zend_Cassandra
But I think your implementation is much more powerful.

On 18 Apr., 12:51, mjpearson <mjpear...@gmail.com> wrote:
> I played withhttp://www.shapeshifter.se/2008/09/29/uuid-generator-for-php

mjpearson

unread,
Apr 18, 2010, 9:08:50 AM4/18/10
to pandra-user
Renaming the classes is fine, the current autoloader is cringe-worthy
and happy to make it more namespace friendly for down the track. Fork
through github if you like and I'll merge back. The autoloader has
been moved into /lib/Loader.php fyi.

Thanks :)
.michael.

ruflin

unread,
Apr 18, 2010, 10:05:22 AM4/18/10
to pandra-user
I already started a fork. But it's the first time that I use git and
github (I'm still a svn user). So first I have to figure out how this
pull and push works.

mjpearson

unread,
Apr 19, 2010, 8:26:29 PM4/19/10
to pandra-user
Just wondering - are you using MAMP or a compiled php?

I was messing around with a snow leopard install @ work and got
something working using :

http://unrealexpectations.com/blog/2010/04/mamp-pecluuid-module-working-on-snow-leopard/

Could be worth a look?

ruflin

unread,
Apr 20, 2010, 3:26:57 AM4/20/10
to pandra-user
I'm working with the compiled version from MacPorts (PHP 5.3.2). I
will try if this patch also works for me.

Thanks

On 20 Apr., 02:26, mjpearson <mjpear...@gmail.com> wrote:
> Just wondering - are you using MAMP or a compiled php?
>
> I was messing around with a snow leopard install @ work and got
> something working using :
>
> http://unrealexpectations.com/blog/2010/04/mamp-pecluuid-module-worki...

ruflin

unread,
Apr 20, 2010, 5:10:20 PM4/20/10
to pandra-user
I'm having trouble to download the patch file. It seems like it's not
available anymore. Do you have it? Can you send it to me by e-mail?

mjpearson

unread,
Apr 20, 2010, 5:42:22 PM4/20/10
to pandra-user
That's a pain, what a difference a few days makes :S

Here's an alternate source if pastie doesn't come back up, but it will
need to be formatted : http://pecl.php.net/bugs/bug.php?id=14503

Otherwise I'll try and get back on the test mac and send the patch
through later.

Nicolas Ruflin

unread,
Apr 20, 2010, 6:15:39 PM4/20/10
to pandr...@googlegroups.com
Thanks for the file. It worked without any problems also with the macports php installation. Now I have to test Pandra :-)

pastie-435461.diff

ruflin

unread,
Apr 20, 2010, 6:50:51 PM4/20/10
to pandra-user
Seems like I still have to modify the UUID class. The basic Pandra
functions. I replaced the 4 const values by their value, because they
don't exist in pecl uuid. I also removed the reference calls, because
they are deprecated in PHP 5.3.

const UUID_FMT_STR = 1;
const UUID_FMT_BIN = 0;
const UUID_MAKE_V1 = 1;
const UUID_MAKE_V5 = 8;

But the function uuid_make() doesn't exist in pecl uuid. As soon as
the function _generate is called, the script fails.

The nicest solution would be to not have depencies at all. But I'm not
sure if that's possible.

On 21 Apr., 00:15, Nicolas Ruflin <ruf...@gmail.com> wrote:
> Thanks for the file. It worked without any problems also with the macports php installation. Now I have to test Pandra :-)
>
> --
> Xodoa.com
> Ruflin.com
>  text_html_part
> 20KAnzeigenHerunterladen
>
>  pastie-435461.diff
> 3KAnzeigenHerunterladen

mjpearson

unread,
Apr 20, 2010, 7:14:07 PM4/20/10
to pandra-user
That's right, it will need a little reworking, and a native option
without dependencies would be better packaged as default. I said a
few days ago about getting pecl/ossp/shapeshifter solutions out, but
have been hesitant to push because it's even more bloat. Hoping to
have a /contrib mechanism done soon, so the uuid and logging
implementations (sendmail, syslog, firephp etc) can just be installed
as needed.

mjpearson

unread,
May 11, 2010, 10:54:50 PM5/11/10
to pandra-user
Just a note that UUID has been rewritten as plugin based, with the
ossp module moved into pandra-contrib. Now bundles with shapeshifter
(UUIDZNative) only out of the box.

Nicolas Ruflin

unread,
May 17, 2010, 9:51:03 AM5/17/10
to pandr...@googlegroups.com
Thanks for the update. I'm pretty busy at the moment but I will try it out and give you some feedback in the next weeks.
Reply all
Reply to author
Forward
0 new messages