Hello, is this group still allive?

57 views
Skip to first unread message

SwissalpS

unread,
Dec 3, 2009, 9:53:50 AM12/3/09
to phocoa users
Hi all,
I'm subscribed to this group for quite a while now. Seems more
Spammers than active members are here.
PHOCOA does interest me, I do have questions and once I have it
running, I would also be interested in contributing to the project.

Would like to know if anyone out there is currently using PHOCOA and
could help me get started.

I have been using php for years, cocoa for some time, mainly as
rubyCocoa.
Mainly I used mySQL. Am having trouble getting the database side of
phocoa to work.

Alan Pinstein

unread,
Dec 3, 2009, 10:14:41 AM12/3/09
to phocoa...@googlegroups.com
Hi-

Yes, this group is still alive!

I am trying to reduce the spam, in fact I thought I blocked all the
spammers and made new users moderated, but they are still coming
through... I need to take another look.

The project is still quite alive as well. There has been a ton of work
on it the last couple of years. And in fact just yesterday I completed
the internal switch from svn to git, so now the "true" project is
hosted at GitHub, ready for your forking!

How can I help?

Alan
> --
>
> You received this message because you are subscribed to the Google
> Groups "phocoa users" group.
> To post to this group, send email to phocoa...@googlegroups.com.
> To unsubscribe from this group, send email to phocoa-users...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/phocoa-users?hl=en
> .
>
>

SwissalpS

unread,
Dec 4, 2009, 10:00:48 AM12/4/09
to phocoa users
great!

Yes the spammers tend to sneak in. from time to time.
I've repeatedly reported certain posts as spam myself...they are still
showing up.

Now that I know that this group is alive, I will create a new virtual
machine with the specs
you recommend phocoa to work best on.

As far as I remember, you encourage the use of postgreSQL.
And debian? I hope the linux distro doesn't matter as much.

I searched gethub for "phocoa" -> no results, "php framework" also no
results.

I'd apreaciate a link to the newest source tree.

Thank you.

SwissalpS

unread,
Dec 4, 2009, 11:13:37 AM12/4/09
to phocoa users
ok found it on github thanks to external search engines
http://github.com/apinstein/phocoa

Alan Pinstein

unread,
Dec 4, 2009, 6:19:06 PM12/4/09
to phocoa...@googlegroups.com
> Now that I know that this group is alive, I will create a new virtual
> machine with the specs
> you recommend phocoa to work best on.

I don't know when I last updated the specs; I run it on php 5.2.6 and
5.2.11; the latest 5.2.x is your best bet. I haven't tried with it
much on 5.3 yet.

> As far as I remember, you encourage the use of postgreSQL.
> And debian? I hope the linux distro doesn't matter as much.

Distro shouldn't matter at all -- I use it on Mac OS X and Centos.

> I searched gethub for "phocoa" -> no results, "php framework" also no
> results.
>
> I'd apreaciate a link to the newest source tree.

http://www.phocoa.com/webapp/public/pages/source

Man I should add a link to the GitHub page on the Downloads page!

BTW - I am working on a bunch of Rake/Capistrano tasks for managing
deployment. Sadly there's nothing quite equivalent on PHP yet. pake is
undocumented and phing is xml hell.

Enjoy,

Alan

SwissalpS

unread,
Dec 4, 2009, 8:43:42 PM12/4/09
to phocoa users
> .... and phing is xml hell.
glad I'm not alone thinking that way...

I've got a debian virtual box running with the newest postgres, mySQL,
apache, php, pear (with all modules sugested in the installation
manual), phing, smarty, propel (1.3 I guess as I followed the manual
line by line) and phpDocumentor.

phing, propel, smarty, pear are all in /usr/share/php/

Following the instructions in the Appendix I subclassed propel/om/
BaseObject.php and propel/util/BasePeer.php also.

The third step mentioned in the Appendix leaves me puzzled. find / -
name "schema.xml" doesn't bring up anything.

Q1: I'm wondering where I'm supposed to apply 'basePeer="BasePeer "'
to a tag.


******************** and some bla cause I'm so excited
********************************
ignoring that for the moment, I continued and set an alias for phocoa
and made my dev-dir in /home/luke/phocoa_projects
changed to that directory and ran phocoa newProject
named it "test1", chose httpd method and skipped propel (as I haven't
done the basePeer mod yet)
next I tried `phocoa httpdconf` which failed somewhere in /usr/share/
php/phocoa/phing/build.xml
well I did realize I had to be in ~/phocoa_projects/test1/test1 for
phocoa to feel 'at home'
But nevertheless the incedent made me trace down phing and it's
xml...oh boy! The author must be some
genius who can hold a whole lot of structure in his brain or
something...


so far, so good.
Just the Q1 above would help me feel better over the weekend :-)

I'm really excited to get PHOCOA framework finally running. I've been
dreaming of this ever since I
got the basics of cocoa. The speed and flexibility I saw there,
changed my way of programming PHP and other languages. I also finally
understood AppleScript's behaviour.

Alan Pinstein

unread,
Dec 4, 2009, 9:13:27 PM12/4/09
to phocoa...@googlegroups.com
>> .... and phing is xml hell.
> glad I'm not alone thinking that way...

:)

There is a big difference between "human readable" and "easy to read"!

> I've got a debian virtual box running with the newest postgres, mySQL,
> apache, php, pear (with all modules sugested in the installation
> manual), phing, smarty, propel (1.3 I guess as I followed the manual
> line by line) and phpDocumentor.

Should be fine. I did forget to mention that mysql vs postgres
shouldn't matter; propel works fine with both.

> phing, propel, smarty, pear are all in /usr/share/php/
>
> Following the instructions in the Appendix I subclassed propel/om/
> BaseObject.php and propel/util/BasePeer.php also.
>
> The third step mentioned in the Appendix leaves me puzzled. find / -
> name "schema.xml" doesn't bring up anything.

This is more of a propel question, but essentially schema.xml won't
exist until you reverse engineer your DB, which is why you aren't
finding that file...

>
> Q1: I'm wondering where I'm supposed to apply 'basePeer="BasePeer "'
> to a tag.

It'll make sense once you rev-eng your db. You should add propel
support first... I think you can do it after the fact. I haven't done
a from-scratch project in a long time...

I also have a lot of infrastructure on top of this stuff that I
haven't yet added into phocoa. For instance I use rake to do all of
this for me. I also use some corollary projects of mine (MP migrations
for PHP) to actually run the DDL code...

Propel has somewhat of a limitation in that schema.xml is generated
from the DB, but you need to edit it in many cases (not only for
phocoa hacking). Thus for my apps I have a small propel-build/fix-
schema.php script that I run to munge the generated schema.xml file to
"fix" everything that's needed.

I've just created a contrib/ directory and pushed up a sample Rakefile
and fix-schema.php (already used by the Rakefile) that should really
help out.

Install ruby/rake and put fix-schema.php in propel-build/ and the
Rakefile in your project dir and that should really get you up and
running quickly.

Alan

>
>
> ******************** and some bla cause I'm so excited
> ********************************
> ignoring that for the moment, I continued and set an alias for phocoa
> and made my dev-dir in /home/luke/phocoa_projects
> changed to that directory and ran phocoa newProject
> named it "test1", chose httpd method and skipped propel (as I haven't
> done the basePeer mod yet)
> next I tried `phocoa httpdconf` which failed somewhere in /usr/share/
> php/phocoa/phing/build.xml
> well I did realize I had to be in ~/phocoa_projects/test1/test1 for
> phocoa to feel 'at home'
> But nevertheless the incedent made me trace down phing and it's
> xml...oh boy! The author must be some
> genius who can hold a whole lot of structure in his brain or
> something...
>
>
> so far, so good.
> Just the Q1 above would help me feel better over the weekend :-)
>
> I'm really excited to get PHOCOA framework finally running. I've been
> dreaming of this ever since I
> got the basics of cocoa. The speed and flexibility I saw there,
> changed my way of programming PHP and other languages. I also finally
> understood AppleScript's behaviour.
>

SwissalpS

unread,
Dec 5, 2009, 7:19:37 AM12/5/09
to phocoa users
thanks Alan.

I'm going to be calm this weekend :-D

> I also have a lot of infrastructure on top of this stuff that I  
> haven't yet added into phocoa. For instance I use rake to do all of  
> this for me. I also use some corollary projects of mine (MP migrations  
> for PHP) to actually run the DDL code...

I'm hoping puppet is going to solve the deployment for me.
Haven't looked deeply into it yet, have only listened to an interview
with
one of the developers. It sounded like it will scale well.
http://reductivelabs.com/trac/puppet/

> I've just created a contrib/ directory and pushed up a sample Rakefile  
> and fix-schema.php (already used by the Rakefile) that should really  
> help out.
>
> Install ruby/rake and put fix-schema.php in propel-build/ and the  
> Rakefile in your project dir and that should really get you up and  
> running quickly.

thanks a million, I'll be continuing on Monday.

I prefer ruby over almost any xml :-) I like plist a lot, it's reduced
to the basics and when used with descriptive keys, I don't even miss
the comments.

Alan Pinstein

unread,
Dec 5, 2009, 9:07:30 AM12/5/09
to phocoa...@googlegroups.com
> I'm hoping puppet is going to solve the deployment for me.
> Haven't looked deeply into it yet, have only listened to an interview
> with
> one of the developers. It sounded like it will scale well.
> http://reductivelabs.com/trac/puppet/

All of the "cool kids" I know around here are favoring Chef over
Puppet. I am interested in a solution using Chef (or Puppet) as well,
I just haven't yet had time to try it.

I am just using Cap atm because a contractor already knew how to use
it. My cap scripts are tiny (200 loc) so they'd be easy to convert to
something else.

>> I've just created a contrib/ directory and pushed up a sample
>> Rakefile
>> and fix-schema.php (already used by the Rakefile) that should really
>> help out.
>>
>> Install ruby/rake and put fix-schema.php in propel-build/ and the
>> Rakefile in your project dir and that should really get you up and
>> running quickly.
>
> thanks a million, I'll be continuing on Monday.
>
> I prefer ruby over almost any xml :-) I like plist a lot, it's reduced
> to the basics and when used with descriptive keys, I don't even miss
> the comments.

Like the apple plist xml format? Is that what you mean?

Alan

SwissalpS

unread,
Dec 5, 2009, 10:59:27 AM12/5/09
to phocoa users

> All of the "cool kids" I know around here are favoring Chef over  
> Puppet. I am interested in a solution using Chef (or Puppet) as well,  
> I just haven't yet had time to try it.
>

> > I prefer ruby over almost any xml :-) I like plist a lot, it's reduced
> > to the basics and when used with descriptive keys, I don't even miss
> > the comments.
>
> Like the apple plist xml format? Is that what you mean?
>
> Alan

Yes Apple's plist. I don't think it would come in handy here, where we
need some level of dynamic-ness. Ruby/rake is a good choice imho.

