POG 1.6 BETA available

1 view
Skip to first unread message

Joel

unread,
Dec 20, 2005, 7:29:46 AM12/20/05
to Php Object Generator
Hi everyone,

the public beta is now available at
http://beta.phpobjectgenerator.com.

Hope you enjoy. Please provide some feedback if possible. We'd like to
hear from you.

For the list of new features included in this release, visit
http://groups.google.com/group/Php-Object-Generator/browse_frm/thread/c6549cd6f4089c2f


The Beta period should last for a couple of weeks, and the main site
will then be updated over the new year.

In the meantime, we'll make some tutorial videos that we'll put on the
main site next year.

Thanks again for everyone's support.


Post bugs, inconsistencies either here, or send us an email.

Aaron Vegh

unread,
Dec 20, 2005, 9:49:49 AM12/20/05
to Php-Object...@googlegroups.com
Woohoo!

Joel, this is very cool. I like this new directory structure and the
control interface for the database objects is neat. A great idea to
test the database objects. I had just started a new project, but it
was no problem to copy/paste the URLs from those objects and upgrade
to 1.6 beta (I hadn't done much coding yet).

But here's where things got funny. POG Setup liked my database
objects, but once in the "Manage Objects" tab, there was nothing
showing below the bar with Regenerate and Delete. There is no data
from the database, nor are there controls for creating new records. Am
I missing something? I tried in both Mac Safari and Camino (Moz).

Thanks!
Aaron.

Aaron Vegh

unread,
Dec 20, 2005, 10:04:38 AM12/20/05
to Php-Object...@googlegroups.com
Okay, I have a little more info after looking at the code...

In the file setup/index.php, the page displays right up to the
following code block, which renders the list of database names, and
the Regenerate/Delete options:

</ul>
</div></div><div class="toolbar"><a href="" target="_blank"><img
src="./setup_images/setup_regenerate.jpg" border="0"/></a><input
type='image' src='./setup_images/setup_deleteall.jpg' alt='delete all'
name='thrashall' value='thrashall'/></a></div><div class="middle3">

This is the last code generated on the page; from line 331 on, nothing
is rendered.

Hope that helps...

Aaron.

Joel

unread,
Dec 20, 2005, 10:21:52 AM12/20/05
to Php Object Generator
Hi Aaron.

glad you're testing it. ;)

find and comment out the line
ini_set("error_reporting", 0);

in index.php and let me know what error you get.

this must be occuring because of something related to the database
tables already existing...but i'm not sure.

Joel

Aaron Vegh

unread,
Dec 20, 2005, 10:27:36 AM12/20/05
to Php-Object...@googlegroups.com
Hi Joel,
Here you go:

Warning: main(../objects/class.clients.php.) [function.main]: failed
to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.clients.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Compliance.php.) [function.main]:
failed to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Compliance.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Compliance_Course.php.)
[function.main]: failed to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Compliance_Course.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Compliance_Docs.php.) [function.main]:
failed to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Compliance_Docs.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Compliance_Tests.php.) [function.main]:
failed to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Compliance_Tests.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Jurisdictions.php.) [function.main]:
failed to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Jurisdictions.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Users.php.) [function.main]: failed to
open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Users.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main(../objects/class.Users_Compliance.php.) [function.main]:
failed to open stream: No such file or directory in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309

Warning: main() [function.include]: Failed opening
'../objects/class.Users_Compliance.php.' for inclusion
(include_path='.:/usr/local/php5/lib/php') in
/Users/aaron/Sites/longbow/db/setup/index.php on line 309


Here is my directory listing, in case you're wondering what I've got here:

Odysseus:~/Sites/longbow/db/objects aaron$ ll
total 160
-rw-r--r-- 1 aaron aaron 5343 Dec 20 09:43 class.Compliance.php
-rw-r--r-- 1 aaron aaron 7939 Dec 20 09:38 class.Compliance_Course.php
-rw-r--r-- 1 aaron aaron 7700 Dec 20 09:43 class.Compliance_Docs.php
-rw-r--r-- 1 aaron aaron 13175 Dec 20 09:42 class.Compliance_Tests.php
-rw-r--r-- 1 aaron aaron 4655 Dec 20 09:44 class.Jurisdictions.php
-rw-r--r-- 1 aaron aaron 10438 Dec 20 09:45 class.Users.php
-rw-r--r-- 1 aaron aaron 7538 Dec 20 09:44 class.Users_Compliance.php
-rw-r--r-- 1 aaron aaron 5085 Jan 18 2038 class.clients.php
-rw-r--r-- 1 aaron aaron 2740 Jan 18 2038 class.database.php


Thanks,
Aaron.

On 12/20/05, Joel <joe...@gmail.com> wrote:
>

Joel

unread,
Dec 20, 2005, 10:47:45 AM12/20/05
to Php Object Generator
Hi Aaron,

what do you get as diagnostic results?

