Re: URL problem

2011-04-11 Thread peterhf
OK. I copied my CakePHP application to a remote host and
it runs perfectly, I didn't change anything.

Conclusion -> something in my environment is causing the
problem.

Environment: Mac Mini 10.6.7, CakePHP 1.3.8 located in /Library/
WebServer/Dpcuments/TEST-admin/, Apache_2.2.17

I suspect a bug in apache.

Thanks again to all who suggested solutions.

On Apr 10, 4:19 pm, peterhf  wrote:
> Yes, cricket, you are correct. I tried to access the directory in my
> Uii
> application that is supposed to be protected by an .htaccess
> condition and I was successful. Should have tried it a long time ago!
>
> I am looking again at the httpd.conf file contents with some help
> from someone that knows nore about apache access than I do.
> Stand by for updates.
>
> On Apr 10, 3:46 pm, cricket  wrote:
>
>
>
>
>
>
>
> > On Sun, Apr 10, 2011 at 3:01 PM, peterhf  wrote:
> > > It appears to me that you, Ryan, have some "industrial strength"
> > > eperience
> > > with the issue of apache being able to do things. Thanks for you
> > > comments.
>
> > > I am trying to use the CakePHP programming framework to develop
> > > an application. the application cannot find files and images at it is
> > > supposed to. CakePHP has some other ideas about what the httpd.conf
> > > and .htaccess files sould contain. See my first post. (small typepo:
> > > translate "TEST-dev" into "TEST-admin"). The snippet of the
> > > httpd.conf
> > > below is taken the CakePHP manual and it is what I currently have in
> > > the conf file.
>
> > > In my post just before yours, mention that I am running and
> > > application
> > > developed in the Yii framework and it does not have any problem
> > > with the httpd.conf setup. It is interesting that the only .htaccess
> > > in the
> > > Yii framework contains only "Deny from all" to protect only one
> > > directory.
>
> > > I posted a "bug" ticket to the CalePHP bug system and they concluded
> > > that the CakePHP software is not to blame and that I have a mod_write
> > > configuration error.
>
> > Again, this is not a CakePHP bug. The problem lies entirely with the
> > fact that your mod_rewrite rules are not being seen. This is
> > apparently because apache is not reading your .htaccess files. I know
> > nothing about the Yii framework but I'm confident that the fact it
> > works for you has no bearing on this issue.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-10 Thread peterhf
Yes, cricket, you are correct. I tried to access the directory in my
Uii
application that is supposed to be protected by an .htaccess
condition and I was successful. Should have tried it a long time ago!

I am looking again at the httpd.conf file contents with some help
from someone that knows nore about apache access than I do.
Stand by for updates.

On Apr 10, 3:46 pm, cricket  wrote:
> On Sun, Apr 10, 2011 at 3:01 PM, peterhf  wrote:
> > It appears to me that you, Ryan, have some "industrial strength"
> > eperience
> > with the issue of apache being able to do things. Thanks for you
> > comments.
>
> > I am trying to use the CakePHP programming framework to develop
> > an application. the application cannot find files and images at it is
> > supposed to. CakePHP has some other ideas about what the httpd.conf
> > and .htaccess files sould contain. See my first post. (small typepo:
> > translate "TEST-dev" into "TEST-admin"). The snippet of the
> > httpd.conf
> > below is taken the CakePHP manual and it is what I currently have in
> > the conf file.
>
> > In my post just before yours, mention that I am running and
> > application
> > developed in the Yii framework and it does not have any problem
> > with the httpd.conf setup. It is interesting that the only .htaccess
> > in the
> > Yii framework contains only "Deny from all" to protect only one
> > directory.
>
> > I posted a "bug" ticket to the CalePHP bug system and they concluded
> > that the CakePHP software is not to blame and that I have a mod_write
> > configuration error.
>
> Again, this is not a CakePHP bug. The problem lies entirely with the
> fact that your mod_rewrite rules are not being seen. This is
> apparently because apache is not reading your .htaccess files. I know
> nothing about the Yii framework but I'm confident that the fact it
> works for you has no bearing on this issue.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-10 Thread peterhf
It appears to me that you, Ryan, have some "industrial strength"
eperience
with the issue of apache being able to do things. Thanks for you
comments.

I am trying to use the CakePHP programming framework to develop
an application. the application cannot find files and images at it is
supposed to. CakePHP has some other ideas about what the httpd.conf
and .htaccess files sould contain. See my first post. (small typepo:
translate "TEST-dev" into "TEST-admin"). The snippet of the
httpd.conf
below is taken the CakePHP manual and it is what I currently have in
the conf file.

In my post just before yours, mention that I am running and
application
developed in the Yii framework and it does not have any problem
with the httpd.conf setup. It is interesting that the only .htaccess
in the
Yii framework contains only "Deny from all" to protect only one
directory.

I posted a "bug" ticket to the CalePHP bug system and they concluded
that the CakePHP software is not to blame and that I have a mod_write
configuration error.

On Apr 10, 9:05 am, Ryan Schmidt  wrote:
> On Apr 10, 2011, at 10:33, peterhf wrote:
>
> > You're not so bad! This is in /private/etc/apache2/httpd.conf:
> > # Each directory to which Apache has access can be configured with respect
> > # to which services and features are allowed and/or disabled in that
> > # directory (and its subdirectories).
> > #
> > # First, we configure the "default" to be a very restrictive set of
> > # features.
> > #
> > 
> >    Options FollowSymLinks
> >    AllowOverride All
> > #    Order deny,allow
> > #    Deny from all
> > 
>
> The purpose of the  block is to deny Apache access to the entire 
> server. That's what you want. This block should stay exactly as it was. 
> Consulting my /etc/apache2/original/httpd.conf, you should set this block 
> back to:
>
> 
>     Options FollowSymLinks
>     AllowOverride None
>     Order deny,allow
>     Deny from all
> 
>
> Then, in subsequent Directory blocks, you'll relax those restrictions, for 
> the specific areas of your hard disk that you do want Apache to have access 
> to. For example the very next block in the default httpd.conf says:
>
> 
>     #
>     # Possible values for the Options directive are "None", "All",
>     # or any combination of:
>     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI 
> MultiViews
>     #
>     # Note that "MultiViews" must be named *explicitly* --- "Options All"
>     # doesn't give it to you.
>     #
>     # The Options directive is both complicated and important.  Please see
>     #http://httpd.apache.org/docs/2.2/mod/core.html#options
>     # for more information.
>     #
>     Options Indexes FollowSymLinks MultiViews
>
>     #
>     # AllowOverride controls what directives may be placed in .htaccess files.
>     # It can be "All", "None", or any combination of the keywords:
>     #   Options FileInfo AuthConfig Limit
>     #
>     AllowOverride None
>
>     #
>     # Controls who can get stuff from this server.
>     #
>     Order allow,deny
>     Allow from all
>
> 
>
> That is to say, in the directory /Library/WebServer/Documents (where your web 
> site documents are), Apache is allowed to read the files (the Order and Allow 
> directives) and will print directory listings and serve multiviews if 
> available (the Options directive). You also want .htaccess files to be 
> processed in this directory, so you should change "AllowOverride None" to 
> "AllowOverride All" in this block.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-10 Thread peterhf
You're not so bad! This is in /private/etc/apache2/httpd.conf:
# Each directory to which Apache has access can be configured with
respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#

Options FollowSymLinks
AllowOverride All
#Order deny,allow
#Deny from all


I have googled this problem on my OS and there are
many people who have had this problem. They seem
to have solved the problem. I have done all of the
things they have, not success. I must have not
crossed a "t" or dotted an "i" somewhere.

BTW, I am running an application written in Yii
my machine which that works fine. The only
.htaccess anywhere in their system has a
"Deny from all" to protect one directory.

On Apr 9, 9:36 pm, cricket  wrote:
> On Sun, Apr 10, 2011 at 12:08 AM, Ryan Schmidt
>
>  wrote:
> > On Apr 9, 2011, at 22:20, cricket wrote:
> >> On Sat, Apr 9, 2011 at 10:43 PM, peterhf wrote:
> >>> As to the last two suggestions, this has been the result. First, My
> >>> computer is running 10.6.7, the Drupal article pertained to 10.4.
> >>> I have developed twoapplications in CakePHP on my iMac running
> >>> 10.4 without problems. Also there are only two httpd.conf files on
> >>> my computer, one in /private/etc/apache2/ and on in
> >>> /private/etc/apache2/original/. I did an sudo find and found only
> >>> those two files.
>
> >> httpd.conf is the main configuration file. Per the Drupal article,
> >> there may be others. Is there a sites directory?
>
> > That part of the article is referring to the directory structure found on 
> > Mac OS X
> > Server, not on Mac OS X client. httpd.conf is the file to edit on Mac OS X 
> > client.
>
> My bad. Peter, are you sure you're reloading apache? Or that you're
> editing the correct  block?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
In /private/etc/apache2/ there is a directory "users" which contains
a file "my_name.conf. This file contains:


Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all


