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.
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.
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.
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
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:
>
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
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:
>
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
I've applied a path to the beta site for now. should be good now.
Joel
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:
>
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. ;)
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:
>
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
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
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
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
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.
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
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
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.
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