seems like a permission issue, but I can't really pinpoint what though.
I'm not too familiar with OSX, but I'll keep digging.

Joel

Aaron Vegh

unread,
Dec 20, 2005, 11:03:50 AM12/20/05
to Php-Object...@googlegroups.com
Hey Joel,
I'm green lights across the board:


TESTING Clients...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Clients....OK
-----
TESTING Compliance...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Compliance....OK
-----
TESTING Compliance_Course...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Compliance_Course....OK
-----
TESTING Compliance_Docs...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Compliance_Docs....OK
-----
TESTING Compliance_Tests...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Compliance_Tests....OK
-----
TESTING Jurisdictions...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Jurisdictions....OK
-----
TESTING Users...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
Users....OK
-----
TESTING User_Compliance...
Testing Save()....OK
Testing SaveNew()....OK
Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK
User_Compliance....OK
-----

FOUND & CHECKED 8 OBJECT(S)


as for permissions... just for laughs I gave all files chmod 777 and no effect.

When I looked a little closer at the code, I saw that at line 334,

$keys = array_keys($_POST);

when I try using print_r($_POST), I get no love. But when I do
print_r($_REQUEST), I see a value for objectName, which appears to be
passed as a GET, not a POST.

Not sure this is to do with anything, but that's as far as I got. Hope
this helps.
Cheers,
Aaron.

On 12/20/05, Joel <joe...@gmail.com> wrote:
>

Joel

unread,
Dec 20, 2005, 11:09:44 AM12/20/05
to Php Object Generator
got it.

find the line

include("../objects/{$filename}.");

change it to

include("../objects/{$filename}");

i.e remove the trailing dot after the curly brace.

let me know.

good find. that's a definite bug.

joel

Aaron Vegh

unread,
Dec 20, 2005, 11:17:14 AM12/20/05
to Php-Object...@googlegroups.com
That did it! Thanks Joel!

Aaron.

On 12/20/05, Joel <joe...@gmail.com> wrote:
>

Joel

unread,
Dec 20, 2005, 11:19:44 AM12/20/05
to Php Object Generator
Thank *you*.

I've applied a path to the beta site for now. should be good now.


Joel

Aaron Vegh

unread,
Dec 20, 2005, 11:30:19 AM12/20/05
to Php-Object...@googlegroups.com
For now....

I just ran my first query, a GetList that returned this:

Fatal error: Cannot use string offset as an array in
/Users/aaron/Sites/longbow/library/objects/class.Users.php on line 103

Methinks it is coming from this code block in my code:

$user = new Users();
$user -> GetList("email", "=", $email);

$email does in fact have a value, so I don't think that's the problem.

Thanks,
Aaron.


On 12/20/05, Joel <joe...@gmail.com> wrote:
>

Joel

unread,
Dec 20, 2005, 11:40:59 AM12/20/05
to Php Object Generator
Hi Aaron, hehe

sorry, haven't published the new interface yet (for the GetList)

the arguments now need to be passed through an associative array:

eg. GetList(array(array("email", "=", $email)));

to pass multiple conditions:

GetList(
array(
array("email", "=", $email),
array("field", "comparator", "value")
)
);

hope this helps. i think that's basically the only change to the
interface. i can't think right now.. brain is fried after coding all
night hehe. might have to take a day's break. ;)

bunny hero

unread,
Dec 20, 2005, 5:07:30 PM12/20/05
to Php-Object...@googlegroups.com
awesome! can't wait to play with it.

is the source code in SVN equivalent to the 1.6 beta? i often work on
my laptop with no internet access available. thanks!


On 12/20/05, Joel <joe...@gmail.com> wrote:
>

Joel

unread,
Dec 20, 2005, 5:10:49 PM12/20/05
to Php Object Generator
Hi,

Not yet. Should be checked in sometime this week though. Have some
cleanup to do first.

I'll post something here when svn is updated.

Joel

bunny hero

unread,
Dec 20, 2005, 5:24:07 PM12/20/05
to Php-Object...@googlegroups.com
np. thanks!!

tan...@yahoo.com

unread,
Dec 20, 2005, 8:14:13 PM12/20/05
to Php Object Generator
bunny hero wrote:
> np. thanks!!

Hmmm I seem to have errors in the GetList. This is when POG is doing
the verification. It seems to insert properly, as I have the test data
(encrypted) in the tables.

I am using POG/PDO SQLite PHP 5.1

TESTING Userdata...
Testing Save()....OK
Testing SaveNew()....OK
ERROR: GetList() could not be performed
</div>insert into userdata (fname,lname,loginname) values (?,?,?)

FOUND & CHECKED 1 OBJECT(S)

I will look into it when I get a chance.

Tan

tan...@yahoo.com

unread,
Dec 21, 2005, 1:44:30 AM12/21/05
to Php Object Generator
Ok, now that I got some free time...

