Help with POG setup

11 views
Skip to first unread message

jaminto

unread,
Nov 26, 2008, 1:41:22 AM11/26/08
to Php Object Generator
Hello everyone.
I'm trying to get an awesome open source project up and running on my
own server.
It's called Clipperz and it's an online password management solution
that you can host yourself.
Check it out: http://www.clipperz.com/open_source/clipperz_community_edition

The only bad thing about it is that it doesn't work.
It's a php code base that uses POG for the database interaction.
That's why I'm posting here ;).
For whatever reason, the project admins are unable to resolve the
issues with the POG setup.

For the most part, the POG objects are pretty simple. There are a
couple of parent child relations.
The problem is some of the basic unit tests fail.

I've spent a significant amount of time messing with this code and
regenerating objects, but my limited experience with PHP hasn't gotten
me very far.

Any help would be greatly appreciated.

These are the objects that seem to be causing at least the first
issue:
http://preview.tinyurl.com/5vxpka
http://preview.tinyurl.com/5lfoh9
http://preview.tinyurl.com/5q9d6x

If someone is feeling particularly helpful, here is a zip containing
all of the php code needed to run the POG initialization and tests.
http://preview.tinyurl.com/6zyrsb

Anyone who could make this work would surely receive great kudos on
the Clipperz site.
Thanks!

Crispy

unread,
Nov 26, 2008, 4:57:31 PM11/26/08
to Php Object Generator
I'm not seeing anything glaring in the setup code & config,
before I look deeper, could you describe what fails?
What error messages do you get?

-Mark

On Nov 25, 10:41 pm, jaminto <jason.ami...@gmail.com> wrote:
> Hello everyone.
> I'm trying to get an awesome open source project up and running on my
> own server.
> It's called Clipperz and it's an online password management solution
> that you can host yourself.
> Check it out:http://www.clipperz.com/open_source/clipperz_community_edition
>
> The only bad thing about it is that it doesn't work.
> It's a php code base that uses POG for the database interaction.
> That's why I'm posting here ;).
> For whatever reason, the project admins are unable to resolve the
> issues with the POG setup.
>
> For the most part, the POG objects are pretty simple.  There are a
> couple of parent child relations.
> The problem is some of the basic unit tests fail.
>
> I've spent a significant amount of time messing with this code and
> regenerating objects, but my limited experience with PHP hasn't gotten
> me very far.
>
> Any help would be greatly appreciated.
>
> These are the objects that seem to be causing at least the first
> issue:http://preview.tinyurl.com/5vxpkahttp://preview.tinyurl.com/5lfoh9http://preview.tinyurl.com/5q9d6x
>
> If someone is feeling particularly helpful, here is a zip containing
> all of the php code needed to run the POG initialization and tests.http://preview.tinyurl.com/6zyrsb

jaminto

unread,
Nov 26, 2008, 5:54:55 PM11/26/08
to Php Object Generator
Thanks for th quick reply. If you're running the pog setup, the test
of onetimepassword save method fails among others

There is a thread that I posted over on the clipperz google group that
has specific details about the error and the software versions that
I'm using. I'm not at my computer so I can't get you a link.

Actually one of the project admins did respond to my posting but does
not yet have a solution. Though he said he would look into it. He
did point out that my php mysql client and mysql server versions do
not match - off by a few minor revs. Could that be a problem?

I don't want to waste your time if someone else is looking into it,
but if you're curious please dig in!

Thanks

Crispy

unread,
Nov 26, 2008, 6:23:32 PM11/26/08
to Php Object Generator
I see

I think the problem is the mysql settings on your server.

check out this:
http://groups.google.com/group/Php-Object-Generator/browse_thread/thread/80977b3d1468cb4d/

Hopefully that fixes the problem you're seeing

-Mark

jaminto

unread,
Nov 30, 2008, 1:18:25 AM11/30/08
to Php Object Generator
Thanks Mark. That did look promising, but...it didn't fix the issue.

looking at the errors printed during pog set up, it looks like the SQL
statement fails because it tries to insert an empty value for userid
in the onetimepassword table. this userid field refers to the user
table. there's no user class being created and saved before the save
is called on the onetimepassword object (which requires a user
reference).

are the POG tests expected to create all dependent objects
automatically before testing the parent object methods? i'm assuming
the index.php page (with the "POG me up!" button) was created by POG
and not the Clipperz developers - is that true?

i'm assuming this boils down to simple parent-child relationships with
the POG setup so that's why i'm sticking with this forum. if someone
feels this is all related to some Clipperz custom code, then i'll back
off and push on them more.

Thanks again for all the help so far.

Crispy

unread,
Nov 30, 2008, 1:56:37 PM11/30/08
to Php Object Generator
Hi Jaminto,

yes - it is inserting an empty value for the id. Since the id should
be an auto-incrementing value in mysql, it should be given a new ID by
the database at that point (specifically when it doesn't receive one).
This problem is related to the strict setting on mysql, where empty
quotes aren't allowed for integers. By removing this requirement
(strict setting), the tests should pass.

You might want to look for a different my.ini on your system as maybe
the one you modified wasn't the one being used. Also, did you restart
you machine after changing the my.ini, to ensure it was read and used?
(looking for the simple explanation).

-Mark

jaminto

unread,
Nov 30, 2008, 5:22:09 PM11/30/08
to Php Object Generator
you are right. the strict setting was the issue.

apparently it was the User Account Control (UAC) that was screwing me
on my Vista machine. even though i was making the change to the
correct my.ini file (in the mysql folder in program files), Vista was
doing something shady with the shadow copy of the file and even after
windows restarts, the original file with the strict setting was
restored.

i tested that my changes were sticking by going to the sql command
prompt and running:
select @@GLOBAL.sql_mode;

i ended up just disabling UAC and now things are working fine after i
set the sql-mode="" in my.ini.
if someone really wants to keep UAC running, here is a more
complicated solution:
http://remy.supertext.ch/2007/11/changing-the-mysql-myini-file-in-windows-vista/

thanks for the all the help mark.

Crispy

unread,
Dec 2, 2008, 12:06:02 AM12/2/08
to Php Object Generator
awesome! - I'm glad you persisted as I was completely uncertain with
what it could be after that.

It just shows me how these forums are a great place to solve odd
problems.

some key terms:
vista - mysql - strict mode

;-)

On Nov 30, 2:22 pm, jaminto <jason.ami...@gmail.com> wrote:
> you are right.  the strict setting was the issue.
>
> apparently it was the User Account Control (UAC) that was screwing me
> on my Vista machine.  even though i was making the change to the
> correct my.ini file (in the mysql folder in program files), Vista was
> doing something shady with the shadow copy of the file and even after
> windows restarts, the original file with the strict setting was
> restored.
>
> i tested that my changes were sticking by going to the sql command
> prompt and running:
> select @@GLOBAL.sql_mode;
>
> i ended up just disabling UAC and now things are working fine after i
> set the sql-mode="" in my.ini.
> if someone really wants to keep UAC running, here is a more
> complicated solution:http://remy.supertext.ch/2007/11/changing-the-mysql-myini-file-in-win...
Reply all
Reply to author
Forward
0 new messages