I've used plist as a db for tiny stuff like 2 person private chats,
small persistent objects (such as lockers, holding scrambled password
info).
Mainly to drive AppleScript's (so inexperienced users can modify the
text outputs in 'menus' and to adjust values the AppleScript uses e.g.
sleep times) I give my clients the property list editor along with the
AppleScripts and they feel comfortable modifying the applets that way.
It doesn't scale very well :-) My rule of thumb: if it can't be
printed an one page as plist -> look for another method or we're on
the road to hell again.
For data that doesn't need to be edited 'by hand' I tolerate around
250 entries, after that the overhead shows and binary options are more
suitable.

I'll be back on Phocoa topic Monday :-)

Luke

Alan Pinstein

unread,
Dec 5, 2009, 12:07:45 PM12/5/09
to phocoa...@googlegroups.com
Ah ok, interesting!

Alan

SwissalpS

unread,
Dec 7, 2009, 8:52:06 PM12/7/09
to phocoa users
now I'm at the point where I got stuck each time I tried....

I populated mySQL database with some data from a site I'm running and
tested that it was running and working.

then I began a new project, this time saying, yes, add propel.
here's the output with line numbers to ease reference:

1: luke@debian2:~/phocoa_projects$ phocoa newProject
2: phing -f /usr/share/php/phocoa/phing/build.xml -
Dusing.phocoa.make=true -Dphocoa.pwd=/home/luke/phocoa_projects -
Dphocoa.dir=/usr/share/php/phocoa -Dphocoa.project.name= -
Dphocoa.project.dir= newProject
3: Buildfile: /usr/share/php/phocoa/phing/build.xml
4:
5: phocoa > prepareGeneral:
6:
7: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
8:
9: phocoa > newProject:
10:
11: Enter the name of the new project: [] test2
12: [echo] The container directory for your PHOCOA project will
be used to place the log, runtime, and project directories. Please be
careful!
13: Enter the path to the project container directory: [/home/luke/
phocoa_projects/test2]
14: [realpathexpandhome] Resolved /home/luke/phocoa_projects/test2
to /home/luke/phocoa_projects/test2
15: Enter the name of the server (ie dns name) that will host this
application: [localhost]
16: Enter the IP of the server that will host this application:
[127.0.0.1]
17: Enter the PORT of the server that will host this application:
[80] 8080
18: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'setupProjectContainer'
19:
20: phocoa > setupProjectContainer:
21:
22: [echo] Creating project container directories and setting
up permissions
23: [mkdir] Created dir: /home/luke/phocoa_projects/test2/log
24: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test2/log' to 777
25: [mkdir] Created dir: /home/luke/phocoa_projects/test2/
runtime
26: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test2/runtime' to 777
27: [mkdir] Created dir: /home/luke/phocoa_projects/test2/
runtime/smarty/templates_c
28: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test2/runtime/smarty/templates_c' to 777
29: [echo] Creating project directory: /home/luke/
phocoa_projects/test2/test2
30: [mkdir] Created dir: /home/luke/phocoa_projects/test2/test2
31: [echo] Copying PHOCOA templates...
32: [copy] Copying 14 files to /home/luke/phocoa_projects/test2/
test2
33: [mkdir] Created dir: /home/luke/phocoa_projects/test2/test2/
wwwroot/www
34: [mkdir] Created dir: /home/luke/phocoa_projects/test2/test2/
modules
35: [echo] Setting up configuration files...
36: [copy] Copying 3 files to /home/luke/phocoa_projects/test2/
test2
37: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
38: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test2"
39: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test2"
40: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
41: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test2"
42: [filter:ReplaceTokens] Replaced "##SERVER_IP##" with "127.0.0.1"
43: [filter:ReplaceTokens] Replaced "##SERVER_PORT##" with "8080"
44: [filter:ReplaceTokens] Replaced "##SERVER_NAME##" with
"localhost"
45: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
46: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
47: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
48: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
49: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
50: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
51: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test2"
52: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test2"
53: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
54: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test2/test2"
55: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
56: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'httpdconf'
57:
58: phocoa > prepareGeneral:
59:
60: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
61:
62: phocoa > prepareProject:
63:
64: [echo] 1
65: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
66: [echo] Using PHP: /usr/bin/php
67: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test2/test2
68: [resolvepath] Resolved /home/luke/phocoa_projects/test2/test2/..
to /home/luke/phocoa_projects/test2
69: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test2
70: [property] Loading /home/luke/phocoa_projects/test2/test2/conf/
build.properties
71: [property] Unable to find property file: /home/luke/
phocoa_projects/test2/test2/conf/build.properties... skipped
72:
73: phocoa > httpdconf:
74:
75: [echo] PHOCOA requires some httpd configurations to work
its magic. You must either be able to edit httpd.conf, or have an
apache with mod_rewrite enabled.
76: Select httpd configuration mode: 1=httpd.conf, 2=.htaccess [1] 1
77: [echo] Make sure your httpd.conf file contains the line:
Include /home/luke/phocoa_projects/test2/test2/test2/conf/httpd.conf
78: Will this project use database access via Propel?(yes/no) [1]
yes
79: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'addpropel'
80:
81: phocoa > prepareGeneral:
82:
83: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
84:
85: phocoa > prepareProject:
86:
87: [echo] 1
88: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
89: [echo] Using PHP: /usr/bin/php
90: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test2/test2
91: [resolvepath] Resolved /home/luke/phocoa_projects/test2/test2/..
to /home/luke/phocoa_projects/test2
92: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test2
93: [property] Loading /home/luke/phocoa_projects/test2/test2/conf/
build.properties
94: [property] Unable to find property file: /home/luke/
phocoa_projects/test2/test2/conf/build.properties... skipped
95:
96: phocoa > addpropel:
97:
98: [echo] NOTE: this task is only tested with Propel 1.3. If
you have problems, please report them.
99: [echo] Setting up PHOCOA project for Propel in dir: /home/
luke/phocoa_projects/test2/test2/propel-build
100: Select the path for executable: propel-gen: /usr/bin/propel-gen
101: [selectExecutable] Using propel-gen at /usr/bin/propel-gen
102: [mkdir] Created dir: /home/luke/phocoa_projects/test2/test2/
propel-build
103: Enter the database type:(pgsql,mysql,mssql,sqllite,ldap) mysql
104: Enter the database name: phocoa_lukeZcom
105: Enter the database username: phocoa
106: Enter the database password: phocoa
107: Enter the database host: [localhost]
108: [writeconffile] Writing conf file: /home/luke/phocoa_projects/
test2/test2/propel-build/build.properties.
109: [echo] Building Propel... setup conf file, reverse engineer
database, build db classes.
110: [copy] Copying 1 file to /home/luke/phocoa_projects/test2/
test2/propel-build
111: [filter:ReplaceTokens] Replaced "##LOG_DIR##" with "/home/luke/
phocoa_projects/test2/log"
112: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test2"
113: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
114: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
115: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
116: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
117: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
118: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
119: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
120: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
121: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
122: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
123: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
124: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
125: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
126: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
127: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test2/test2/propel-build convert-conf 2>&1
128: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
129: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test2/test2/propel-build to /home/luke/phocoa_projects/test2/test2/
propel-build
130: [exec]
131: [exec] propel-project-builder > projdircheckExists:
132: [exec]
133: [exec]
134: [exec] propel-project-builder > projdircheck:
135: [exec]
136: [exec]
137: [exec] propel-project-builder > configure:
138: [exec]
139: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test2/test2/propel-build/build.properties
140: [exec] [property] Loading /home/luke/phocoa_projects/test2/
test2/propel-build/build.properties
141: [exec]
142: [exec] propel-project-builder > convert-conf:
143: [exec]
144: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'convert-conf'
145: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
146: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
147: [exec]
148: [exec] propel > convert-conf:
149: [exec]
150: [exec] [echo]
+------------------------------------------+
151: [exec] [echo]
| |
152: [exec] [echo] | Converting runtime config file to
an |
153: [exec] [echo] | array dump for improved
performance. |
154: [exec] [echo]
| |
155: [exec] [echo]
+------------------------------------------+
156: [exec] [echo] Output file: test2-conf.php
157: [exec] [echo] XMLFile: /home/luke/phocoa_projects/
test2/test2/propel-build/runtime-conf.xml
158: [exec] Execution of target "convert-conf" failed for the
following reason: /usr/share/php/data/propel_generator/build-
propel.xml:507:20: No schema files were found (matching your schema
fileset definition).
159: [exec] [phing] /usr/share/php/data/propel_generator/
build-propel.xml:507:20: No schema files were found (matching your
schema fileset definition).
160: [exec]
161: [exec] BUILD FINISHED
162: [exec]
163: [exec] Total time: 0.3373 seconds
164: [exec]
165: [echo] Propel general setup complete.
166: [echo] To complete propel integration, complete the
following manual tasks:
167: [echo] 1. Make sure that propel is available in your
include_path. If not, edit webapp.conf and munge include_path.
168: [echo] 2. Edit Propel's om/BaseObject.php BaseObject
declaration to this: 'abstract class BaseObject extends WFObject'.
169: [echo] 3. Edit Propel's util/BasePeer.php BasePeer
declaration to this: 'class BasePeer extends WFObject'.
170: If your database already exists, we can generate a PHP interface
to your database objects. Does your database already exist?(yes/no) []
yes
171: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test2/test2/propel-build creole 2>&1
172: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
173: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test2/test2/propel-build to /home/luke/phocoa_projects/test2/test2/
propel-build
174: [exec]
175: [exec] propel-project-builder > projdircheckExists:
176: [exec]
177: [exec]
178: [exec] propel-project-builder > projdircheck:
179: [exec]
180: [exec]
181: [exec] propel-project-builder > configure:
182: [exec]
183: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test2/test2/propel-build/build.properties
184: [exec] [property] Loading /home/luke/phocoa_projects/test2/
test2/propel-build/build.properties
185: [exec]
186: [exec] propel-project-builder > creole:
187: [exec]
188: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'creole'
189: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
190: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
191: [exec]
192: [exec] propel > creole:
193: [exec]
194: [exec] [echo]
+-----------------------------------------------+
195: [exec] [echo]
| |
196: [exec] [echo] | Generating XML from Creole
connection ! |
197: [exec] [echo]
| |
198: [exec] [echo]
+-----------------------------------------------+
199: [exec] [PHP Error] PropelCreoleTransformTask::include_once
(creole/Creole.php): failed to open stream: No such file or directory
[line 267 of /usr/share/php/propel/phing/
PropelCreoleTransformTask.php]
200: [exec] [PHP Error] PropelCreoleTransformTask::include_once
(): Failed opening 'creole/Creole.php' for inclusion (include_path='/
usr/share/php/data/propel_generator/classes:.:/usr/share/php:/usr/
share/php/Smarty-2.6.26:/usr/share/php/SssS:/usr/share/pear') [line
267 of /usr/share/php/propel/phing/PropelCreoleTransformTask.php]
201: [exec] Execution of target "creole" failed for the
following reason: /usr/share/php/data/propel_generator/build-
propel.xml:298:1: PropelCreoleTransformTask task depends on Creole
classes being on include_path. (i.e. include of 'creole/Creole.php'
failed.)
202: [exec] [phing] /usr/share/php/data/propel_generator/
build-propel.xml:298:1: PropelCreoleTransformTask task depends on
Creole classes being on include_path. (i.e. include of 'creole/
Creole.php' failed.)
203: [exec]
204: [exec] BUILD FINISHED
205: [exec]
206: [exec] Total time: 0.2964 seconds
207: [exec]
208: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test2/test2/propel-build main 2>&1
209: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
210: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test2/test2/propel-build to /home/luke/phocoa_projects/test2/test2/
propel-build
211: [exec]
212: [exec] propel-project-builder > projdircheckExists:
213: [exec]
214: [exec]
215: [exec] propel-project-builder > projdircheck:
216: [exec]
217: [exec]
218: [exec] propel-project-builder > configure:
219: [exec]
220: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test2/test2/propel-build/build.properties
221: [exec] [property] Loading /home/luke/phocoa_projects/test2/
test2/propel-build/build.properties
222: [exec]
223: [exec] propel-project-builder > main:
224: [exec]
225: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'main'
226: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
227: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
228: [exec]
229: [exec] propel > mysqli-check:
230: [exec]
231: [exec]
232: [exec] propel > main:
233: [exec]
234: [exec] [phingcall] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'sql'
235: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
236: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
237: [exec]
238: [exec] propel > check-run-only-on-schema-change:
239: [exec]
240: [exec]
241: [exec] propel > sql-check:
242: [exec]
243: [exec]
244: [exec] propel > pgsql-quoting-check:
245: [exec]
246: [exec]
247: [exec] propel > mysqli-check:
248: [exec]
249: [exec]
250: [exec] propel > sql:
251: [exec]
252: [exec] [echo]
+------------------------------------------+
253: [exec] [echo]
| |
254: [exec] [echo] | Generating SQL for YOUR Propel
project! |
255: [exec] [echo]
| |
256: [exec] [echo]
+------------------------------------------+
257: [exec] [phingcall] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'sql-template'
258: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
259: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
260: [exec]
261: [exec] propel > sql-template:
262: [exec]
263: [exec] Execution of target "sql-template" failed for the
following reason: /usr/share/php/data/propel_generator/build-
propel.xml:196:10: No schema files were found (matching your schema
fileset definition).
264: [exec] [phingcall] /usr/share/php/data/propel_generator/
build-propel.xml:196:10: No schema files were found (matching your
schema fileset definition).
265: [exec] Execution of target "sql" failed for the following
reason: /usr/share/php/data/propel_generator/build-propel.xml:181:22:
Execution of the target buildfile failed. Aborting.
266: [exec] [phingcall] /usr/share/php/data/propel_generator/
build-propel.xml:181:22: Execution of the target buildfile failed.
Aborting.
267: [exec] Execution of target "main" failed for the following
reason: /usr/share/php/data/propel_generator/build-propel.xml:91:22:
Execution of the target buildfile failed. Aborting.
268: [exec] [phing] /usr/share/php/data/propel_generator/
build-propel.xml:91:22: Execution of the target buildfile failed.
Aborting.
269: [exec]
270: [exec] BUILD FINISHED
271: [exec]
272: [exec] Total time: 0.4104 seconds
273: [exec]
274: [echo] Propel code generation complete.
275: [echo] Activating propel in application delegate...
276: [reflexive] Applying reflexive processing to 1 files.
277: [echo] Done adding Propel support.
278: [echo] New Project setup complete.
279:
280: BUILD FINISHED
281:
282: Total time: 24 minutes 55.86 seconds

It all looks OK until line 94 and especially line 158
As phocoa didn't die, I ignored the error and replied 'yes' on line
170

the rest reveals that the propel or phing installation package doesn't
seem to
resolve and install it's dependencies correctly. (creole missing,
there is a folder in phing /usr/share/php/phing/tasks/ext/creole but
that's just the tasks)

Is this where I have to run a modified version of fix-schema.php?
I still don't have any schema.xml so I'm guessing not, that mysql
isn't suported.

I'm not sure if I should ask this here as it seems to hang on
propel...but without propel phocoa's true power can't unfold. Am I
wrong?

Alan Pinstein

unread,
Dec 8, 2009, 11:43:19 AM12/8/09
to phocoa...@googlegroups.com
> 94: [property] Unable to find property file: /home/luke/
> phocoa_projects/test2/test2/conf/build.properties... skipped

It's OK that this was skipped; it's an optional properties file for
phing. I agree that the warning is scary, it's confused me before as
well...

> 199: [exec] [PHP Error] PropelCreoleTransformTask::include_once
> (creole/Creole.php): failed to open stream: No such file or directory
> [line 267 of /usr/share/php/propel/phing/
> PropelCreoleTransformTask.php]
> 200: [exec] [PHP Error] PropelCreoleTransformTask::include_once
> (): Failed opening 'creole/Creole.php' for inclusion (include_path='/
> usr/share/php/data/propel_generator/classes:.:/usr/share/php:/usr/
> share/php/Smarty-2.6.26:/usr/share/php/SssS:/usr/share/pear') [line
> 267 of /usr/share/php/propel/phing/PropelCreoleTransformTask.php]
> 201: [exec] Execution of target "creole" failed for the
> following reason: /usr/share/php/data/propel_generator/build-
> propel.xml:298:1: PropelCreoleTransformTask task depends on Creole
> classes being on include_path. (i.e. include of 'creole/Creole.php'
> failed.)
> 202: [exec] [phing] /usr/share/php/data/propel_generator/
> build-propel.xml:298:1: PropelCreoleTransformTask task depends on
> Creole classes being on include_path. (i.e. include of 'creole/
> Creole.php' failed.)

Ah it looks like I never updated the phing task to use Propel 1.3's
"reverse" task.

Try making this change on your local phocoa repo:

diff --git a/phocoa/phing/build.xml b/phocoa/phing/build.xml
index 06dfc7a..02edea0 100644
--- a/phocoa/phing/build.xml
+++ b/phocoa/phing/build.xml
@@ -135,7 +135,7 @@
<if>
<equals arg1="${db.generate}" arg2="1" />
<then>
- <exec command="${propel.bin.propel-gen} $
{phocoa.propel.dir} creole" passthru="true" />
+ <exec command="${propel.bin.propel-gen} $
{phocoa.propel.dir} reverse" passthru="true" />
<exec command="${propel.bin.propel-gen} $
{phocoa.propel.dir} main" passthru="true" />
<echo message="Propel code generation complete." />
</then>

This is why you aren't getting your schema.xml file.

You can use any ORM you like, so long as the base object of the ORM
extends WFObject. Phocoa and Propel are not coupled in any direct way
in the code. None of phocoa's magic depends directly on Propel. I
always assumed I'd support more than one ORM in the future, which is
why it's architected that way. Only some of the scaffolding and
fixture features won't work OOTB with a different ORM. But it's very
simple to add adapters for another ORM if you already have one you
like a lot.

Please try that change and try again.

Alan

SwissalpS

unread,
Dec 8, 2009, 8:17:20 PM12/8/09
to phocoa users
thanks Alan, feels great to have the pro guide me in :-)

I went in to build.xml and replaced "creole" with "reverse"
Then I ran `phocoa newProject` again (output attached again)
The creole error is gone, so that seems to be ok now.

There is still no schema.xml file to be found. Seems it should have
been created
before output line 158 as that's where there is an error.

we're getting there, but I still need your help, thanks.

1: luke@debian2:~/phocoa_projects$ phocoa newProject
2: phing -f /usr/share/php/phocoa/phing/build.xml -
Dusing.phocoa.make=true -Dphocoa.pwd=/home/luke/phocoa_projects -
Dphocoa.dir=/usr/share/php/phocoa -Dphocoa.project.name= -
Dphocoa.project.dir= newProject
3: Buildfile: /usr/share/php/phocoa/phing/build.xml
4:
5: phocoa > prepareGeneral:
6:
7: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
8:
9: phocoa > newProject:
10:
11: Enter the name of the new project: [] test3
12: [echo] The container directory for your PHOCOA project will
be used to place the log, runtime, and project directories. Please be
careful!
13: Enter the path to the project container directory: [/home/luke/
phocoa_projects/test3]
14: [realpathexpandhome] Resolved /home/luke/phocoa_projects/test3
to /home/luke/phocoa_projects/test3
15: Enter the name of the server (ie dns name) that will host this
application: [localhost]
16: Enter the IP of the server that will host this application:
[127.0.0.1]
17: Enter the PORT of the server that will host this application:
[80] 8080
18: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'setupProjectContainer'
19:
20: phocoa > setupProjectContainer:
21:
22: [echo] Creating project container directories and setting
up permissions
23: [mkdir] Created dir: /home/luke/phocoa_projects/test3/log
24: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test3/log' to 777
25: [mkdir] Created dir: /home/luke/phocoa_projects/test3/
runtime
26: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test3/runtime' to 777
27: [mkdir] Created dir: /home/luke/phocoa_projects/test3/
runtime/smarty/templates_c
28: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test3/runtime/smarty/templates_c' to 777
29: [echo] Creating project directory: /home/luke/
phocoa_projects/test3/test3
30: [mkdir] Created dir: /home/luke/phocoa_projects/test3/test3
31: [echo] Copying PHOCOA templates...
32: [copy] Copying 14 files to /home/luke/phocoa_projects/test3/
test3
33: [mkdir] Created dir: /home/luke/phocoa_projects/test3/test3/
wwwroot/www
34: [mkdir] Created dir: /home/luke/phocoa_projects/test3/test3/
modules
35: [echo] Setting up configuration files...
36: [copy] Copying 3 files to /home/luke/phocoa_projects/test3/
test3
37: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
38: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test3"
39: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test3"
40: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
41: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test3"
42: [filter:ReplaceTokens] Replaced "##SERVER_IP##" with "127.0.0.1"
43: [filter:ReplaceTokens] Replaced "##SERVER_PORT##" with "8080"
44: [filter:ReplaceTokens] Replaced "##SERVER_NAME##" with
"localhost"
45: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
46: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
47: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
48: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
49: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
50: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
51: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test3"
52: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test3"
53: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
54: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test3/test3"
55: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
56: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'httpdconf'
57:
58: phocoa > prepareGeneral:
59:
60: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
61:
62: phocoa > prepareProject:
63:
64: [echo] 1
65: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
66: [echo] Using PHP: /usr/bin/php
67: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test3/test3
68: [resolvepath] Resolved /home/luke/phocoa_projects/test3/test3/..
to /home/luke/phocoa_projects/test3
69: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test3
70: [property] Loading /home/luke/phocoa_projects/test3/test3/conf/
build.properties
71: [property] Unable to find property file: /home/luke/
phocoa_projects/test3/test3/conf/build.properties... skipped
72:
73: phocoa > httpdconf:
74:
75: [echo] PHOCOA requires some httpd configurations to work
its magic. You must either be able to edit httpd.conf, or have an
apache with mod_rewrite enabled.
76: Select httpd configuration mode: 1=httpd.conf, 2=.htaccess [1] 1
77: [echo] Make sure your httpd.conf file contains the line:
Include /home/luke/phocoa_projects/test3/test3/test3/conf/httpd.conf
78: Will this project use database access via Propel?(yes/no) [1]
yes
79: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'addpropel'
80:
81: phocoa > prepareGeneral:
82:
83: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
84:
85: phocoa > prepareProject:
86:
87: [echo] 1
88: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
89: [echo] Using PHP: /usr/bin/php
90: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test3/test3
91: [resolvepath] Resolved /home/luke/phocoa_projects/test3/test3/..
to /home/luke/phocoa_projects/test3
92: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test3
93: [property] Loading /home/luke/phocoa_projects/test3/test3/conf/
build.properties
94: [property] Unable to find property file: /home/luke/
phocoa_projects/test3/test3/conf/build.properties... skipped
95:
96: phocoa > addpropel:
97:
98: [echo] NOTE: this task is only tested with Propel 1.3. If
you have problems, please report them.
99: [echo] Setting up PHOCOA project for Propel in dir: /home/
luke/phocoa_projects/test3/test3/propel-build
100: Select the path for executable: propel-gen: [/usr/bin/propel-
gen]
101: [selectExecutable] Using propel-gen at /usr/bin/propel-gen
102: [mkdir] Created dir: /home/luke/phocoa_projects/test3/test3/
propel-build
103: Enter the database type:(pgsql,mysql,mssql,sqllite,ldap) mysql
104: Enter the database name: phocoa_lukeZcom
105: Enter the database username: phocoa
106: Enter the database password: phocoa
107: Enter the database host: [localhost]
108: [writeconffile] Writing conf file: /home/luke/phocoa_projects/
test3/test3/propel-build/build.properties.
109: [echo] Building Propel... setup conf file, reverse engineer
database, build db classes.
110: [copy] Copying 1 file to /home/luke/phocoa_projects/test3/
test3/propel-build
111: [filter:ReplaceTokens] Replaced "##LOG_DIR##" with "/home/luke/
phocoa_projects/test3/log"
112: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test3"
113: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
114: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
115: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
116: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
117: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
118: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
119: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
120: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
121: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
122: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
123: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
124: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
125: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
126: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
127: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test3/test3/propel-build convert-conf 2>&1
128: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
129: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test3/test3/propel-build to /home/luke/phocoa_projects/test3/test3/
propel-build
130: [exec]
131: [exec] propel-project-builder > projdircheckExists:
132: [exec]
133: [exec]
134: [exec] propel-project-builder > projdircheck:
135: [exec]
136: [exec]
137: [exec] propel-project-builder > configure:
138: [exec]
139: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test3/test3/propel-build/build.properties
140: [exec] [property] Loading /home/luke/phocoa_projects/test3/
test3/propel-build/build.properties
141: [exec]
142: [exec] propel-project-builder > convert-conf:
143: [exec]
144: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'convert-conf'
145: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
146: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
147: [exec]
148: [exec] propel > convert-conf:
149: [exec]
150: [exec] [echo]
+------------------------------------------+
151: [exec] [echo]
| |
152: [exec] [echo] | Converting runtime config file to
an |
153: [exec] [echo] | array dump for improved
performance. |
154: [exec] [echo]
| |
155: [exec] [echo]
+------------------------------------------+
156: [exec] [echo] Output file: test3-conf.php
157: [exec] [echo] XMLFile: /home/luke/phocoa_projects/
test3/test3/propel-build/runtime-conf.xml
158: [exec] Execution of target "convert-conf" failed for the
following reason: /usr/share/php/data/propel_generator/build-
propel.xml:507:20: No schema files were found (matching your schema
fileset definition).
159: [exec] [phing] /usr/share/php/data/propel_generator/
build-propel.xml:507:20: No schema files were found (matching your
schema fileset definition).
160: [exec]
161: [exec] BUILD FINISHED
162: [exec]
163: [exec] Total time: 3.6040 seconds
164: [exec]
165: [echo] Propel general setup complete.
166: [echo] To complete propel integration, complete the
following manual tasks:
167: [echo] 1. Make sure that propel is available in your
include_path. If not, edit webapp.conf and munge include_path.
168: [echo] 2. Edit Propel's om/BaseObject.php BaseObject
declaration to this: 'abstract class BaseObject extends WFObject'.
169: [echo] 3. Edit Propel's util/BasePeer.php BasePeer
declaration to this: 'class BasePeer extends WFObject'.
170: If your database already exists, we can generate a PHP interface
to your database objects. Does your database already exist?(yes/no) []
yes
171: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test3/test3/propel-build reverse 2>&1
172: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
173: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test3/test3/propel-build to /home/luke/phocoa_projects/test3/test3/
propel-build
174: [exec]
175: [exec] propel-project-builder > projdircheckExists:
176: [exec]
177: [exec]
178: [exec] propel-project-builder > projdircheck:
179: [exec]
180: [exec]
181: [exec] propel-project-builder > configure:
182: [exec]
183: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test3/test3/propel-build/build.properties
184: [exec] [property] Loading /home/luke/phocoa_projects/test3/
test3/propel-build/build.properties
185: [exec]
186: [exec] propel-project-builder > reverse:
187: [exec]
188: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'reverse'
189: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
190: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
191: [exec]
192: [exec] propel > reverse:
193: [exec]
194: [exec] [echo]
+-----------------------------------------------+
195: [exec] [echo]
| |
196: [exec] [echo] | Generating XML from PDO
connection ! |
197: [exec] [echo]
| |
198: [exec] [echo]
+-----------------------------------------------+
199: [exec] [propel-schema-reverse] There was an error building
XML from metadata: could not find driver
200: [exec] [propel-schema-reverse] Schema reverse engineering
finished
201: [exec]
202: [exec] BUILD FINISHED
203: [exec]
204: [exec] Total time: 0.8480 seconds
205: [exec]
206: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test3/test3/propel-build main 2>&1
207: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
208: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test3/test3/propel-build to /home/luke/phocoa_projects/test3/test3/
propel-build
209: [exec]
210: [exec] propel-project-builder > projdircheckExists:
211: [exec]
212: [exec]
213: [exec] propel-project-builder > projdircheck:
214: [exec]
215: [exec]
216: [exec] propel-project-builder > configure:
217: [exec]
218: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test3/test3/propel-build/build.properties
219: [exec] [property] Loading /home/luke/phocoa_projects/test3/
test3/propel-build/build.properties
220: [exec]
221: [exec] propel-project-builder > main:
222: [exec]
223: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'main'
224: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
225: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
226: [exec]
227: [exec] propel > mysqli-check:
228: [exec]
229: [exec]
230: [exec] propel > main:
231: [exec]
232: [exec] [phingcall] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'sql'
233: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
234: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
235: [exec]
236: [exec] propel > check-run-only-on-schema-change:
237: [exec]
238: [exec]
239: [exec] propel > sql-check:
240: [exec]
241: [exec]
242: [exec] propel > pgsql-quoting-check:
243: [exec]
244: [exec]
245: [exec] propel > mysqli-check:
246: [exec]
247: [exec]
248: [exec] propel > sql:
249: [exec]
250: [exec] [echo]
+------------------------------------------+
251: [exec] [echo]
| |
252: [exec] [echo] | Generating SQL for YOUR Propel
project! |
253: [exec] [echo]
| |
254: [exec] [echo]
+------------------------------------------+
255: [exec] [phingcall] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'sql-template'
256: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
257: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
258: [exec]
259: [exec] propel > sql-template:
260: [exec]
261: [exec] Execution of target "sql-template" failed for the
following reason: /usr/share/php/data/propel_generator/build-
propel.xml:196:10: No schema files were found (matching your schema
fileset definition).
262: [exec] [phingcall] /usr/share/php/data/propel_generator/
build-propel.xml:196:10: No schema files were found (matching your
schema fileset definition).
263: [exec] Execution of target "sql" failed for the following
reason: /usr/share/php/data/propel_generator/build-propel.xml:181:22:
Execution of the target buildfile failed. Aborting.
264: [exec] [phingcall] /usr/share/php/data/propel_generator/
build-propel.xml:181:22: Execution of the target buildfile failed.
Aborting.
265: [exec] Execution of target "main" failed for the following
reason: /usr/share/php/data/propel_generator/build-propel.xml:91:22:
Execution of the target buildfile failed. Aborting.
266: [exec] [phing] /usr/share/php/data/propel_generator/
build-propel.xml:91:22: Execution of the target buildfile failed.
Aborting.
267: [exec]
268: [exec] BUILD FINISHED
269: [exec]
270: [exec] Total time: 1.5280 second
271: [exec]
272: [echo] Propel code generation complete.
273: [echo] Activating propel in application delegate...
274: [reflexive] Applying reflexive processing to 1 files.
275: [echo] Done adding Propel support.
276: [echo] New Project setup complete.
277:
278: BUILD FINISHED
279:
280: Total time: 5 minutes 11.25 seconds

(it didn't actually take 5 minutes to build, that must be my switching-
around-apps-time :-D)

Alan Pinstein

unread,
Dec 8, 2009, 9:01:24 PM12/8/09
to phocoa...@googlegroups.com
I think this is your problem:

> 199: [exec] [propel-schema-reverse] There was an error building
> XML from metadata: could not find driver
> 200: [exec] [propel-schema-reverse] Schema reverse engineering
> finished

It looks like your PHP doesn't have a driver for your db...

Run:

php -i | grep mysql

See if you see the mysql driver installed...

For instance I use pgsql, so I see:

$ php -i | grep -i post
Configure Command => './configure' '--prefix=/opt/local' '--mandir=/
opt/local/share/man' '--infodir=/opt/local/share/info' '--with-config-
file-path=/opt/local/etc/php5' '--with-config-file-scan-dir=/opt/local/
var/db/php5' '--enable-calendar' '--with-iconv=/opt/local' '--enable-
exif' '--enable-ftp' '--enable-wddx' '--with-zlib=/opt/local' '--with-
bz2=/opt/local' '--without-mysql' '--without-sqlite' '--without-pdo-
sqlite' '--with-libxml-dir=/opt/local' '--with-gettext=/opt/local' '--
with-libexpat-dir=/opt/local' '--with-xmlrpc' '--enable-soap' '--
enable-bcmath' '--enable-mbstring' '--enable-dba' '--enable-zip' '--
with-openssl=/opt/local' '--with-mhash=/opt/local' '--with-mcrypt=/opt/
local' '--with-mime-magic' '--with-xsl=/opt/local' '--with-curl=/opt/
local' '--with-pcre-regex=/opt/local' '--with-gd' '--with-jpeg-dir=/
opt/local' '--with-png-dir=/opt/local' '--enable-gd-native-ttf' '--
with-freetype-dir=/opt/local' '--with-ldap=/usr' '--with-kerberos=/
usr' '--with-iodbc=/usr' '--with-apxs2=/opt/local/apache2/bin/apxs' '--
with-imap=/opt/local' '--with-imap-ssl=/opt/local' '--with-pgsql=/opt/
local/lib/postgresql83/bin' '--with-pdo-pgsql=/opt/local/lib/
postgresql83/bin' '--enable-pcntl' '--with-pear=/opt/local/lib/php' '--
with-readline=/opt/local'
PDO Driver for PostgreSQL => enabled
PostgreSQL(libpq) Version => 8.3.8
PostgreSQL Support => enabled
PostgreSQL(libpq) Version => 8.3.8

LMK if that helps...

Alan

SwissalpS

unread,
Dec 8, 2009, 9:22:38 PM12/8/09
to phocoa users
omg, you're quick :-D
was about to hit the hay...

silly of me, yes php doesn't seem to have any mysql!
I only tested with navicat.app

so now it's installed and the output of sugested command is:

debian2:~# php -i | grep mysql
additional .ini files parsed => /etc/php5/cli/conf.d/mysql.ini,
/etc/php5/cli/conf.d/mysqli.ini,
/etc/php5/cli/conf.d/pdo_mysql.ini,
mysql
MYSQL_SOCKET => /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE => -I/usr/include/mysql
MYSQL_LIBS => -L/usr/lib -lmysqlclient_r
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off
mysqli
MYSQLI_SOCKET => /var/run/mysqld/mysqld.sock
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.reconnect => Off => Off
PDO drivers => mysql
pdo_mysql

moving on to test4 :-D
(feeling a little stupid, but encouraged)
> ...
>
> read more »

SwissalpS

unread,
Dec 8, 2009, 9:34:23 PM12/8/09
to phocoa users
run 4's output indicates in line 199 that the mysql username and
password aren't being used at all.
I could create a user luke and set a default password.... but that's
somewhat not the solution as I'd rather not
have to do that even tho I'm running this on a test machine. On a
production machine I won't be able to do that.

here's the output:
1: luke@debian2:~/phocoa_projects$ phocoa newProject
2: phing -f /usr/share/php/phocoa/phing/build.xml -
Dusing.phocoa.make=true -Dphocoa.pwd=/home/luke/phocoa_projects -
Dphocoa.dir=/usr/share/php/phocoa -Dphocoa.project.name= -
Dphocoa.project.dir= newProject
3: Buildfile: /usr/share/php/phocoa/phing/build.xml
4:
5: phocoa > prepareGeneral:
6:
7: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
8:
9: phocoa > newProject:
10:
11: Enter the name of the new project: [] test4
12: [echo] The container directory for your PHOCOA project will
be used to place the log, runtime, and project directories. Please be
careful!
13: Enter the path to the project container directory: [/home/luke/
phocoa_projects/test4]
14: [realpathexpandhome] Resolved /home/luke/phocoa_projects/test4
to /home/luke/phocoa_projects/test4
15: Enter the name of the server (ie dns name) that will host this
application: [localhost]
16: Enter the IP of the server that will host this application:
[127.0.0.1]
17: Enter the PORT of the server that will host this application:
[80] 8080
18: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'setupProjectContainer'
19:
20: phocoa > setupProjectContainer:
21:
22: [echo] Creating project container directories and setting
up permissions
23: [mkdir] Created dir: /home/luke/phocoa_projects/test4/log
24: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test4/log' to 777
25: [mkdir] Created dir: /home/luke/phocoa_projects/test4/
runtime
26: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test4/runtime' to 777
27: [mkdir] Created dir: /home/luke/phocoa_projects/test4/
runtime/smarty/templates_c
28: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test4/runtime/smarty/templates_c' to 777
29: [echo] Creating project directory: /home/luke/
phocoa_projects/test4/test4
30: [mkdir] Created dir: /home/luke/phocoa_projects/test4/test4
31: [echo] Copying PHOCOA templates...
32: [copy] Copying 14 files to /home/luke/phocoa_projects/test4/
test4
33: [mkdir] Created dir: /home/luke/phocoa_projects/test4/test4/
wwwroot/www
34: [mkdir] Created dir: /home/luke/phocoa_projects/test4/test4/
modules
35: [echo] Setting up configuration files...
36: [copy] Copying 3 files to /home/luke/phocoa_projects/test4/
test4
37: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
38: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test4"
39: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test4"
40: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
41: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test4"
42: [filter:ReplaceTokens] Replaced "##SERVER_IP##" with "127.0.0.1"
43: [filter:ReplaceTokens] Replaced "##SERVER_PORT##" with "8080"
44: [filter:ReplaceTokens] Replaced "##SERVER_NAME##" with
"localhost"
45: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
46: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
47: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
48: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
49: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
50: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
51: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test4"
52: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test4"
53: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
54: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test4/test4"
55: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
56: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'httpdconf'
57:
58: phocoa > prepareGeneral:
59:
60: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
61:
62: phocoa > prepareProject:
63:
64: [echo] 1
65: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
66: [echo] Using PHP: /usr/bin/php
67: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test4/test4
68: [resolvepath] Resolved /home/luke/phocoa_projects/test4/test4/..
to /home/luke/phocoa_projects/test4
69: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test4
70: [property] Loading /home/luke/phocoa_projects/test4/test4/conf/
build.properties
71: [property] Unable to find property file: /home/luke/
phocoa_projects/test4/test4/conf/build.properties... skipped
72:
73: phocoa > httpdconf:
74:
75: [echo] PHOCOA requires some httpd configurations to work
its magic. You must either be able to edit httpd.conf, or have an
apache with mod_rewrite enabled.
76: Select httpd configuration mode: 1=httpd.conf, 2=.htaccess [1] 1
77: [echo] Make sure your httpd.conf file contains the line:
Include /home/luke/phocoa_projects/test4/test4/test4/conf/httpd.conf
78: Will this project use database access via Propel?(yes/no) [1]
yes
79: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'addpropel'
80:
81: phocoa > prepareGeneral:
82:
83: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
84:
85: phocoa > prepareProject:
86:
87: [echo] 1
88: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
89: [echo] Using PHP: /usr/bin/php
90: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test4/test4
91: [resolvepath] Resolved /home/luke/phocoa_projects/test4/test4/..
to /home/luke/phocoa_projects/test4
92: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test4
93: [property] Loading /home/luke/phocoa_projects/test4/test4/conf/
build.properties
94: [property] Unable to find property file: /home/luke/
phocoa_projects/test4/test4/conf/build.properties... skipped
95:
96: phocoa > addpropel:
97:
98: [echo] NOTE: this task is only tested with Propel 1.3. If
you have problems, please report them.
99: [echo] Setting up PHOCOA project for Propel in dir: /home/
luke/phocoa_projects/test4/test4/propel-build
100: Select the path for executable: propel-gen: [/usr/bin/propel-
gen]
101: [selectExecutable] Using propel-gen at /usr/bin/propel-gen
102: [mkdir] Created dir: /home/luke/phocoa_projects/test4/test4/
propel-build
103: Enter the database type:(pgsql,mysql,mssql,sqllite,ldap) mysql
104: Enter the database name: phocoa_lukeZcom
105: Enter the database username: phocoa
106: Enter the database password: phocoa
107: Enter the database host: [localhost]
108: [writeconffile] Writing conf file: /home/luke/phocoa_projects/
test4/test4/propel-build/build.properties.
109: [echo] Building Propel... setup conf file, reverse engineer
database, build db classes.
110: [copy] Copying 1 file to /home/luke/phocoa_projects/test4/
test4/propel-build
111: [filter:ReplaceTokens] Replaced "##LOG_DIR##" with "/home/luke/
phocoa_projects/test4/log"
112: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test4"
113: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
114: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
115: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
116: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
117: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
118: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
119: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
120: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
121: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
122: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
123: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
124: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
125: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
126: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
127: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test4/test4/propel-build convert-conf 2>&1
128: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
129: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test4/test4/propel-build to /home/luke/phocoa_projects/test4/test4/
propel-build
130: [exec]
131: [exec] propel-project-builder > projdircheckExists:
132: [exec]
133: [exec]
134: [exec] propel-project-builder > projdircheck:
135: [exec]
136: [exec]
137: [exec] propel-project-builder > configure:
138: [exec]
139: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test4/test4/propel-build/build.properties
140: [exec] [property] Loading /home/luke/phocoa_projects/test4/
test4/propel-build/build.properties
141: [exec]
142: [exec] propel-project-builder > convert-conf:
143: [exec]
144: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'convert-conf'
145: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
146: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
147: [exec]
148: [exec] propel > convert-conf:
149: [exec]
150: [exec] [echo]
+------------------------------------------+
151: [exec] [echo]
| |
152: [exec] [echo] | Converting runtime config file to
an |
153: [exec] [echo] | array dump for improved
performance. |
154: [exec] [echo]
| |
155: [exec] [echo]
+------------------------------------------+
156: [exec] [echo] Output file: test4-conf.php
157: [exec] [echo] XMLFile: /home/luke/phocoa_projects/
test4/test4/propel-build/runtime-conf.xml
158: [exec] Execution of target "convert-conf" failed for the
following reason: /usr/share/php/data/propel_generator/build-
propel.xml:507:20: No schema files were found (matching your schema
fileset definition).
159: [exec] [phing] /usr/share/php/data/propel_generator/
build-propel.xml:507:20: No schema files were found (matching your
schema fileset definition).
160: [exec]
161: [exec] BUILD FINISHED
162: [exec]
163: [exec] Total time: 0.3600 seconds
164: [exec]
165: [echo] Propel general setup complete.
166: [echo] To complete propel integration, complete the
following manual tasks:
167: [echo] 1. Make sure that propel is available in your
include_path. If not, edit webapp.conf and munge include_path.
168: [echo] 2. Edit Propel's om/BaseObject.php BaseObject
declaration to this: 'abstract class BaseObject extends WFObject'.
169: [echo] 3. Edit Propel's util/BasePeer.php BasePeer
declaration to this: 'class BasePeer extends WFObject'.
170: If your database already exists, we can generate a PHP interface
to your database objects. Does your database already exist?(yes/no) []
yes
171: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test4/test4/propel-build reverse 2>&1
172: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
173: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test4/test4/propel-build to /home/luke/phocoa_projects/test4/test4/
propel-build
174: [exec]
175: [exec] propel-project-builder > projdircheckExists:
176: [exec]
177: [exec]
178: [exec] propel-project-builder > projdircheck:
179: [exec]
180: [exec]
181: [exec] propel-project-builder > configure:
182: [exec]
183: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test4/test4/propel-build/build.properties
184: [exec] [property] Loading /home/luke/phocoa_projects/test4/
test4/propel-build/build.properties
185: [exec]
186: [exec] propel-project-builder > reverse:
187: [exec]
188: [exec] [phing] Calling Buildfile '/usr/share/php/data/
propel_generator/build-propel.xml' with target 'reverse'
189: [exec] [property] Loading /usr/share/php/data/
propel_generator/./build.properties
190: [exec] [property] Loading /usr/share/php/data/
propel_generator/./default.properties
191: [exec]
192: [exec] propel > reverse:
193: [exec]
194: [exec] [echo]
+-----------------------------------------------+
195: [exec] [echo]
| |
196: [exec] [echo] | Generating XML from PDO
connection ! |
197: [exec] [echo]
| |
198: [exec] [echo]
+-----------------------------------------------+
199: [exec] [propel-schema-reverse] There was an error building
XML from metadata: SQLSTATE[28000] [1045] Access denied for user
'luke'@'localhost' (using password: NO)
200: [exec] [propel-schema-reverse] Schema reverse engineering
finished
201: [exec]
202: [exec] BUILD FINISHED
203: [exec]
204: [exec] Total time: 0.3720 seconds
205: [exec]
206: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test4/test4/propel-build main 2>&1
207: [exec] Buildfile: /usr/share/php/data/propel_generator/pear-
build.xml
208: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test4/test4/propel-build to /home/luke/phocoa_projects/test4/test4/
propel-build
209: [exec]
210: [exec] propel-project-builder > projdircheckExists:
211: [exec]
212: [exec]
213: [exec] propel-project-builder > projdircheck:
214: [exec]
215: [exec]
216: [exec] propel-project-builder > configure:
217: [exec]
218: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test4/test4/propel-build/build.properties
219: [exec] [property] Loading /home/luke/phocoa_projects/test4/
test4/propel-build/build.properties
270: [exec] Total time: 0.4320 seconds
271: [exec]
272: [echo] Propel code generation complete.
273: [echo] Activating propel in application delegate...
274: [reflexive] Applying reflexive processing to 1 files.
275: [echo] Done adding Propel support.
276: [echo] New Project setup complete.
277:
278: BUILD FINISHED
279:
280: Total time: 54.5520 seconds
> ...
>
> read more »

Alan Pinstein

unread,
Dec 8, 2009, 11:03:33 PM12/8/09
to phocoa...@googlegroups.com
IIRC mysql uses a different DSN style...

Try looking at this file:
/home/luke/phocoa_projects/test4/test4/propel-build/build.properties

You can test this step directly with:
> cd /home/luke/phocoa_projects/test4/test4/propel-build
> propel-gen . reverse

Tweak your build.properties until that works... something like

mysql://user:pass@localhost/database

LMK.

Alan
>>>> test3/
>>>> test3
>>>> 33: [mkdir] Created dir: /home/luke/phocoa_projects/test3/
>>>> test3/
>>>> wwwroot/www
>>>> 34: [mkdir] Created dir: /home/luke/phocoa_projects/test3/
>>>> test3/
>>>> modules
>>>> 35: [echo] Setting up configuration files...
>>>> 36: [copy] Copying 3 files to /home/luke/phocoa_projects/
>>>> test3/
>>>> test3
>>>> 37: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/
>>>> usr/
>>>> share/php/phocoa"
>>>> 38: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
>>>> with "/home/luke/phocoa_projects/test3"
>>>> 39: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
>>>> with "/home/luke/phocoa_projects/test3"
>>>> 40: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 41: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
>>>> "test3"
>>>> 42: [filter:ReplaceTokens] Replaced "##SERVER_IP##" with
>>>> "127.0.0.1"
>>>> 43: [filter:ReplaceTokens] Replaced "##SERVER_PORT##" with "8080"
>>>> 44: [filter:ReplaceTokens] Replaced "##SERVER_NAME##" with
>>>> "localhost"
>>>> 45: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 46: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/
>>>> usr/
>>>> share/php/phocoa"
>>>> 47: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 48: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 49: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/
>>>> usr/
>>>> share/php/phocoa"
>>>> 50: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 51: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
>>>> with "/home/luke/phocoa_projects/test3"
>>>> 52: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
>>>> with "/home/luke/phocoa_projects/test3"
>>>> 53: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 54: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/
>>>> home/
>>>> luke/phocoa_projects/test3/test3"
>>>> 55: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/
>>>> usr/
>>>> share/php/phocoa"
>>>> 56: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
>>>> build.xml' with target 'httpdconf'
>>>> 57:
>>>> 58: phocoa > prepareGeneral:
>>>> 59:
>>>> 60: [echo] PHOCOA framework base dir at: /usr/share/php/
>>>> phocoa

SwissalpS

unread,
Dec 9, 2009, 5:41:13 AM12/9/09
to phocoa users
found a line
propel.database.creole.url = mysql://phocoa:phocoa@localhost/phocoa_lukeZcom
changed it to
propel.database.reverse.url = mysql://phocoa:phocoa@localhost/phocoa_lukeZcom

running

> > cd /home/luke/phocoa_projects/test4/test4/propel-build
> > propel-gen . reverse

told me that there was no project dir and that I should
propel-gen /path/to/projectdir [target]

so I tried
propel-gen /home/luke/phocoa_projects/test4/test4/ .reverse
which outputted:
>Buildfile: /usr/share/php/data/propel_generator/pear-build.xml
>[resolvepath] Resolved /home/luke/phocoa_projects/test4/test4/ to /home/luke/phocoa_projects/test4/test4
>
>BUILD FAILED
>Target '.reverse' does not exist in this project.

I tried a couple of variations on the propel-gen line trying to
satisfy target. but I don't seem to have caught the correct one.
any ideas?

Luke

SwissalpS

unread,
Dec 9, 2009, 6:57:38 AM12/9/09
to phocoa users
ok, got the project-dir part correct now, as this seems to get me
closest:
<<EOQuote
propel-gen /home/luke/phocoa_projects/test4/test4/propel-build/
reverse

Buildfile: /usr/share/php/data/propel_generator/pear-build.xml
[resolvepath] Resolved /home/luke/phocoa_projects/test4/test4/propel-
build/ to /home/luke/phocoa_projects/test4/test4/propel-build

propel-project-builder > projdircheckExists:


propel-project-builder > projdircheck:


propel-project-builder > configure:

[echo] Loading project-specific props from /home/luke/
phocoa_projects/test4/test4/propel-build//build.properties
[property] Loading /home/luke/phocoa_projects/test4/test4/propel-
build/build.properties

propel-project-builder > reverse:

[phing] Calling Buildfile '/usr/share/php/data/propel_generator/
build-propel.xml' with target 'reverse'
[property] Loading /usr/share/php/data/propel_generator/./
build.properties
[property] Loading /usr/share/php/data/propel_generator/./
default.properties

propel > reverse:

[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating XML from PDO connection ! |
[echo] | |
[echo] +-----------------------------------------------+
[propel-schema-reverse] There was an error building XML from metadata:
SQLSTATE[28000] [1045] Access denied for user
'luke'@'localhost' (using password: NO)
[propel-schema-reverse] Schema reverse engineering finished

BUILD FINISHED

Total time: 0.3735 seconds
EOQuote

now I'm playing around with the values in build.properties.

SwissalpS

unread,
Dec 9, 2009, 7:15:49 AM12/9/09
to phocoa users
now my build.properties look like so:
propel.database = mysql
propel.project = test4
propel.database.url =
mysql:user=phocoa;password=phocoa;hostname=localhost;dbname=phocoa_lukeZcom
propel.database.user = phocoa
propel.database.password = phocoa
propel.database.reverse.url = mysql://phocoa:phocoa@localhost/phocoa_lukeZcom
propel.targetPackage = phocoa_lukeZcom
propel.output.dir = /home/luke/phocoa_projects/test4/test4/propel-
build
propel.php.dir = /home/luke/phocoa_projects/test4/test4/classes
propel.phpconf.dir = /home/luke/phocoa_projects/test4/test4/conf
propel.sql.dir = /home/luke/phocoa_projects/test4/test4/propel-build/
db/sql
propel.addTimeStamp =
propel.useDateTimeClass = 1
propel.dateTimeClass = WFDateTime
propel.defaultTimeStampFormat =
propel.autoloadCoreClasses = 1
propel.autoloadGeneratedClasses = 1

and the commandline I used is:
propel-gen /home/luke/phocoa_projects/test4/test4/propel-build/
reverse

which finally makes a schema.xml in
/home/luke/phocoa_projects/test4/test4/propel-build/schema.xml

great, so now I'm looking for 'basepeer' in schema file but it doesn't
exist.

guessing that this is the moment for fix-shema.php to shine, I'm
editing it to make it know where to find schema.xml
then running it

SwissalpS

unread,
Dec 9, 2009, 7:40:06 AM12/9/09
to phocoa users
I shebanged fix-schema.php and changed 'getenv
('PHOCOA_PROJECT_CONF');' to 'require_once('/home/luke/phocoa_projects/
test4/test4/conf/webapp.conf');'

now there's no /home/luke/phocoa_projects/test4/test4/conf/test4-
conf.php

here's my shell in-/output:
luke@debian2:~/phocoa_projects$ ./fix-schema.php

Warning: Propel::include(/home/luke/phocoa_projects/test4/test4/conf/
test4-conf.php): failed to open stream: No such file or directory in /
usr/share/php/propel/Propel.php on line 267

Warning: Propel::include(): Failed opening '/home/luke/phocoa_projects/
test4/test4/conf/test4-conf.php' for inclusion (include_path='/usr/
share/php/phocoa:/home/luke/phocoa_projects/test4/test4:/home/luke/
phocoa_projects/test4/test4/classes:.:/usr/share/php:/usr/share/php/
Smarty-2.6.26:/usr/share/php/SssS:/usr/share/pear') in /usr/share/php/
propel/Propel.php on line 267

Fatal error: Uncaught exception 'PropelException' with message 'Unable
to open configuration file: '/home/luke/phocoa_projects/test4/test4/
conf/test4-conf.php'' in /usr/share/php/propel/Propel.php:269
Stack trace:
#0 /usr/share/php/propel/Propel.php(303): Propel::configure('/home/
luke/phoc...')
#1 /home/luke/phocoa_projects/test4/test4/classes/
MyWebApplicationDelegate.php(21): Propel::init('/home/luke/phoc...')
#2 /usr/share/php/phocoa/framework/WFWebApplication.php(316):
MyWebApplicationDelegate->initialize()
#3 /usr/share/php/phocoa/framework/WFWebApplication.php(110):
WFWebApplication->initialize()
#4 /usr/share/php/phocoa/framework/WFWebApplication.php(174):
WFWebApplication->init()
#5 /usr/share/php/phocoa/framework/bootstrap.php(35):
WFWebApplication::sharedWebApplication()
#6 /home/luke/phocoa_projects/test4/test4/conf/webapp.conf(69):
require_once('/usr/share/php/...')
#7 /home/luke/phocoa_projects/fix-schema.php(13): require_once('/home/
luke/phoc...')
#8 {main}
thrown in /usr/share/php/propel/Propel.php on line 269

Alan Pinstein

unread,
Dec 9, 2009, 9:24:29 AM12/9/09
to phocoa...@googlegroups.com
Are you sure you're using Propel 1.3?

If you do:

pear list -a

What does it show for Propel?

Alan

SwissalpS

unread,
Dec 9, 2009, 11:15:59 AM12/9/09
to phocoa users
actually 1.4.0

luke@debian2:~/phocoa_projects/test4/test4$ pear list -a
Installed packages, channel __uri:
==================================
(no packages installed)
Installed packages, channel pear.horde.org:
===========================================
Package Version State
Yaml 1.0.1 stable
Installed packages, channel pear.phing.info:
============================================
Package Version State
phing 2.3.3 stable
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
Log 1.11.5 stable
Mail 1.1.14 stable
Mail_Mime 1.5.2 stable
Mail_mimeDecode 1.5.1 stable
Net_SMTP 1.3.4 stable
Net_Socket 1.0.9 stable
PEAR 1.7.1 stable
PhpDocumentor 1.4.3 stable
Structures_Graph 1.0.2 stable
Installed packages, channel pear.phpdb.org:
===========================================
Package Version State
propel_generator 1.4.0 stable
propel_runtime 1.4.0 stable
Installed packages, channel pecl.php.net:
=========================================
(no packages installed)

SwissalpS

unread,
Dec 9, 2009, 3:59:48 PM12/9/09
to phocoa users
do I need to downgrade?

Alan Pinstein

unread,
Dec 12, 2009, 11:34:49 AM12/12/09
to phocoa...@googlegroups.com
Yeah, I have not tested at all against 1.4.0. I wouldn't be able to
advise on that at the moment..

Sorry for the delayed response. I've been out-of-town and this ML gets
filtered by my home computer.

Alan

On Dec 9, 2009, at 3:59 PM, SwissalpS wrote:

> do I need to downgrade?
>

SwissalpS

unread,
Dec 14, 2009, 11:16:18 AM12/14/09
to phocoa users
I'm now using propel 1.3; no better result; modified build.xml some
more, now get a lot more output
and a schema.xml and schema-transformed.xml :-D

no test6_3/conf/test6_3-conf.php :-(

learnig... still learning

Here's the current output:

1: luke@debian2:~/phocoa_projects$ phocoa newProject
2: phing -f /usr/share/php/phocoa/phing/build.xml -
Dusing.phocoa.make=true -Dphocoa.pwd=/home/luke/phocoa_projects -
Dphocoa.dir=/usr/share/php/phocoa -Dphocoa.project.name= -
Dphocoa.project.dir= newProject
3: Buildfile: /usr/share/php/phocoa/phing/build.xml
4:
5: phocoa > prepareGeneral:
6:
7: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
8:
9: phocoa > newProject:
10:
11: Enter the name of the new project: [] test6_3
12: [echo] The container directory for your PHOCOA project will
be used to place the log, runtime, and project directories. Please be
careful!
13: Enter the path to the project container directory: [/home/luke/
phocoa_projects/test6_3]
14: [realpathexpandhome] Resolved /home/luke/phocoa_projects/test6_3
to /home/luke/phocoa_projects/test6_3
15: Enter the name of the server (ie dns name) that will host this
application: [localhost]
16: Enter the IP of the server that will host this application:
[127.0.0.1]
17: Enter the PORT of the server that will host this application:
[80] 8080
18: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'setupProjectContainer'
19:
20: phocoa > setupProjectContainer:
21:
22: [echo] Creating project container directories and setting
up permissions
23: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/log
24: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test6_3/log' to 777
25: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/
runtime
26: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test6_3/runtime' to 777
27: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/
runtime/smarty/templates_c
28: [chmod] Changed file mode on '/home/luke/phocoa_projects/
test6_3/runtime/smarty/templates_c' to 777
29: [echo] Creating project directory: /home/luke/
phocoa_projects/test6_3/test6_3
30: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/
test6_3
31: [echo] Copying PHOCOA templates...
32: [copy] Copying 14 files to /home/luke/phocoa_projects/
test6_3/test6_3
33: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/
test6_3/wwwroot/www
34: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/
test6_3/modules
35: [echo] Setting up configuration files...
36: [copy] Copying 3 files to /home/luke/phocoa_projects/
test6_3/test6_3
37: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
38: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test6_3"
39: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test6_3"
40: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
41: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test6_3"
42: [filter:ReplaceTokens] Replaced "##SERVER_IP##" with "127.0.0.1"
43: [filter:ReplaceTokens] Replaced "##SERVER_PORT##" with "8080"
44: [filter:ReplaceTokens] Replaced "##SERVER_NAME##" with
"localhost"
45: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
46: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
47: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
48: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
49: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
50: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
51: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test6_3"
52: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_CONTAINER_DIR##"
with "/home/luke/phocoa_projects/test6_3"
53: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
54: [filter:ReplaceTokens] Replaced "##PHOCOA_APP_DIR##" with "/home/
luke/phocoa_projects/test6_3/test6_3"
55: [filter:ReplaceTokens] Replaced "##PHOCOA_BASE_DIR##" with "/usr/
share/php/phocoa"
56: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'httpdconf'
57:
58: phocoa > prepareGeneral:
59:
60: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
61:
62: phocoa > prepareProject:
63:
64: [echo] 1
65: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
66: [echo] Using PHP: /usr/bin/php
67: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test6_3/test6_3
68: [resolvepath] Resolved /home/luke/phocoa_projects/test6_3/
test6_3/.. to /home/luke/phocoa_projects/test6_3
69: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test6_3
70: [property] Loading /home/luke/phocoa_projects/test6_3/test6_3/
conf/build.properties
71: [property] Unable to find property file: /home/luke/
phocoa_projects/test6_3/test6_3/conf/build.properties... skipped
72:
73: phocoa > httpdconf:
74:
75: [echo] PHOCOA requires some httpd configurations to work
its magic. You must either be able to edit httpd.conf, or have an
apache with mod_rewrite enabled.
76: Select httpd configuration mode: 1=httpd.conf, 2=.htaccess [1]
77: [echo] Make sure your httpd.conf file contains the line:
Include /home/luke/phocoa_projects/test6_3/test6_3/test6_3/conf/
httpd.conf
78: Will this project use database access via Propel?(yes/no) [1]
yes
79: [phingcall] Calling Buildfile '/usr/share/php/phocoa/phing/
build.xml' with target 'addpropel'
80:
81: phocoa > prepareGeneral:
82:
83: [echo] PHOCOA framework base dir at: /usr/share/php/phocoa
84:
85: phocoa > prepareProject:
86:
87: [echo] 1
88: [php] Evaluating PHP expression: getenv('_') ? getenv
('_') : getenv('PHP_COMMAND')
89: [echo] Using PHP: /usr/bin/php
90: [echo] PHOCOA project dir at: /home/luke/phocoa_projects/
test6_3/test6_3
91: [resolvepath] Resolved /home/luke/phocoa_projects/test6_3/
test6_3/.. to /home/luke/phocoa_projects/test6_3
92: [echo] PHOCOA project container dir at: /home/luke/
phocoa_projects/test6_3
93: [property] Loading /home/luke/phocoa_projects/test6_3/test6_3/
conf/build.properties
94: [property] Unable to find property file: /home/luke/
phocoa_projects/test6_3/test6_3/conf/build.properties... skipped
95:
96: phocoa > addpropel:
97:
98: [echo] NOTE: this task is only tested with Propel 1.3. If
you have problems, please report them.
99: [echo] Setting up PHOCOA project for Propel in dir: /home/
luke/phocoa_projects/test6_3/test6_3/propel-build
100: Select the path for executable: propel-gen: [/usr/bin/propel-
gen]
101: [selectExecutable] Using propel-gen at /usr/bin/propel-gen
102: [mkdir] Created dir: /home/luke/phocoa_projects/test6_3/
test6_3/propel-build
103: Enter the database type:(pgsql,mysql,mssql,sqllite,ldap) mysql
104: Enter the database name: phocoa_lukeZcom
105: Enter the database username: phocoa
106: Enter the database password: phocoa
107: Enter the database host: [localhost]
108: [writeconffile] Writing conf file: /home/luke/phocoa_projects/
test6_3/test6_3/propel-build/build.properties.
109: [echo] Building Propel... setup conf file, reverse engineer
database, build db classes.
110: [copy] Copying 1 file to /home/luke/phocoa_projects/test6_3/
test6_3/propel-build
111: [filter:ReplaceTokens] Replaced "##LOG_DIR##" with "/home/luke/
phocoa_projects/test6_3/log"
112: [filter:ReplaceTokens] Replaced "##PHOCOA_PROJECT_NAME##" with
"test6_3"
113: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
114: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
115: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
116: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
117: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
118: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
119: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
120: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
121: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
122: [filter:ReplaceTokens] Replaced "##PROPEL_DATABASE##" with
"mysql"
123: [filter:ReplaceTokens] Replaced "##DB_HOST##" with "localhost"
124: [filter:ReplaceTokens] Replaced "##DB_NAME##" with
"phocoa_lukeZcom"
125: [filter:ReplaceTokens] Replaced "##DB_USER##" with "phocoa"
126: [filter:ReplaceTokens] Replaced "##DB_PASS##" with "phocoa"
127: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test6_3/test6_3/propel-build convert-conf 2>&1
128: [exec] Buildfile: /usr/share/php/propel_generator-1.3/
build.xml
129: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test6_3/test6_3/propel-build to /home/luke/phocoa_projects/test6_3/
test6_3/propel-build
130: [exec]
131: [exec] propel-project-builder > check-project-or-dir-set:
132: [exec]
133: [exec]
134: [exec] propel-project-builder > check-project-set:
135: [exec]
136: [exec]
137: [exec] propel-project-builder > set-project-dir:
138: [exec]
139: [exec]
140: [exec] propel-project-builder > check-buildprops-exists:
141: [exec]
142: [exec]
143: [exec] propel-project-builder > check-buildprops-for-propel-
gen:
144: [exec]
145: [exec]
146: [exec] propel-project-builder > check-buildprops:
147: [exec]
148: [exec]
149: [exec] propel-project-builder > configure:
150: [exec]
151: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test6_3/test6_3/propel-build/
build.properties
152: [exec] [property] Loading /home/luke/phocoa_projects/
test6_3/test6_3/propel-build/build.properties
153: [exec]
154: [exec] propel-project-builder > convert-conf:
155: [exec]
156: [exec] [phing] Calling Buildfile '/usr/share/php/
propel_generator-1.3/build-propel.xml' with target 'convert-conf'
157: [exec] [property] Loading /usr/share/php/
propel_generator-1.3/./default.properties
158: [exec]
159: [exec] propel > convert-conf:
160: [exec]
161: [exec] [echo]
+------------------------------------------+
162: [exec] [echo]
| |
163: [exec] [echo] | Converting runtime config file to
an |
164: [exec] [echo] | array dump for improved
performance. |
165: [exec] [echo]
| |
166: [exec] [echo]
+------------------------------------------+
167: [exec] [echo] Output file: test6_3-conf.php
168: [exec] [echo] XMLFile: /home/luke/phocoa_projects/
test6_3/test6_3/propel-build/runtime-conf.xml
169: [exec] Execution of target "convert-conf" failed for the
following reason: /usr/share/php/propel_generator-1.3/build-propel.xml:
514:20: No schema files were found (matching your schema fileset
definition).
170: [exec] [phing] /usr/share/php/propel_generator-1.3/
build-propel.xml:514:20: No schema files were found (matching your
schema fileset definition).
171: [exec]
172: [exec] BUILD FINISHED
173: [exec]
174: [exec] Total time: 0.3080 seconds
175: [exec]
176: [echo] Propel general setup complete.
177: [echo] To complete propel integration, complete the
following manual tasks:
178: [echo] 1. Make sure that propel is available in your
include_path. If not, edit webapp.conf and munge include_path.
179: [echo] 2. Edit Propel's om/BaseObject.php BaseObject
declaration to this: 'abstract class BaseObject extends WFObject'.
180: [echo] 3. Edit Propel's util/BasePeer.php BasePeer
declaration to this: 'class BasePeer extends WFObject'.
181: If your database already exists, we can generate a PHP interface
to your database objects. Does your database already exist?(yes/no) []
yes
182: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test6_3/test6_3/propel-build reverse 2>&1
183: [exec] Buildfile: /usr/share/php/propel_generator-1.3/
build.xml
184: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test6_3/test6_3/propel-build to /home/luke/phocoa_projects/test6_3/
test6_3/propel-build
185: [exec]
186: [exec] propel-project-builder > check-project-or-dir-set:
187: [exec]
188: [exec]
189: [exec] propel-project-builder > check-project-set:
190: [exec]
191: [exec]
192: [exec] propel-project-builder > set-project-dir:
193: [exec]
194: [exec]
195: [exec] propel-project-builder > check-buildprops-exists:
196: [exec]
197: [exec]
198: [exec] propel-project-builder > check-buildprops-for-propel-
gen:
199: [exec]
200: [exec]
201: [exec] propel-project-builder > check-buildprops:
202: [exec]
203: [exec]
204: [exec] propel-project-builder > configure:
205: [exec]
206: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test6_3/test6_3/propel-build/
build.properties
207: [exec] [property] Loading /home/luke/phocoa_projects/
test6_3/test6_3/propel-build/build.properties
208: [exec]
209: [exec] propel-project-builder > reverse:
210: [exec]
211: [exec] [phing] Calling Buildfile '/usr/share/php/
propel_generator-1.3/build-propel.xml' with target 'reverse'
212: [exec] [property] Loading /usr/share/php/
propel_generator-1.3/./default.properties
213: [exec]
214: [exec] propel > reverse:
215: [exec]
216: [exec] [echo]
+-----------------------------------------------+
217: [exec] [echo]
| |
218: [exec] [echo] | Generating XML from PDO
connection ! |
219: [exec] [echo]
| |
220: [exec] [echo]
+-----------------------------------------------+
221: [exec] [propel-schema-reverse] Writing XML to file: /home/
luke/phocoa_projects/test6_3/test6_3/propel-build/schema.xml
222: [exec] [propel-schema-reverse] Schema reverse engineering
finished
223: [exec]
224: [exec] BUILD FINISHED
225: [exec]
226: [exec] Total time: 1.0640 second
227: [exec]
228: [exec] Executing command: /usr/bin/propel-gen /home/luke/
phocoa_projects/test6_3/test6_3/propel-build main 2>&1
229: [exec] Buildfile: /usr/share/php/propel_generator-1.3/
build.xml
230: [exec] [resolvepath] Resolved /home/luke/phocoa_projects/
test6_3/test6_3/propel-build to /home/luke/phocoa_projects/test6_3/
test6_3/propel-build
231: [exec]
232: [exec] propel-project-builder > check-project-or-dir-set:
233: [exec]
234: [exec]
235: [exec] propel-project-builder > check-project-set:
236: [exec]
237: [exec]
238: [exec] propel-project-builder > set-project-dir:
239: [exec]
240: [exec]
241: [exec] propel-project-builder > check-buildprops-exists:
242: [exec]
243: [exec]
244: [exec] propel-project-builder > check-buildprops-for-propel-
gen:
245: [exec]
246: [exec]
247: [exec] propel-project-builder > check-buildprops:
248: [exec]
249: [exec]
250: [exec] propel-project-builder > configure:
251: [exec]
252: [exec] [echo] Loading project-specific props from /
home/luke/phocoa_projects/test6_3/test6_3/propel-build/
build.properties
253: [exec] [property] Loading /home/luke/phocoa_projects/
test6_3/test6_3/propel-build/build.properties
254: [exec]
255: [exec] propel-project-builder > main:
256: [exec]
257: [exec] [phing] Calling Buildfile '/usr/share/php/
propel_generator-1.3/build-propel.xml' with target 'main'
258: [exec] [property] Loading /usr/share/php/
propel_generator-1.3/./default.properties
259: [exec]
260: [exec] propel > mysqli-check:
261: [exec]
262: [exec]
263: [exec] propel > main:
264: [exec]
265: [exec] [phingcall] Calling Buildfile '/usr/share/php/
propel_generator-1.3/build-propel.xml' with target 'sql'
266: [exec] [property] Loading /usr/share/php/
propel_generator-1.3/./default.properties
267: [exec]
268: [exec] propel > check-run-only-on-schema-change:
269: [exec]
270: [exec]
271: [exec] propel > sql-check:
272: [exec]
273: [exec]
274: [exec] propel > pgsql-quoting-check:
275: [exec]
276: [exec]
277: [exec] propel > mysqli-check:
278: [exec]
279: [exec]
280: [exec] propel > sql:
281: [exec]
282: [exec] [echo]
+------------------------------------------+
283: [exec] [echo]
| |
284: [exec] [echo] | Generating SQL for YOUR Propel
project! |
285: [exec] [echo]
| |
286: [exec] [echo]
+------------------------------------------+
287: [exec] [phingcall] Calling Buildfile '/usr/share/php/
propel_generator-1.3/build-propel.xml' with target 'sql-template'
288: [exec] [property] Loading /usr/share/php/
propel_generator-1.3/./default.properties
289: [exec]
290: [exec] propel > sql-template:
291: [exec]
292: [exec] [propel-sql] Processing: schema.xml
293: [exec] Execution of target "sql-template" failed for the
following reason: /usr/share/php/propel_generator-1.3/build-propel.xml:
198:1: Table 'nuke_admin_module' does not have a primary key defined.
Propel requires all tables to have a primary key.
294: [exec] [phingcall] /usr/share/php/propel_generator-1.3/
build-propel.xml:198:1: Table 'nuke_admin_module' does not have a
primary key defined. Propel requires all tables to have a primary
key.
295: [exec] Execution of target "sql" failed for the following
reason: /usr/share/php/propel_generator-1.3/build-propel.xml:182:22:
Execution of the target buildfile failed. Aborting.
296: [exec] [phingcall] /usr/share/php/propel_generator-1.3/
build-propel.xml:182:22: Execution of the target buildfile failed.
Aborting.
297: [exec] Execution of target "main" failed for the following
reason: /usr/share/php/propel_generator-1.3/build-propel.xml:92:22:
Execution of the target buildfile failed. Aborting.
298: [exec] [phing] /usr/share/php/propel_generator-1.3/
build-propel.xml:92:22: Execution of the target buildfile failed.
Aborting.
299: [exec]
300: [exec] BUILD FINISHED
301: [exec]
302: [exec] Total time: 1.4320 second
303: [exec]
304: [echo] Propel code generation complete.
305: [echo] Activating propel in application delegate...
306: [reflexive] Applying reflexive processing to 1 files.
307: [echo] Done adding Propel support.
308: [echo] New Project setup complete.
309:
310: BUILD FINISHED
311:
312: Total time: 2 minutes 8.66 seconds
313:
luke@debian2:~/phocoa_projects$ ./fix-schema.php Warning:
Propel::include(/home/luke/phocoa_projects/test6_3/test6_3/conf/
test6_3-conf.php): failed to open stream: No such file or directory
in /usr/share/php/propel-1.3/Propel.php on line 268

Warning: Propel::include(): Failed opening '/home/luke/phocoa_projects/
test6_3/test6_3/conf/test6_3-conf.php' for inclusion (include_path='/
usr/share/php/phocoa:/home/luke/phocoa_projects/test6_3/test6_3:/home/
luke/phocoa_projects/test6_3/test6_3/classes:.:/usr/share/php:/usr/
share/php/Smarty-2.6.26:/usr/share/php/SssS:/usr/share/pear:/usr/share/
php/propel-1.3') in /usr/share/php/propel-1.3/Propel.php on line 268

Fatal error: Uncaught exception 'PropelException' with message 'Unable
to open configuration file: '/home/luke/phocoa_projects/test6_3/
test6_3/conf/test6_3-conf.php'' in /usr/share/php/propel-1.3/
Propel.php:270
Stack trace:
#0 /usr/share/php/propel-1.3/Propel.php(304): Propel::configure('/home/
luke/phoc...')
#1 /home/luke/phocoa_projects/test6_3/test6_3/classes/
MyWebApplicationDelegate.php(21): Propel::init('/home/luke/phoc...')
#2 /usr/share/php/phocoa/framework/WFWebApplication.php(316):
MyWebApplicationDelegate->initialize()
#3 /usr/share/php/phocoa/framework/WFWebApplication.php(110):
WFWebApplication->initialize()
#4 /usr/share/php/phocoa/framework/WFWebApplication.php(174):
WFWebApplication->init()
#5 /usr/share/php/phocoa/framework/bootstrap.php(35):
WFWebApplication::sharedWebApplication()
#6 /home/luke/phocoa_projects/test6_3/test6_3/conf/webapp.conf(69):
require_once('/usr/share/php/...')
#7 /home/luke/phocoa_projects/fix-schema.php(13): require_once('/home/
luke/phoc...')
#8 {main}
thrown in /usr/share/php/propel-1.3/Propel.php on line 270


On Dec 12, 5:34 pm, Alan Pinstein <apinst...@mac.com> wrote:
> Yeah, I have not tested at all against 1.4.0. I wouldn't be able to  
> advise on that at the moment..
>

Alan Pinstein

unread,
Dec 14, 2009, 11:20:30 AM12/14/09
to phocoa...@googlegroups.com
Here's your problem.

> following reason: /usr/share/php/propel_generator-1.3/build-
> propel.xml:
> 198:1: Table 'nuke_admin_module' does not have a primary key defined.
> Propel requires all tables to have a primary key.
> 294: [exec] [phingcall] /usr/share/php/propel_generator-1.3/
> build-propel.xml:198:1: Table 'nuke_admin_module' does not have a
> primary key defined. Propel requires all tables to have a primary
> key.

Mostly you're running into Propel issues, not Phocoa issues...

Alan


SwissalpS

unread,
Dec 14, 2009, 7:33:52 PM12/14/09
to phocoa users
yes, propel 1.3 - the timestamp issue has been sitting there for 18
months now, the changes don't address the issue
guess development is going into 1.4 and 1.5

well I cleared out tables not containing indexes and all columns with
timestamps.

then in Propel.php around line 348 I had to add

self::autoload('PropelConfiguration');

and now your fix-schema.php runs without error, I have a bunch of
generated classes ... finally looks like what I was expecting :-)
Reply all
Reply to author
Forward
0 new messages