Here is my test code...for SQLite--this may not be a problem in other
database versions.

<?php
require_once('class.userdata.php');
include_once("../configuration.php");
$db = new userdata();

$instanceList = $db->GetList(array(array("userdataid",">",0)),'
',false,5);
foreach ($instanceList as $row) {
echo $row->fname . "<br>";
}
?>


It was not returning the data array because the SQL it was generating
wasn't working proplerly.
You have to make a change to the class/source code as follows:

//$limit = ($limit == ' ' ? "LIMIT $limit " : ' ' );
$limit = ($limit != ' ' ? "LIMIT $limit " : ' ' );

The reason it errors is because at the end of the SQL statement, the
"LIMIT" statement is being placed without a Limit amount...so the SQL
errors.

If you notice...the original limit code is just slightly off. It should
actually be the opposite.
Hence if no limit value is passed, it should not attempt to place the
LIMIT statement.

For the testers...the GetList function actually takes an array of array
data as the first param...followed by the value to sort by, followed by
ascending = boolean, and lastly the LIMIT number. So 4 parameters like
:

GetList(array
(array("userdataid",">",0)),' ',false,5);

Hope this helps.

Tan

tan...@yahoo.com

unread,
Dec 21, 2005, 1:53:54 AM12/21/05
to Php Object Generator
Oh, I almost forgot to post the setup results after changing the code.

TESTING Userdata...
Testing Save()....OK
Testing SaveNew()....OK

Testing Get()....OK
Testing GetList()....OK
Testing Delete()....OK

Userdata....OK
-----

FOUND & CHECKED 1 OBJECT(S)

Tan

Joel

unread,
Dec 21, 2005, 2:40:15 AM12/21/05
to Php Object Generator
perfect.

applied your patch to beta.

thanks Tan.

this affected sqlite, odbc and pgsql drivers. these should be fixed
now.

i also fixed the "regenerate object" functionality which now pushes you
to the website with url as @link.

Joel

unread,
Dec 22, 2005, 11:34:54 AM12/22/05
to Php Object Generator
Hey Bunny,

1.6 Beta is now deemed stable enough and has now been checked into our
subversion
repository.http://www.phpobjectgenerator.com/plog/article/51/pog-source-code-locations.

Let me know if you have any issues with it.

Joel

bunny hero

unread,
Dec 26, 2005, 1:46:59 AM12/26/05
to Php-Object...@googlegroups.com
is this beta supposed to work with php4? because the php4 database
code and setup/index.php both use exceptions, which is not supported
by php4...

jason

unread,
Dec 28, 2005, 2:26:58 PM12/28/05
to Php Object Generator

I was about to ask the same question, because I encountered the same.
I found the diagnostics will still work in PHP4 if you change the throw
statements in database to die()s, e.g.,
> throw new Exception('cannot connect to the database. check configuration.');
to
> die('cannot connect to the database. check configuration.');
and comment out the
> try {
and
> } catch {
> //whatever
> }
in setup/index.php
...but I'm pretty certain this is an inelegant way to do things. (I'm
a novice.)

I'm also curious about SQL types that don't match the pulldown choices
of VARCHAR(255). Is there an easy way to make it so that you can
administer table/object fields that don't match the standard (e.g., my
object has an INT(6) and a VARCHAR(70)) ...without having to edit the
array and switch cases in setup/setup_library/setup_misc.php?

Thank you...POG is pretty nifty!

jason

Joel

unread,
Dec 30, 2005, 3:39:08 AM12/30/05
to Php Object Generator
Hi Jason, Bunny,

you're right, the setup wasn't working correctly with PHP 4. I fixed
this issue, updated http://beta.phpobjectgenerator.com and
http://subversion.phpobjectgenerator.com/svn/repository/pog/, so it
should work now. let me know how it goes.

Note:
For those that are generating objects locally (i.e you downloaded the
source from SVN), you'll notice some cool improvements to the code
there. (I'll create another thread to announce the changes, but here's
an overview:)

- cleaned the directory structure so it's easily understandable and
mirrors the generated objects.
- improved the generation process so that you no longer need "write"
permissions on some of the folders.

Hope this helps.

Joel

unread,
Dec 30, 2005, 6:56:22 AM12/30/05
to Php Object Generator
>I'm also curious about SQL types that don't match the pulldown choices
>of VARCHAR(255). Is there an easy way to make it so that you can
>administer table/object fields that don't match the standard (e.g., my
>object has an INT(6) and a VARCHAR(70)) ...without having to edit the
>array and switch cases in setup/setup_library/setup_misc.php?

Hi Jason,

i've relaxed ConvertAttributeToHtml() a bit so that VARCHAR(xxx),
INT(xxx) etc are still recognized as varchar and int respectively and
they are converted to input fields by default. Hope this helps.
Download the latest setup files to see the changes.

Thanks for the feedback.

Joel

Reply all
Reply to author
Forward
0 new messages