On Apr 9, 8:20 pm, cricket  wrote:
> On Sat, Apr 9, 2011 at 10:43 PM, peterhf  wrote:
> > My deepest thanks to all of you for your consideration. This process
> > has been most exasperating and disappointing and you suggestions
> > have been a great help.
>
> > As to the last two suggestions, this has been the result. First, My
> > computer is running 10.6.7, the Drupal article pertained to 10.4.
> > I have developed twoapplications in CakePHP on my iMac running
> > 10.4 without problems. Also there are only two httpd.conf files on
> > my computer, one in /private/etc/apache2/ and on in
> > /private/etc/apache2/original/. I did an sudo find and found only
> > those two files.
>
> httpd.conf is the main configuration file. Per the Drupal article,
> there may be others. Is there a sites directory?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
My deepest thanks to all of you for your consideration. This process
has been most exasperating and disappointing and you suggestions
have been a great help.

As to the last two suggestions, this has been the result. First, My
computer is running 10.6.7, the Drupal article pertained to 10.4.
I have developed twoapplications in CakePHP on my iMac running
10.4 without problems. Also there are only two httpd.conf files on
my computer, one in /private/etc/apache2/ and on in
/private/etc/apache2/original/. I did an sudo find and found only
those two files.

Second, I changed the httpd.conf file in /private/etc/apache2/
original/
only out of desparation. I have removed the modification that I
had made -> problem persists.

On Apr 9, 6:29 pm, Ryan Schmidt  wrote:
> On Apr 9, 2011, at 19:02, peterhf wrote:
>
> > On my OS 10.6.7, there are two httpd.conf files. One in /private/etc/
> > apache2/
> > and /private/etc/apache2/original/. I have set AllowOverride to All in
> > both.
>
> Understand that the files in /etc/apache2/original are meant to be the 
> original files, as provided by Apple, and are not meant to ever be edited by 
> you. You should undo any changes you made to the files in the "original" 
> directory.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
On my OS 10.6.7, there are two httpd.conf files. One in /private/etc/
apache2/
and /private/etc/apache2/original/. I have set AllowOverride to All in
both.
Yesterday, I posted a bug ticket which included details of everything
that
I have tried. I received an email and post in the bug system stating
that
there is nothing wrong with the code and that the problem is a
mod_rewrite
error on my part. I went to the book for 1.3, section 3.3.4 and
reviewed
the two pages of mod_rewrite configuration detailed there. I could
find
no differences there from what I had already implemented.

Today I downloaded CakePHP 1.3.7, installed it -> same problem.

I have installed and used previous versions of CakePHP without this
problem. In fact they worked pretty much right out-of-the-box. I am
now
looking at Yii or developing this application in PHP "longhand".

On Apr 9, 11:09 am, Ryan Schmidt  wrote:
> On Apr 9, 2011, at 12:46, cricket wrote:
>
> >> Where else could  AllowOverride be set to None?
>
> > The only time I've installed Apache on a mac was in a system with X
> > installed, so it was pretty non-standard. But have a look at this
> > page:
> >http://foundationphp.com/tutorials/php_leopard.php
>
> > It seems to be either:
> > /private/etc/httpd/users
> > /private/etc/Apache2/users
>
> Mac OS X 10.6 Snow Leopard's httpd.conf file is in /etc/apache2. I believe 
> it's the same for Mac OS X 10.5 Leopard. On Mac OS X 10.4 and earlier, it 
> should be in /etc/httpd.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-09 Thread peterhf
My mistake. TEST-dev is the name of the database used with this app.
http://localhost/TEST-admin/ returns the app.

I put this in the ...app/webroot/.htaccess,restarted -> same problem.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
dfskjsdsadjfsddfl
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


Does this mean that this file is not being read by apache?

Where else could  AllowOverride be set to None?

On Apr 8, 9:31 pm, cricket  wrote:
> On Fri, Apr 8, 2011 at 11:35 PM, peterhf  wrote:
> >http://localhost/TEST-admin/produces the first page on the
> > application, a login page.
>
> I just noticed that you used TEST-admin but also mentioned a TEST-dev.
> Could this be it?
>
> In any case, I posted a reply to someone else this evening about
> setting up virtual hosts and local subdomains. If you're interested
> and want more info let me know.
>
> > debug is set to 2.
>
> What about this in your layout?
>
> debug(CSS_URL); debug(JS_URL);
>
> > AllowOverride was set to 'none', I set it to "All" and restarted the
> > computer -> problem persists.
>
> That would have done it. Just to be sure they're being read, type some
> garbage text on a new line in one of them and refresh. If your server
> doesn't keel over then AllowOverride is still set to None somewhere.
>
> Actually, to be really sure, type it in the one inside the webroot
> dir. Whether your DocumentRoot is TEST-dev, TEST-dev/app, or
> TEST-dev/app/webroot, the last one should be read (if they're being
> read at all).

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: URL problem

2011-04-08 Thread peterhf
http://localhost/TEST-admin/ produces the first page on the
application, a login page.

debug is set to 2.

AllowOverride was set to 'none', I set it to "All" and restarted the
computer -> problem persists.

I have to use .htaccess files as the application will be put on a
remote host. Now it is on my local machine.

mod_rewrite is enabled.

I am running another application written in the Yii framework, works
fine.

On Apr 8, 5:16 pm, cricket  wrote:
> On Fri, Apr 8, 2011 at 8:07 PM, peterhf  wrote:
> > Environment: Mac Mini 10.6.7, CakePHP 1.3.8 located in /Library/
> > WebServer/Dpcuments/TEST-admin/, Apache/2.2.17
>
> > What I expect is that $html->css( 'site_style' ) in the  of my
> > layout page will find the file "site_style.css" in the app/webroot/
> > css/ directory. It is not found. If I use $html->css( '/app/webroot/
> > css/style_style' ), the file is found.
>
> > Also, if I use $html->script( 'site_javascript' ) in the  on my
> > layout page the the file is not found. If I use $html->script( '/app/
> > webroot/js/site_javascript' ) the file is found.
>
> Odd. Put debug(CSS_URL); debug(JS_URL); somewhere in your layout.
>
> > Lastly, I created a login view with this form tag:  > id="UserLoginForm" method="post" action="/TEST-admin/users/login"
> > accept-charset="utf-8">. When the form is submitted, this is the
> > message that is returned: "The requested URL /TEST-admin/users/login
> > was not found on this server.".
>
> > Sounds like a mod_rewrite problem to me but can't spot the problem.
>
> Is TEST-admin a routing prefix?
>
> Also, note that Cake throws a 404 on errors if debug is set to 0. IOW,
> looking for a routing problem may be a red herring.
>
>
> > These are the "out of the box" CakePHP htaccess files,  I never laid a
> > hand on any of them!
>
> > /TEST-dev:
> > 
> >   RewriteEngine on
> >   RewriteRule    ^$ app/webroot/    [L]
> >   RewriteRule    (.*) app/webroot/$1 [L]
>
> > /TEST-dev/app/:
> > 
> >    RewriteEngine on
> >    RewriteRule    ^$    webroot/    [L]
> >    RewriteRule    (.*) webroot/$1    [L]
>
> > /TEST-dev/app/webroot/:
> > 
> >    RewriteEngine On
> >    RewriteCond %{REQUEST_FILENAME} !-d
> >    RewriteCond %{REQUEST_FILENAME} !-f
> >    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>
> > Any thoughts?
>
> Are you certain that mod_rewrite is enabled? What about .htaccess
> support? Make sure you don't have AllowOverride none in your Apache
> conf.
>
> ... However, if you do have access to the live server's Apache conf,
> you're better off disabling htaccess and putting the rewrite rules in
> there. But get this working first before doing that.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


URL problem

2011-04-08 Thread peterhf
Environment: Mac Mini 10.6.7, CakePHP 1.3.8 located in /Library/
WebServer/Dpcuments/TEST-admin/, Apache/2.2.17

What I expect is that $html->css( 'site_style' ) in the  of my
layout page will find the file "site_style.css" in the app/webroot/
css/ directory. It is not found. If I use $html->css( '/app/webroot/
css/style_style' ), the file is found.

Also, if I use $html->script( 'site_javascript' ) in the  on my
layout page the the file is not found. If I use $html->script( '/app/
webroot/js/site_javascript' ) the file is found.

Lastly, I created a login view with this form tag: . When the form is submitted, this is the
message that is returned: "The requested URL /TEST-admin/users/login
was not found on this server.".

Sounds like a mod_rewrite problem to me but can't spot the problem.

These are the "out of the box" CakePHP htaccess files,  I never laid a
hand on any of them!

/TEST-dev:

   RewriteEngine on
   RewriteRule^$ app/webroot/[L]
   RewriteRule(.*) app/webroot/$1 [L]

/TEST-dev/app/:

RewriteEngine on
RewriteRule^$webroot/[L]
RewriteRule(.*) webroot/$1[L]

/TEST-dev/app/webroot/:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

Any thoughts?




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Strange folders in CakePHP 1.2.

2009-04-10 Thread peterhf

I am referring to the folders which now appear in the "layouts" folder
in
CakePHP version 1.2. I don't that these folders appeared in 1.1.

I don't understand why one would put a JavaScript file in the "js"
folder
in the "layouts" folder when JavaScript files are supposed to be
placed in the "webroot/js" folder.

On Apr 10, 5:11 pm, Miles J  wrote:
> Well the rss/xml layouts would simply be the declarations at the top.
>
> 
> 
>   
> 
> 
> 
>
> As for the js, im not really sure.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Strange folders in CakePHP 1.2.

2009-04-10 Thread peterhf

I have been unable to find a reference which explains the use  of the
"js", "rss" and "xml" directories in the "layouts" directory in 1.2.
Will someone point me to such a reference?

Thanks for your help.

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHP mail() function not working in 1.1.19.6305

2009-02-09 Thread peterhf

Thank you all for your consideration and especially you, Gonzalo, for
this solution to my problem. I do not have access to php.ini as it is
on
the hosting server. In addition, as I stated in my original post, a
"plain
vanilla" PHP file containing a call to the mail function works.

I have decided to address the issue be upgrading to v1.2.1.8004 and
try the Email Component.

Peter -

On Feb 9, 9:11 am, Gonzalo Servat  wrote:
> On Mon, Feb 9, 2009 at 2:58 PM, peterhf  wrote:
>
> > > Why not update to 1.2?
>
> > This is plan B, the client doesn't want to upgrade at this time.
>
> > > What error message do you have?
>
> > None! And debug is set to 3.
>
> This might actually be related to the sendmail wrapper (provided the mail
> function is enabled in php.ini). I had this exact problem just recently on a
> cPanel server and after looking the apache log, I found an error message
> saying sendmail couldn't be called directly, or something along those lines.
> If you *are* running cPanel, you have to turn off the following setting in
> exim: "Track email origin through X-Source email headers". This setting
> causes the sendmail binary to be "wrapped" by a Perl script which tracks the
> email origin before calling the real sendmail binary. If you're not using
> cPanel, you might still want to check if the path to sendmail is a wrapper
> or a real sendmail (or equivalent) binary. If it is wrapped, try either
> changing the path to sendmail in php.ini to the real sendmail binary *or*
> renaming the wrapper and placing the real sendmail binary in its place.
>
> Good luck.
>
> - Gonzalo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHP mail() function not working in 1.1.19.6305

2009-02-09 Thread peterhf

> Why not update to 1.2?

This is plan B, the client doesn't want to upgrade at this time.

> What error message do you have?

None! And debug is set to 3.

On Feb 9, 7:10 am, Marcelo Andrade  wrote:
> On Sun, Feb 8, 2009 at 11:04 PM, peterhf  wrote:
>
> > This code is not working:
>
> >    $result = mail('peter.f...@sbcglobal.net', 'This is a test.',
> > 'This is a test.', 'From: peter.f...@sbcglobal.net' );
>
> >    // Show the login page.
> >    $this->redirect( '/pages/home' );
> >    exit();
>
> > If I echo $result, I get a "1".
>
> > I have tried commenting out the redirect and exit code to no avail. I
> > have tested the host email capability with this code:
>
> >  > echo mail( 'peter.f...@sbcglobal.net', 'TEST', 'TEST');
> > ?>
>
> > and it works.
>
> > What am I missing?
>
> What error message do you have?
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE (aka "eleKtron")
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> [...@pará ~]# linkshttp://pa.slackwarebrasil.org/
>
> For Libby's backstory be told on 
> Losthttp://www.petitiononline.com/libby423/petition.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: PHP mail() function not working in 1.1.19.6305

2009-02-08 Thread peterhf

I'm using 1.1.19.x, I don't think that the Email Component is
available in this version.

Peter -

On Feb 8, 7:09 pm, Kyle Decot  wrote:
> Have you tried using the Email Component?
>
> http://api.cakephp.org/class/email-component
>
> On Feb 8, 9:04 pm, peterhf  wrote:
>
> > This code is not working:
>
> >     $result =mail('peter.f...@sbcglobal.net', 'This is a test.',
> > 'This is a test.', 'From: peter.f...@sbcglobal.net' );
>
> >     // Show the login page.
> >     $this->redirect( '/pages/home' );
> >     exit();
>
> > If I echo $result, I get a "1".
>
> > I have tried commenting out the redirect and exit code to no avail. I
> > have tested the host email capability with this code:
>
> >  > echomail( 'peter.f...@sbcglobal.net', 'TEST', 'TEST');
> > ?>
>
> > and it works.
>
> > What am I missing?
>
> > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



PHP mail() function not working in 1.1.19.6305

2009-02-08 Thread peterhf

This code is not working:

$result = mail('peter.f...@sbcglobal.net', 'This is a test.',
'This is a test.', 'From: peter.f...@sbcglobal.net' );

// Show the login page.
$this->redirect( '/pages/home' );
exit();

If I echo $result, I get a "1".

I have tried commenting out the redirect and exit code to no avail. I
have tested the host email capability with this code:



and it works.

What am I missing?

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Populating a selectTag using jQuery AJAX

2008-09-18 Thread peterhf

First, thank you both, teknoid and hydra12, for your contributions.
They got me headed in the right direction.

BTW, this version of the JavaScript only displays the xml text in an
alert for testing purposes.

Second, this is working for me:
-
In the JavaScript:

function display_select_event()
{
  // Get the selected campaign ID.
  var select_obj   =
document.getElementById( 'select_campaign' );
  var selected_campaign_id =
select_obj.options[select_obj.selectedIndex].value;

  // Get the events for this campaign.
  $.get( 'get_events/' + selected_campaign_id, { }, function( xml )
{ alert( xml ); }, 'XML' );

  // Make the select event opject visible.
  document.getElementById( 'select_event_A' ).style.visibility =
'visible';
}
-
In the controller:

  function get_events( $campaign_id )
  {
$this->layout = 'ajax';

$conditions = array( 'CampaignID' => $campaign_id );
$fields = array( 'CEventID', 'Name' );
$result = $this->Event->findAll( $conditions, $fields, null,
null, 1, null );

if( count( $result ) )
{
  $xml = '';

  foreach( $result as $key => $value )
  {
foreach( $value as $id => $name )
$xml .= '';
$xml .= '' . $value['Event']['CEventID'] . '';
$xml .= '' . $value['Event']['Name'] . '';
$xml .= '';
  }
}
else
{
  // What if there are no events for this campaign.
}

$this->set( 'xml', $xml );
  }
-
In the view ( get_events.thtml ):


-
In the layout ( ajax.thtml ):


-

Many thanks,

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Populating a selectTag using jQuery AJAX

2008-09-17 Thread peterhf

Using:
CakePHP 1.1.19.6305
jquery-1.2.6.min.js

In the view:

select a
campaign: selectTag( 'Campaign/CampaignID', $options_C, null, array( 'onchange'
=> 'display_select_event()','id' => 'select_campaign' ), null, true,
false ); ?>

In the JavaScript:

function display_select_event()
{
  .
  .
  .
  // get the events for this campaign.
  $.get( 'Attendance/get_events', { campaign_id: selected_index },
function( xml ) { alert( xml  ); }, 'XML' );
  .
  .
  .
}

In the controller:

  function get_events( $campaign_id )
  {
$conditions = array( 'CampaignID' => $campaign_id );
$fields = array( 'CEventID', 'Name' );
$result = $this->Event->findAll( $conditions, $fields, null, null,
1, null );

if( count( $result ) )
{
  $xml = '';

  foreach( $result as $key => $value )
  {
foreach( $value as $id => $name )
$xml .= '';
$xml .= '' . $value['Event']['CEventID'] . '';
$xml .= '' . $value['Event']['Name'] . '';
$xml .= '';
  }
}
else
{
  // What if there are no events for this campaign.
}
  }

The function, get_events(), produces the correct, well-formed XML
document. But Cake is complaining about the missing view for
"get_event" and the jQuery is not returning the XML document produced
by get_events().

A link to an example of what I am trying to do would be sufficient and
greatly appreciated but if you spot the errors in my code that would
be appreciated also.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ACL manager in 1.2.0.6311-beta

2008-03-03 Thread peterhf

Thanks for the tip, its working.

Peter -

On Mar 3, 3:10 pm, aranworld <[EMAIL PROTECTED]> wrote:
> On windows, open up the command prompt.
>
> Navigate to cake\console
>
> Type "cake acl help" to get started.
>
> If you need to create the database tables, then you are supposed to
> type:
>
> "cake schema run create DbAcl"
>
> However, when I do this I get an error about schema.php not being
> found.
>
> You can also navigate to:
>
> cake\console\libs\templates\skel\config\sql\db_acl.sql
>
> If you plan on manually creating the tables using this db_acl.sql
> file, you will need to make sure that the _create, _read, _update,
> _delete cols in the aros_acos section have a default of null rather
> than 0.  If those columns have a default of '0', then you will have
> errors with the grant and allow command.
>
> -Aran
>
> On Mar 3, 1:27 pm, peterhf <[EMAIL PROTECTED]> wrote:
>
> > How does one run the ACL manager in this version of CakePHP? The
> > tutorial that I am using refers to a "scripts" directory in the "cake"
> > directory. This directory does not exist in my copy of this version.
>
> > Peer -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



ACL manager in 1.2.0.6311-beta

2008-03-03 Thread peterhf

How does one run the ACL manager in this version of CakePHP? The
tutorial that I am using refers to a "scripts" directory in the "cake"
directory. This directory does not exist in my copy of this version.

Peer -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



What does "__" mean?

2008-03-02 Thread peterhf

Just Baked my first Cake and I am looking at the code produced.

What does the "__" mean in the following contexts:

 or link(__('New Product',
true), array('action'=>'add')); ?>?

I suspect that I am the only on this list who doesn't know the answer!

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: A Philosophical Question and a Practical Question

2008-02-13 Thread peterhf

Your comments have indeed helped to clarify things, MX. I'm going to
digest the ideas that all of you have offered. Thank you all.

When I started this project, I put all the methods for both Projects
and Roles in one controller "Industry". It works but has bothered me.
I'll do the next project differently.

Peter -

On Feb 12, 7:31 pm, MX <[EMAIL PROTECTED]> wrote:
> The probem with your concept is very simple, and dont be ashme to be
> new. We all were at some point. :D
>
> The problem is that in Cake each controller should have the CRUD
> (Create, Read, Update, Delete) functions for A model.
> You have an Industry controller. Industry in your case should be your
> application.
>
> You now have to create at least two controllers: Projects, Roles.
> Each of these will control homonymous Model.
>
> You can use bake (command line which comes with Cake) to produce the
> Models and Controllers for you.
>
> Hope I cleared out something.
>
> On Feb 13, 2:14 am, peterhf <[EMAIL PROTECTED]> wrote:
>
> > I have a controller called "Industry". In Industry, I have methods
> > that create, edit and delete "Projects", the data for which are stored
> > in the "projects" table modeled by the "Project" model. In Industry I
> > also have methods that create, edit and delete "Roles", the data for
> > which are stored in the "roles" table modeled by the "Role" model.
> > There are many other methods in the Industry controller which do
> > similar things. Therefore, I have a long string in $user = ;
>
> > BTW, I am sure that it is obvious that I am new to CakePHP. This
> > dialog is most helpful to me.
>
> > Peter -
>
> > On Feb 12, 5:13 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
>
> > > Thequestionthat must be made is: why you have a controller that includes
> > > many models?
>
> > > A controller, in principle, must deal with all the operations of only one
> > > model.
> > > You can have many models but on the same controller, but they should have
> > > relations with the model. So if you do not have relations need to use the
> > > $uses, if have relations you can access the models by
> > > $this->Model1->RelationedModel1-> doAnything ().
>
> > > It is how I think and how I do.
>
> > > []'s
>
> > > On Feb 12, 2008 10:45 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > My questions are motivated by the fact that I have a controller which
> > > > includes a sizable number of methods. The result is that I must have a
> > > > long list of Models at the beginning of the class. It is often the
> > > > case that there is a method that only stores data from an input view
> > > > and then either "$this->render()"s a new view or "$this->setAction()"s
> > > > another method in the same controller which displays a new view. I
> > > > thought that calling a method in another controller might be more
> > > > efficient.
>
> > > > On Feb 12, 4:29 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> > > > > On Feb 12, 2008 7:18 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hello All,
>
> > > > > >PhilosophicalQuestion:
>
> > > > > > If my application requires a large number of methods is it "better" 
> > > > > > to
> > > > > > include them all in one controller or is it "better" to put each
> > > > > > method, or at least a small number of related methods, in individual
> > > > > > controllers?
>
> > > > > I think it would depend, for one thing, upon whether the methods are
> > > > > used by many different controllers or not. Common convenience
> > > > > functions can be placed in bootstrap.php to make them globally
> > > > > available.
>
> > > > > > PracticalQuestion:
>
> > > > > > If the methods are in individual controllers, how do I call a method
> > > > > > in controller "A" from controller "M"? Controller "M"  stores some
> > > > > > data, for instance, and controller "A" displays a view.
>
> > > > > Perhaps you'd be better off creating a number of components that a
> > > > > controller can load as necessary.
>
> > > --
> > > Renan Gonçalves - Software Engineer
> > > Cell Phone: +55 (11) 8633-6018
> > > MSN: [EMAIL PROTECTED]
> > > Web Site: renangoncalves.com
> > > São Paulo - SP/Brazil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: A Philosophical Question and a Practical Question

2008-02-12 Thread peterhf

I have a controller called "Industry". In Industry, I have methods
that create, edit and delete "Projects", the data for which are stored
in the "projects" table modeled by the "Project" model. In Industry I
also have methods that create, edit and delete "Roles", the data for
which are stored in the "roles" table modeled by the "Role" model.
There are many other methods in the Industry controller which do
similar things. Therefore, I have a long string in $user = ;

BTW, I am sure that it is obvious that I am new to CakePHP. This
dialog is most helpful to me.

Peter -

On Feb 12, 5:13 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
> The question that must be made is: why you have a controller that includes
> many models?
>
> A controller, in principle, must deal with all the operations of only one
> model.
> You can have many models but on the same controller, but they should have
> relations with the model. So if you do not have relations need to use the
> $uses, if have relations you can access the models by
> $this->Model1->RelationedModel1-> doAnything ().
>
> It is how I think and how I do.
>
> []'s
>
> On Feb 12, 2008 10:45 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > My questions are motivated by the fact that I have a controller which
> > includes a sizable number of methods. The result is that I must have a
> > long list of Models at the beginning of the class. It is often the
> > case that there is a method that only stores data from an input view
> > and then either "$this->render()"s a new view or "$this->setAction()"s
> > another method in the same controller which displays a new view. I
> > thought that calling a method in another controller might be more
> > efficient.
>
> > On Feb 12, 4:29 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> > > On Feb 12, 2008 7:18 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > Hello All,
>
> > > > Philosophical Question:
>
> > > > If my application requires a large number of methods is it "better" to
> > > > include them all in one controller or is it "better" to put each
> > > > method, or at least a small number of related methods, in individual
> > > > controllers?
>
> > > I think it would depend, for one thing, upon whether the methods are
> > > used by many different controllers or not. Common convenience
> > > functions can be placed in bootstrap.php to make them globally
> > > available.
>
> > > > Practical Question:
>
> > > > If the methods are in individual controllers, how do I call a method
> > > > in controller "A" from controller "M"? Controller "M"  stores some
> > > > data, for instance, and controller "A" displays a view.
>
> > > Perhaps you'd be better off creating a number of components that a
> > > controller can load as necessary.
>
> --
> Renan Gonçalves - Software Engineer
> Cell Phone: +55 (11) 8633-6018
> MSN: [EMAIL PROTECTED]
> Web Site: renangoncalves.com
> São Paulo - SP/Brazil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: A Philosophical Question and a Practical Question

2008-02-12 Thread peterhf

My questions are motivated by the fact that I have a controller which
includes a sizable number of methods. The result is that I must have a
long list of Models at the beginning of the class. It is often the
case that there is a method that only stores data from an input view
and then either "$this->render()"s a new view or "$this->setAction()"s
another method in the same controller which displays a new view. I
thought that calling a method in another controller might be more
efficient.

On Feb 12, 4:29 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> On Feb 12, 2008 7:18 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello All,
>
> > Philosophical Question:
>
> > If my application requires a large number of methods is it "better" to
> > include them all in one controller or is it "better" to put each
> > method, or at least a small number of related methods, in individual
> > controllers?
>
> I think it would depend, for one thing, upon whether the methods are
> used by many different controllers or not. Common convenience
> functions can be placed in bootstrap.php to make them globally
> available.
>
> > Practical Question:
>
> > If the methods are in individual controllers, how do I call a method
> > in controller "A" from controller "M"? Controller "M"  stores some
> > data, for instance, and controller "A" displays a view.
>
> Perhaps you'd be better off creating a number of components that a
> controller can load as necessary.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



A Philosophical Question and a Practical Question

2008-02-12 Thread peterhf

Hello All,

Philosophical Question:

If my application requires a large number of methods is it "better" to
include them all in one controller or is it "better" to put each
method, or at least a small number of related methods, in individual
controllers?

Practical Question:

If the methods are in individual controllers, how do I call a method
in controller "A" from controller "M"? Controller "M"  stores some
data, for instance, and controller "A" displays a view.

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing CakePHP value to JavaScript

2008-02-04 Thread peterhf

That was a typo, Nate, it was just "flag" in my code.

The problem turned out to be one of bad coding! flag was being
reassigned elsewhere in JS.

Thanks Nate and Dardo, for your comments as they motivated me to look
at my code in greater detail and ultimately find my error.

Peter -

On Feb 4, 1:46 pm, nate <[EMAIL PROTECTED]> wrote:
> alert($flag); should be alert(flag);
>
> On Feb 4, 1:31 pm, peterhf <[EMAIL PROTECTED]> wrote:
>
> > I am trying to pass a value created in a controller to a JS on the
> > target view.
>
> > $this->set('flag', 1); is in the controller.
>
> > var flag = ; is in the JS. I have also tried  > $flag ?> and .
>
> > An alert($flag); statement in the JS displays nothing.
>
> > A search of this subject on Google retrieves numerous posts stating
> > that this works in non-CakePHP PHP code.
>
> > What am I doing wrong?
>
> > Using CakePHP 1.1.13.4450.
>
> > Thanks for an help offered.
>
> > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing CakePHP value to JavaScript

2008-02-04 Thread peterhf

This is exactly what I am doing ( see my original post ); the problem
is that the JS variable "flag" is not being set.

Peter -

On Feb 4, 11:22 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> I'm really confused, this is what i do:
>
> controller:
>
> $this->set('flag', 1);
>
> view:
>
> 
> var flag = "<?php echo $flag; ?>";
>
> alert(flag);
> 
>
> On Feb 4, 2008 5:12 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > 0 or 1 depending on the value in set().
>
> > Peter -
>
> > On Feb 4, 10:54 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > > try a pr($flag); and see what you get
>
> > > On Feb 4, 2008 4:51 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > The html is being rendered as though the flag variable was 0 even
> > > > though is set to 1 in the controller.
>
> > > > Peter -
>
> > > > On Feb 4, 10:45 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > > > > render the page using your favorite browser, then use the browser's
> > > > > "view source" function to see what you get. Then paste here if
> > > > > required.
>
> > > > > On Feb 4, 2008 4:43 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > > > I don't quite understand your question. The "flag" value, 1 or 0, is
> > > > > > used in the JS to toggle the display or not to display a div in the
> > > > > > html of the view.
>
> > > > > > Peter -
>
> > > > > > On Feb 4, 10:36 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > > > > > > and what did you get rendered in the html?
>
> > > > > > > On Feb 4, 2008 4:31 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > I am trying to pass a value created in a controller to a JS on 
> > > > > > > > the
> > > > > > > > target view.
>
> > > > > > > > $this->set('flag', 1); is in the controller.
>
> > > > > > > > var flag = ; is in the JS. I have also tried 
> > > > > > > >  > > > > > > > $flag ?> and .
>
> > > > > > > > An alert($flag); statement in the JS displays nothing.
>
> > > > > > > > A search of this subject on Google retrieves numerous posts 
> > > > > > > > stating
> > > > > > > > that this works in non-CakePHP PHP code.
>
> > > > > > > > What am I doing wrong?
>
> > > > > > > > Using CakePHP 1.1.13.4450.
>
> > > > > > > > Thanks for an help offered.
>
> > > > > > > > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing CakePHP value to JavaScript

2008-02-04 Thread peterhf

0 or 1 depending on the value in set().

Peter -

On Feb 4, 10:54 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> try a pr($flag); and see what you get
>
> On Feb 4, 2008 4:51 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > The html is being rendered as though the flag variable was 0 even
> > though is set to 1 in the controller.
>
> > Peter -
>
> > On Feb 4, 10:45 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > > render the page using your favorite browser, then use the browser's
> > > "view source" function to see what you get. Then paste here if
> > > required.
>
> > > On Feb 4, 2008 4:43 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > I don't quite understand your question. The "flag" value, 1 or 0, is
> > > > used in the JS to toggle the display or not to display a div in the
> > > > html of the view.
>
> > > > Peter -
>
> > > > On Feb 4, 10:36 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > > > > and what did you get rendered in the html?
>
> > > > > On Feb 4, 2008 4:31 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > > > I am trying to pass a value created in a controller to a JS on the
> > > > > > target view.
>
> > > > > > $this->set('flag', 1); is in the controller.
>
> > > > > > var flag = ; is in the JS. I have also tried  > > > > > $flag ?> and .
>
> > > > > > An alert($flag); statement in the JS displays nothing.
>
> > > > > > A search of this subject on Google retrieves numerous posts stating
> > > > > > that this works in non-CakePHP PHP code.
>
> > > > > > What am I doing wrong?
>
> > > > > > Using CakePHP 1.1.13.4450.
>
> > > > > > Thanks for an help offered.
>
> > > > > > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing CakePHP value to JavaScript

2008-02-04 Thread peterhf

The html is being rendered as though the flag variable was 0 even
though is set to 1 in the controller.

Peter -

On Feb 4, 10:45 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> render the page using your favorite browser, then use the browser's
> "view source" function to see what you get. Then paste here if
> required.
>
> On Feb 4, 2008 4:43 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > I don't quite understand your question. The "flag" value, 1 or 0, is
> > used in the JS to toggle the display or not to display a div in the
> > html of the view.
>
> > Peter -
>
> > On Feb 4, 10:36 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> > > and what did you get rendered in the html?
>
> > > On Feb 4, 2008 4:31 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> > > > I am trying to pass a value created in a controller to a JS on the
> > > > target view.
>
> > > > $this->set('flag', 1); is in the controller.
>
> > > > var flag = ; is in the JS. I have also tried  > > > $flag ?> and .
>
> > > > An alert($flag); statement in the JS displays nothing.
>
> > > > A search of this subject on Google retrieves numerous posts stating
> > > > that this works in non-CakePHP PHP code.
>
> > > > What am I doing wrong?
>
> > > > Using CakePHP 1.1.13.4450.
>
> > > > Thanks for an help offered.
>
> > > > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing CakePHP value to JavaScript

2008-02-04 Thread peterhf

I don't quite understand your question. The "flag" value, 1 or 0, is
used in the JS to toggle the display or not to display a div in the
html of the view.

Peter -

On Feb 4, 10:36 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> and what did you get rendered in the html?
>
> On Feb 4, 2008 4:31 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am trying to pass a value created in a controller to a JS on the
> > target view.
>
> > $this->set('flag', 1); is in the controller.
>
> > var flag = ; is in the JS. I have also tried  > $flag ?> and .
>
> > An alert($flag); statement in the JS displays nothing.
>
> > A search of this subject on Google retrieves numerous posts stating
> > that this works in non-CakePHP PHP code.
>
> > What am I doing wrong?
>
> > Using CakePHP 1.1.13.4450.
>
> > Thanks for an help offered.
>
> > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Passing CakePHP value to JavaScript

2008-02-04 Thread peterhf

I am trying to pass a value created in a controller to a JS on the
target view.

$this->set('flag', 1); is in the controller.

var flag = ; is in the JS. I have also tried  and .

An alert($flag); statement in the JS displays nothing.

A search of this subject on Google retrieves numerous posts stating
that this works in non-CakePHP PHP code.

What am I doing wrong?

Using CakePHP 1.1.13.4450.

Thanks for an help offered.

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to set the default value of a textarea?

2007-12-19 Thread peterhf

Thanks for the reply. I am using 1.1.13.4450. I tried setting 'value'
=> 'something' in the html attributes array and it worked. Apparently,
I had done something wrong before.

Peter -

On Dec 18, 5:05 pm, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> On Dec 18, 2007 9:30 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > In an html textarea object, the default value is set between the begin
> > tag and the end tag, i.e. default value. How does
> > one set the default value of $html->textarea(...)? $html->extarea()
> > does not recognize a 'value' attribute in the html attribute array.
>
> Peter,
>
> What version of Cake are you using? At least on 1.1.15, inside the
> textarea() function in the libs/view/helpers/html.php file, if you set the
> 'value' key in the $htmlAttributes array, it should be set as the value
> between the textarea tags (unless you've created a app/config/tags.ini.php
> file in which case you'd need to make sure the last %s is between the
> textarea tags)
>
> - Gonzalo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to set the default value of a textarea?

2007-12-18 Thread peterhf

In an html textarea object, the default value is set between the begin
tag and the end tag, i.e. default value. How does
one set the default value of $html->textarea(...)? $html->extarea()
does not recognize a 'value' attribute in the html attribute array.

Thanks in advance for all suggestions.

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $ajax->submit and JavaScript

2007-11-30 Thread peterhf

At the present time, when a button which is an ajax submit is clicked,
control is transferred to the JavaScript that checks for correctly
populated required fields. If there is a required field that is not
correctly populated, an alert box is displayed. When the alert box is
closed, the ajax request proceeds with incorrect data. I want the ajax
http request aborted if the JavaScript finds a problem with the data.

Peter -

On Nov 30, 3:52 pm, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> Why don't you do the validation on the same page using javascript if
> you're going that route. Otherwise, you will have to use the model
> validation and let the controller method complete what it needs to.
> if($this->Model->create($this->data) && $this->Model->validates()) {
>  if($this->Model->save($this->data)) {
>$this->redirect('/somewhere');
>exit;
>  } else {
>   throw new Exception("Could not save the user data!");
>  }} else {
>
>  $this->render();
>  exit;
>
> }
>
> On Nov 30, 3:45 pm, peterhf <[EMAIL PROTECTED]> wrote:
>
> > How does one execute a JS script before the html request is made and
> > halt the request based on some condition in the JS? For instance, I
> > wish to check that required fields are correctly populated; if any
> > required field is not correctly populated, I want to show an alert and
> > return to the page without completing the http request. I am using the
> > 'before' option in the submit but have not discovered how to stop the
> > request from completing.
>
> > Thanks in advance for your suggestions.
>
> > Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



$ajax->submit and JavaScript

2007-11-30 Thread peterhf

How does one execute a JS script before the html request is made and
halt the request based on some condition in the JS? For instance, I
wish to check that required fields are correctly populated; if any
required field is not correctly populated, I want to show an alert and
return to the page without completing the http request. I am using the
'before' option in the submit but have not discovered how to stop the
request from completing.

Thanks in advance for your suggestions.

Peter -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model not found?

2007-08-19 Thread peterhf

Right on! I have a list of nine other models used by the
talent_controller and I had forgotten to add the TalentDelail model to
the list!

"The devil is in the details"!!

Thanks for your help.

Peter -

On Aug 19, 3:40 pm, housebolt <[EMAIL PROTECTED]> wrote:
> The name of your model doesn't correspond with your controller.
>
> Your controller name should be talent_detail_controller if you want to
> keep it that way, but I'm guessing you want it to show up in your
> browser as /talent/.
>
> So, in order to fix this you'll want to add $uses =
> array('TalentDetail'); to the top of your controller.
>
> Your controller would look like this:
>
>  class TalentController extends AppController {
> $name = 'Talent';
> $uses = array('TalentDetail');
> $components ...}
>
> ?>
>
> $uses will then load talentdetail as a variable you can use in your
> controller.
>
> Hope this helps :)
> housebolt
>
> On Aug 19, 2:22 pm, peterhf <[EMAIL PROTECTED]> wrote:
>
> > A table in the db: talent_details
>
> > The model:
>
> > class TalentDetail extends AppModel
> > {
> >   var $name = 'TalentDetail';
> >   var $primaryKey = 'recordID';
>
> > }
>
> > In the controller talent_controller:
>
> > $this->TalentDetail->id = 10;
> > $result = $this->TalentDetail->exits();
>
> > Result:
>
> > Fatal error: Call to undefined function: exists() in /home/myact1/
> > public_html/cake/app/controllers/talent_controller.php on line 260
>
> > I had previously tried:
>
> > $conditions = array('userID' => 10);
> > $result = $this->TalentDetail->find($conditions, 'recordID', null,
> > null);
>
> > Result:
>
> > Fatal error: Call to undefined function in /home/myact1/public_html/
> > cake/app/controllers/talent_controller.php on line 258
>
> > It would appear that my model is not being recognized.
>
> > Thoughts?
>
> > Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Model not found?

2007-08-19 Thread peterhf

A table in the db: talent_details

The model:

class TalentDetail extends AppModel
{
  var $name = 'TalentDetail';
  var $primaryKey = 'recordID';
}

In the controller talent_controller:

$this->TalentDetail->id = 10;
$result = $this->TalentDetail->exits();

Result:

Fatal error: Call to undefined function: exists() in /home/myact1/
public_html/cake/app/controllers/talent_controller.php on line 260

I had previously tried:

$conditions = array('userID' => 10);
$result = $this->TalentDetail->find($conditions, 'recordID', null,
null);

Result:

Fatal error: Call to undefined function in /home/myact1/public_html/
cake/app/controllers/talent_controller.php on line 258

It would appear that my model is not being recognized.

Thoughts?

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Updating an existing db record.

2007-08-19 Thread peterhf

I got it, "$this->User->recordID = $userID;" should read "$this->User-
>id = $userID;".

Peter -

On Aug 19, 10:07 am, peterhf <[EMAIL PROTECTED]> wrote:
> I though that I understood how Nodel::save works but I am unable to
> get an update to work.
>
> class User extends AppModel
> {
>var $name   = 'User';
>var $primaryKey = 'recordID';
>
> }
>
> In a controller I have this:
>
> $this->User->recordID = $userID;
> $this->User->save($this->data['User'], true, array());
>
> where $userID has been assigned previously assigned to a valid record
> ID.
>
> This code produces an INSERT instead of an UPDATE.
>
> What am I doing wrong?
>
> Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Updating an existing db record.

2007-08-19 Thread peterhf

I though that I understood how Nodel::save works but I am unable to
get an update to work.

class User extends AppModel
{
   var $name   = 'User';
   var $primaryKey = 'recordID';
}

In a controller I have this:

$this->User->recordID = $userID;
$this->User->save($this->data['User'], true, array());

where $userID has been assigned previously assigned to a valid record
ID.

This code produces an INSERT instead of an UPDATE.

What am I doing wrong?

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Complex SQL statement

2007-08-07 Thread peterhf

Worked perfectly! I looked at "$this->ModelName->query("the SQL
string");" in the manual but didn't try it! Thanks both of you for you
help.

Peter -

On Aug 6, 8:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Thats a subquery - and while the newer mysql4.1 and above now supports
> subqueries - cakephp uses a left inner join by default - if you want
> the speed and performance of the subquery youll have to use
>   $this->ModelName->query("the SQL string");
> otherwise read the manual/api on setting up query conditions and let
> cake build it with the join
>
> On Aug 6, 4:04 pm, Langdon Stevenson <[EMAIL PROTECTED]> wrote:
>
> > Hi Peter
>
> > > I would appreciate someone pointing me to a reference which explains
> > > how to code something like this in CakePHP:
>
> > The "conditions" section of the manual (in the Models page from memory)
> > covers the creation of complex conditions in queries.  I don't see
> > anything in your query that Cake can't handle.
>
> > If there is a problem, you could also just use
>
> >$this->ModelName->query("the SQL string");
>
> > To run the query that you posted, this is not recommended though.
>
> > Regards,
> > Langdon


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Complex SQL statement

2007-08-06 Thread peterhf

I would appreciate someone pointing me to a reference which explains
how to code something like this in CakePHP:

SELECT user_photos.name
FROM user_photos
WHERE user_photos.userID IN (
 SELECT users.recordID
 FROM users,
user_additions
 WHERE (
 
users.type = "F"
AND
users.status = "1"
AND
users.recordID IN (
 
SELECT user_additions.userID
 
FROM user_additions
 
WHERE (
 
user_additions.genre = "Alternative"
 
AND user_additions.gender = "F"
 
AND user_additions.age BETWEEN "15" AND "45"
LIMIT 0, 100;

This statements works correctly in the database and I have models
UserPhoto, User and UserAddition.

Thanks for any help.

Regards,

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Calling functions in a Controller

2007-07-31 Thread peterhf

Thanks for the reply, Grant. The "$this->function build_resume()" is a
typo, I did indeed try "$this->build_resume()". Your comment about
"$sequence=null" is appropriate but more importantly it pointed me in
another direction which will lead to a solution of the underlying
problem - that build_resume() needs to render the correct view.

Peter -

On Jul 30, 9:01 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> I would recommend learning the basics of PHP before getting into
> CakePHP.  Many people already experienced with PHP find a steep
> learning curve.
>
> When you want to call another function from inside the same object,
> use $this->function_name(), not $this->function function_name();  eg:
> $this->build_resume()
>
> The error about "sequence is not defined" is because you have not
> provided a default value for the $sequence parameter, and you are not
> passing one one from the request.  Change it to
> function move_up( $sequence=null )
> and it will fix the error.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Calling functions in a Controller

2007-07-30 Thread peterhf

CakePHP 1.13.4450, PHP 4.4.4

Controller A includes multiple functions, two of which are

function build_resume()
{
  .
  .
  .
}

and later in the code,

function move_up($sequence)
{
  .
  .
  .
  $this->function build_resume();
}

When move_up is called from a view, a notice that "sequence" is not
defined in line 1 of function move_up()!! function build_resume() does
not call function move_up() , ever!

What am I doing wrong?

I tried just "function build_resume();" instead of "$this-
>function ..." and got a message that function build_resume() was not
defined even though it precedes function move_up() in the code.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Model::saveField not updating

2007-07-30 Thread peterhf

Well, Grant, you tip is the solution and it worked perfectly! Thanks a
million!!

On Jul 30, 4:16 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> If "recordID" is your primary key in the database table (not "id"),
> then you should have
>
> var $primaryKey = 'recordID';
>
> in your model file.  Then you can have
>
> $this->ResumeCredit->id = $recordIDofPrevious;
> $this->ResumeCredit->saveField( ... );
>
> The ->id attribute always means "the models primary key", which by
> default is set to the field "id".  Changing the $primaryKey var will
> change what this ->id attribute points to in the database, but you
> still should not use ->recordID.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Model::saveField not updating

2007-07-30 Thread peterhf

Using cakePHP 1.1.13.4450 and PHP 4.4.4

This code snippet:

$recordIDofPrevious = 1;
$sequence = 2;

$this->ResumeCredit->recordID = $recordIDofPrevious;

$this->ResumeCredit->saveField('sequence', $sequence, false);

produces a SQL INSERT instead of an UPDATE; a new record is created
in the table with the 'sequence' field set to '2'!! (debug level 3)

Per a posting on this group, '$this->ResumeCredit->id =
$recordIDofPrevious;'
was tried with the same result.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing values to renderElement

2007-07-22 Thread peterhf

Of course!! Thanks for the help. BTW, had to change "id" to something
else as it was conflicting with another "id".

Peter -

On Jul 20, 3:53 pm, francky06l <[EMAIL PROTECTED]> wrote:
> renderElement('representation_type_select', array('id' => $id))
>
> On Jul 20, 8:26 pm, peterhf <[EMAIL PROTECTED]> wrote:
>
> > I have an, representation_type_select.thtml, which consists of a
> > selectTag.
>
> >  > $html->selectTag(
> > $model_name . '/type_' . $id,
> > array(
> >   'option_1' => 'option_1',
> >   .
> >   .
> >   .
> >   'option_n' => 'option_nr'
> >),
> >   '',
> >   array('id' => 'type_' . $id, 'size' => '6',
> > 'multiple' => 'multiple', 'class' => 'classname'),
> >   null,
> >   false,
> >   false
> > );
> > ?>
>
> > This select tag is used multiple times in a form and its name needs to
> > be different for each use, therefore the "$id" variable. The
> > $model_name is set in the controller and appears correctly in the
> > rendered html. However, I have not been able successfully pass the
> > value of $id to the $this->renderElement('representation_type_select'). The 
> > value of $id does
>
> > not appear as a postfix to either 'type_' in the html. I tried  > $id = '1'; echo $this->renderElement('representation_type_select'); ?>
>
> > Thanks in advance for any suggestions.
>
> > Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Passing values to renderElement

2007-07-20 Thread peterhf

I have an, representation_type_select.thtml, which consists of a
selectTag.

selectTag(
$model_name . '/type_' . $id,
array(
  'option_1' => 'option_1',
  .
  .
  .
  'option_n' => 'option_nr'
   ),
  '',
  array('id' => 'type_' . $id, 'size' => '6',
'multiple' => 'multiple', 'class' => 'classname'),
  null,
  false,
  false
);
?>

This select tag is used multiple times in a form and its name needs to
be different for each use, therefore the "$id" variable. The
$model_name is set in the controller and appears correctly in the
rendered html. However, I have not been able successfully pass the
value of $id to the $this-
>renderElement('representation_type_select'). The value of $id does
not appear as a postfix to either 'type_' in the html. I tried renderElement('representation_type_select'); ?>

Thanks in advance for any suggestions.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: session handling via "database"

2007-06-26 Thread peterhf

I agree that gc must be working on my site, so I must be
misinterpreting how gc works here.

I'm using CakePHP so PHP is running.

Thanks for the help.

Peter -

On Jun 26, 12:01 pm, jyrgen <[EMAIL PROTECTED]> wrote:
> hmmm. what sort of auth system are you using ?
> keep in mind that php needs to be running in order to call
> gc. there's not going to be a gc call without noboby using
> the site.
> do you have alternative accounts for testing ?
>
> try the following : reload your login page a couple of
> times (consider increasing the gc probability). check then
> if thesessiontable has been emptied.
>
> i don't quite believe that gc is not happening on your site.
> but make sure it is before diving deeper into thesessionmechanism.
>
> best, jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: session handling via "database"

2007-06-26 Thread peterhf

Yesterday afternoon I posted a reply to Chris' post but apparently my
post was lost!

I had emptied the session table of all entries and registered a new
user for the site. A session record was inserted into the session
table for that user. That record is still in the table this morning.
It is though that garbage collection while using "database" is not set
for any time interval or for a very long interval.

What am I missing?

Peter -

On Jun 26, 5:54 am, jyrgen <[EMAIL PROTECTED]> wrote:
> hi,
>
> usually there is no need to modify your php.ini, because it comes
> with session_handling set to *php*. garbage collection happens
> automatically.
>
> however you have access to certain parameters, for example
>
> ini_set("session.gc_probability",1);
> ini_set("session.gc_divisor",100);
>
> will set the garbage collection probability to 1/100
>
> cheers, jyrgen


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



session handling via "database"

2007-06-25 Thread peterhf

I have looked at the "session management via a database table"
postings on this list including the excellent one at "session handling
set to 'database'". However, I did not find one that pointed me in the
desired direction. It is my belief that I do not have access to the
"php.ini" file that is referenced in the posting. Therefore, how do I
go about "garbage collecting" the expired sessions that are stored in
the database table on the host?

Thanks for your help.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Files

2007-06-07 Thread peterhf

You are correct, the tmp directory is outside the Cake directory
structure. I solved the problem by bypassing the fopen function and
moving the file to a local directory. Thanks for the help.

Peter -

On Jun 3, 10:02 am, francky06l <[EMAIL PROTECTED]> wrote:
> Are you sure the tmp you are accessing is into the cake folder ?
> Regarding the message it seems that /tmp/tmpfile is at the root not in
> your htdocs ...
> Try to log the complete file name, but I am quite sure your file name
> does not contains the WEBROOT directory and thus pointing to a /tmp
> (root) not at htdoc/tmp
>
> Hope this helps
>
> On Jun 3, 2:53 am, peterhf <[EMAIL PROTECTED]> wrote:
>
> > The file that is being opened is, I believe,  in cake/app/tmp/ so why
> > is the server not allowing opening a file within the cake framework?
>
> > On Jun 2, 3:22 pm, Travis Cline <[EMAIL PROTECTED]> wrote:
>
> > > This is not CakePHP specific:
>
> > > seehttp://www.google.com/search?q=+open_basedir+restriction


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Working with image files

2007-06-06 Thread peterhf

Thank you both for your insite and opinions. They are greatly
appreciated.

After struggling for a day with the image-in-the-database paradigm,
I'm going to try the image-in-the-directory paradigm!

Regards,

Peter -

On Jun 6, 2:38 pm, AD7six <[EMAIL PROTECTED]> wrote:
> peterhf wrote:
> > I have been influenced by the argument given a sites such as
> >http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/. There
> > is a logic to me, that having the image and the data surrounding the
> > image are in one place, not devided between two places which would
> > require attention to not allowing the two from becoming out of sync.
>
> > I am certainly open to opposing views as I am new to dealing with
> > large quantities of images.
>
> I'll chuck an opinion in :).
>
> Sticking large numbers of image files in a db is handy in that the
> data is all in one place, but awful from several other perspectives.
> Storing the file path/meta data in the db so you know where things are
> and you can treat them as an object (i.e. link a user to an image or
> whatever) makes sense; to me putting the image data in the db is just
> an overcomplex means of achieving an inefficient solution. Unless you
> have a very good reason to do so, and it would have to be a reason
> that serving image files (which are outside of the webroot) with php
> doesn't solve, it would be best avoided.
>
> disadvantages I can think of:
>
> 1) Php serving an image is slower than just letting apache doing it,
> and significantly more so if you have to get the image source from the
> db.
> 2) You add dependencies to the db (and php if appropriate) you
> otherwise don't have to serve images
> 3) php's image functions work only on files afaik
> 4) It's going to take up more space in a db than it would on the file
> system
> 5) A db field has a size limit per file, a file system doesn't
>
> I'm sure there are more. If anyone has one of those "very good
> reason"s I'm game to be enlightened ;).
>
> hth,
>
> AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Working with image files

2007-06-06 Thread peterhf

I have been influenced by the argument given a sites such as
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/. There
is a logic to me, that having the image and the data surrounding the
image are in one place, not devided between two places which would
require attention to not allowing the two from becoming out of sync.

I am certainly open to opposing views as I am new to dealing with
large quantities of images.

On Jun 6, 1:43 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 6/6/07, peterhf <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am developing a community site in which members can upload photos of
> > themselves for display on their page. My plan is to store the image
> > files in a database. When a photo is need for display, it is retrieved
> > from the database and stored in a directory in the Cake directory
> > structure. It can them be displayed on the page using "$html-
> > >image()".
>
> Why bother with the middle step of retrieving from the database and
> storing in a directory?  If you write the file to the filesystem as
> soon as you've uploaded and verified that it's a valid image, you can
> cache it for display using a variety of methods (Cake and non-Cake).
>
> I've never understood why people would store images in a database
> rather than the file system.  Is there an advantage to this?
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Working with image files

2007-06-06 Thread peterhf

I am developing a community site in which members can upload photos of
themselves for display on their page. My plan is to store the image
files in a database. When a photo is need for display, it is retrieved
from the database and stored in a directory in the Cake directory
structure. It can them be displayed on the page using "$html-
>image()".

I have two questions:

1. How do I use the Fle->delete() to delete the image from the
directory (some time after it has been displayed)?
(I have looked as several postings that used the delete function but
don't fully understand how it works)

2. Is there any way to use the image directly from the database search
without placing it in the directory?

Thanks in advance for any help offered.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Files

2007-06-02 Thread peterhf

The file that is being opened is, I believe,  in cake/app/tmp/ so why
is the server not allowing opening a file within the cake framework?

On Jun 2, 3:22 pm, Travis Cline <[EMAIL PROTECTED]> wrote:
> This is not CakePHP specific:
>
> seehttp://www.google.com/search?q=+open_basedir+restriction


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem Uploading Files

2007-06-02 Thread peterhf

I am developing a CakePHP application, located on a hosting machine,
in which the user can upload a picture. When I select a file locted on
my local machine and click the "submit" button, this message appears:

Warning: fopen(): open_basedir restriction in effect. File(/tmp/
php7SiAeY) is not within the allowed path(s): (/vservers/domain_name)
in /vservers/lomain_name/htdocs/cake/app/controllers/
users_controller.php on line 178

The referenced line of code is: $fileData =
addslashes(fread(fopen($this->params['form']['File']['tmp_name'],
"r"), $this->params['form']['File']['size']));

My suspicion is that some parameter in the CakePHP needs to be set.
Can someone point me to a solution to this problem.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



selectTag

2007-05-10 Thread peterhf

How do I set one specific option as "SELECTED"?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using an image as the source for a submit button.

2007-05-03 Thread peterhf

This code produced the standard html submit button - no image.

On May 3, 3:31 pm, gwoo <[EMAIL PROTECTED]> wrote:
> ok, for 1.1 you need:
> submit('submit', array('src' => $this->webroot . 'img/
> submit.gif',
> 'height' => '15', 'width' => '64')); ?>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using an image as the source for a submit button.

2007-05-03 Thread peterhf

1.1.13.4450

On May 3, 2:42 pm, gwoo <[EMAIL PROTECTED]> wrote:
> what version of Cake?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using an image as the source for a submit button.

2007-05-03 Thread peterhf

This works: image('submit.gif', array('onclick' =>
"JavaScript: submit();")); ?>

On May 3, 2:19 pm, peterhf <[EMAIL PROTECTED]> wrote:
> Thanks for the help; I entered the code that you suggested and got
> this:
>
> Fatal error: Call to undefined function: webroot() ...
>
> On May 3, 1:54 pm, gwoo <[EMAIL PROTECTED]> wrote:
>
> > look at the generated source and your problem should be quite evident.
>
> > try:
> > submit('submit', array('src' => $html->webroot('img/
> > submit.gif'),
> > 'height' => '15', 'width' => '64')); ?>
>
> > should work.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using an image as the source for a submit button.

2007-05-03 Thread peterhf

Thanks for the help; I entered the code that you suggested and got
this:

Fatal error: Call to undefined function: webroot() ...


On May 3, 1:54 pm, gwoo <[EMAIL PROTECTED]> wrote:
> look at the generated source and your problem should be quite evident.
>
> try:
> submit('submit', array('src' => $html->webroot('img/
> submit.gif'),
> 'height' => '15', 'width' => '64')); ?>
>
> should work.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Using an image as the source for a submit button.

2007-05-03 Thread peterhf

I'm trying to display a button for a form submit button. This isn't
working for me:

submit('submit', array('src' => $html->image('submit.gif'),
'height' => '15', 'width' => '64'); ?>

What am I doing wrong?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Session question.

2007-04-14 Thread peterhf

Is it not the PagesController that renders thtml files stored the
pages directory? And how do I reference session variables in the .../
pages/...thtml file?

Peter -

On Apr 14, 5:33 pm, "savagekabbage" <[EMAIL PROTECTED]> wrote:
> A thtml file is a view, not a controller =)
>
> On Apr 14, 7:59 pm, "peterhf" <[EMAIL PROTECTED]> wrote:
>
> > I have created a thtml file and placed it in the /pages/ directory. In
> > the file I have "if ($this->Session->check('function')) ...". The
> > following error message appears: "Fatal error: Call to a member
> > function on a non-object in ..." which points to the line containing
> > the "...Session->check".
>
> > I thought that the Session Component was available to every Cake
> > controller including the PagesController.
>
> > Where have I gone wrong?
>
> > Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Session question.

2007-04-14 Thread peterhf

I have created a thtml file and placed it in the /pages/ directory. In
the file I have "if ($this->Session->check('function')) ...". The
following error message appears: "Fatal error: Call to a member
function on a non-object in ..." which points to the line containing
the "...Session->check".

I thought that the Session Component was available to every Cake
controller including the PagesController.

Where have I gone wrong?

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $html->css doesn't find the file.

2007-04-12 Thread peterhf

Problem solved => resolved to problems with the ".htaccess" files in /
app and /app/webroot.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



$html->css doesn't find the file.

2007-04-12 Thread peterhf

I moved a cake application from a hosting server where the application
resided in the "public_html" directory, to my Macintosh 10.4.8
machine. On the server, I had renamed the main "cake" directory to
"public_html" and had renamed the given "public_html" directory to
"public_html_ORG".

On the Mac, the cake directory renamed to "public_html" resides in /
Library/WebServer/Documents/. Therefore, "http://localhost/
public_html/" produces the home page of the application. However, the
"$html->css" and "$html->image" commands no longer retrieve the css or
image files.

Any thoughts will be most welcomed.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How do I point my domain to a specific view?

2007-04-07 Thread peterhf

I'm certain that this question has been asked a thousand timea and
answered two thousand times! I just couldn't find it on the lists.

How to I point my domain, "http://www.my_domain_name.com/";, to a
specific view so that I don't have to do "http://
www.my_domain_name.com/view_name/".

Thanks in advance for your help.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Is "e(...)" from Cake or PHP?

2007-04-03 Thread peterhf

Will someone point me to a reference to this language feature? I have
been unable to find one in CakePHP or PHP.

Thanks for the help.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake has lost its Way!

2007-03-23 Thread peterhf

You are dead on! Worked perfectly! I am puzzled that the application
worked
early on but then stopped. However, It works now so I'm on with the
tutorial!!

Thanks for the help.

Peter -

On Mar 23, 1:30 pm, "yolabingo" <[EMAIL PROTECTED]> wrote:
> On Mar 23, 2:14 pm, "peterhf" <[EMAIL PROTECTED]> wrote:
>
> > I am working my way through the IBM "Cook up Web sites fast with
> > CakePHP" tutorial. The first part starts with the creation of a
> > database, a model, a controller and a view. The view presents a
> > registration form.
>
> > The URL to start is "http://192.168.2.3/cake/users/register";, which
> > correctly displays the registration form. When one clicks the submit
> > button on the form, a 404 page appears claiming that the page cannot
> > be found and the URL in the address bar is now "http://192.168.2.3/
> > users/register". (missing "cake").
>
> Try making the following change in /views/users/register:
>
> 
>
> or this might work as well:
> 
>
> Also make corresponding changes in your users_controller.php to these
> lines:
>
> $this->flash('Your registration information was accepted.', '/users/
> register');
> $this->flash('There was a problem with your registration.', '/users/
> register');


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake has lost its Way!

2007-03-23 Thread peterhf

I am working my way through the IBM "Cook up Web sites fast with
CakePHP" tutorial. The first part starts with the creation of a
database, a model, a controller and a view. The view presents a
registration form.

The URL to start is "http://192.168.2.3/cake/users/register";, which
correctly displays the registration form. When one clicks the submit
button on the form, a 404 page appears claiming that the page cannot
be found and the URL in the address bar is now "http://192.168.2.3/
users/register". (missing "cake").

The .htaccess file in the cake root directory contains:


   RewriteEngine on
   RewriteRule^$ app/webroot/[L]
   RewriteRule(.*) app/webroot/$1 [L]


The httpd.conf file on my iMac contains:


Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all


The controller file, users_controller.php, contains:

class UsersController extends AppController
{
  function register()
  {
if (!empty($this->params['form']))
{
  if ($this->User->save($this->params['form']))
  {
$this->flash('Your registration information was accepted.', '/
users/register');
  }
  else
  {
$this->flash('There was a problem with your registration.', '/
users/register');
  }
}
else
{
  // show the registration form
}
  }
}
?>

The model file, user.php, contains:



(There is a database connection "TorDB" created in the database.php
config file)

The view in ../views/users/register contains:


Please fill out the form below to register an account.
username:


password:


e-mail address:


first name:


last name:





This application worked earlier this week but has not worked the past
few days! I have tried a fresh install of CakePHP to no avail. My hope
is that someone will spot some simple error I have made somewhere! Any
suggestions?

Thanks in advance for any help provided.


Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Hello, World in CakePHP

2007-03-17 Thread peterhf

Got both the blog tutorial and the hello world tutorials working. Did
them "by the book" and they worked.

Thanks again for the suggestions.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Hello, World in CakePHP

2007-03-16 Thread peterhf

Thanks one and all for the suggestions! I'm going to give the blog
tutorial a try, wish me luck!

Regards,

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Hello, World in CakePHP

2007-03-16 Thread peterhf

I am unable to get even the simplest tutorial to work! Not even
"Hello, World"!

http://www.nospace.net/index.php?option=com_content&task=view&id=64&Itemid=36&lang=en

My environment is CakePHP 1.1.13.4450, PHP 4.4.4 on an iMac OS 10.4.8.
The Cake framework
is located in ... /WebServer/Documents/cake/. When I enter
http://192.168.2.3/cake/app/views/hello
the following message appears: (n part)

Fatal: Create the class below in file : app/controllers/
views_controller.php



If the above file is created another message appears chasing after
some other file!

Thanks in advance for any help.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Can't find the mysql.sock file.

2007-03-14 Thread peterhf

Working through my first tutorial for using Cake PHP and got this
error message:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to
local MySQL server through socket '/var/mysql/mysql.sock' (2) in /
Library/WebServer/Documents/cake/cake/libs/model/dbo/dbo_mysql.php on
line 102.  Line 102 makes no mention of the mysql.sock file.

The mysql.sock file is in the "/tmp" directory on my machine, which
file do I edit to point Cake to the correct directory?

Thanks in advance for any help.

Peter -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---