Re: issues with document root and rewrite urls
Thanks. :-) Rishab Sent from BlackBerry® on Airtel -Original Message- From: cricket Sender: cake-php@googlegroups.com Date: Mon, 28 Mar 2011 14:23:20 To: Reply-To: cake-php@googlegroups.com Subject: Re: issues with document root and rewrite urls On Mon, Mar 28, 2011 at 2:02 PM, Rishab Jain wrote: > Hi, > > I have a setup where I want the document root to set to the main > directory where my application is residing. > > Currently, the path to my directory is something like this: > /var/www/html/dev.mydomain.com/aaa/code_project/ > app/ > cake/ > index.php > plugins > README > vendors > > Now the point where all this started was when I was writing URLs for > my navigation tabs. > > For eg, to access the tab 'inbox', I wanted to write the URL in the > file to be was '/inbox/'. But when I did that, the URL actually > pointed to http://dev.mydomain.com/inbox/. I guess that means my > document root is not pointing to the code_project directory but to the > dev.mydomain.com directory. That looks correct. Maybe you typed the wrong thing? These are equivalent: http://dev.mydomain.com/inbox/ /inbox/ The only difference is that one has the full domain information. > I wrote the following line in the .htaccess file, > > > RewriteEngine on > RewriteRule ^$ app/webroot/ [L] > RewriteRule (.*) app/webroot/$1 [L] > > # this line was added by me > #DocumentRoot > /var/www/html/dev.mydomain.com/aaa/bbb/code_project/app/webroot/ > > > But, when I tried accessing the url, it gave me a 500 error. > > Can anybody help me gaining knowledge of how exactly this thing works > and how to set it all up? You're on the right track, but DocumentRoot should not be placed there. In fact, it must not appear anywhere inside an htaccess file. It belongs in the main httpd.conf or that of a virtual host. If you have the ability to edit those, do so. And also disable htaccess there as it will speed up requests moderately. -- snip -- DocumentRoot /path/to/site/app/webroot Options FollowSymLinks # disable .htaccess AllowOverride None Order allow,deny Allow from all DirectoryIndex index.php index.html # copied from app/webroot/.htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] -- snip -- -- 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 -- 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: Email Question
I have not setup any caching specifically for the email process? Does it do it without me knowing possibly? Maybe the templates are cached by Cake for x amount of time? I cannot see that being forced upon us... I have not set any cache action or anything I can think of to cache the email. K -Original Message- From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of Ryan Schmidt Sent: Tuesday, March 29, 2011 1:57 AM To: cake-php@googlegroups.com Subject: Re: Email Question On Mar 28, 2011, at 23:23, Krissy Masters wrote: > Using just the Email Component, no add ons and something weird is going on. I get the email but the HTML template wrapping the email does not change. What I mean is I send myself an email , make a change to the template upload it. Send another email and the template does not chage. I have even hardcoded in "WHAT THE HELL" and it shows up maybe 10 emails later long after I have deleted WHAT THE HELL. I am timestamping the subject so I know at 12:30 this email was sent and add a note in the email message saying hardcoded what the hell, or this should be pink , text is blue.what not so I can tell whats going on. > > But the changes and the rendering of the correct template are about 10 emails back. > > > Ideas? Yes I wait till the template has uploaded before sending. Sure I might miss 1 or 2 but 10 emails not likely. Is there caching involved? Does CakePHP perhaps cache the template for awhile before re-reading it? -- 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 -- 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: Email Question
On Mar 28, 2011, at 23:23, Krissy Masters wrote: > Using just the Email Component, no add ons and something weird is going on. I > get the email but the HTML template wrapping the email does not change. What > I mean is I send myself an email , make a change to the template upload it. > Send another email and the template does not chage. I have even hardcoded in > “WHAT THE HELL” and it shows up maybe 10 emails later long after I have > deleted WHAT THE HELL. I am timestamping the subject so I know at 12:30 this > email was sent and add a note in the email message saying hardcoded what the > hell, or this should be pink , text is blue…what not so I can tell whats > going on. > > But the changes and the rendering of the correct template are about 10 emails > back. > > > Ideas? Yes I wait till the template has uploaded before sending. Sure I might > miss 1 or 2 but 10 emails not likely. Is there caching involved? Does CakePHP perhaps cache the template for awhile before re-reading it? -- 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
Email Question
Using just the Email Component, no add ons and something weird is going on. I get the email but the HTML template wrapping the email does not change. What I mean is I send myself an email , make a change to the template upload it. Send another email and the template does not chage. I have even hardcoded in "WHAT THE HELL" and it shows up maybe 10 emails later long after I have deleted WHAT THE HELL. I am timestamping the subject so I know at 12:30 this email was sent and add a note in the email message saying hardcoded what the hell, or this should be pink , text is blue.what not so I can tell whats going on. But the changes and the rendering of the correct template are about 10 emails back. Ideas? Yes I wait till the template has uploaded before sending. Sure I might miss 1 or 2 but 10 emails not likely. K -- 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
Migrations plugin - how to generate schema diffs
So here I am kind of sutck with this migration plugin. I'm trying to generate schema diffs, followed the tutorials on the cakeDC website and doc. The first three steps are ok. I generate my first migration with cake migration generate. Then I generate a schema file with cake schema generate. Generate another migration with cake migration generate. >From now on all migrations i generate seems to be related to the schema file generated by the cakephp console on the second step above. So if table 'examples' is created on third step it still appears on every other migration I generate later. I guess it shouldnt be like that as I keep getting errors like table 'examples' already exists when I try to execute a 'cake migration all' on other workstation. Am I doing something stupid, or missing something? Any help would be appreciated. -- 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: Length of session_id()
On Mar 28, 2011, at 19:40, Simon Males wrote: >>> I'm wondering what the maximum length of session_id() can be. >> >> The length would vary depending on what you set for session.hash_function >> and session.hash_bits_per_character in php.ini. > > So hash function 0 (MD5 128bit) and hash_bits_per_characters of 4 equates to: > > 128 / 4 = 32. > > i.e. session_id key length of 32 characters? > > Additionally 128 / 5 = 25.6, which would round up to 26 characters? That sounds right to me. So the length can vary based on your php.ini settings, but as you say, 255 seems like overkill; I can't think of a combination of the settings that would result in a session id anywhere near that long. -- 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: Length of session_id()
>> I'm wondering what the maximum length of session_id() can be. >> > > The length would vary depending on what you set for session.hash_function and > session.hash_bits_per_character in php.ini. So hash function 0 (MD5 128bit) and hash_bits_per_characters of 4 equates to: 128 / 4 = 32. i.e. session_id key length of 32 characters? Additionally 128 / 5 = 25.6, which would round up to 26 characters? -- Simon Males -- 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: how to hide rewrite url in cakephp?
On Mar 28, 2011, at 08:08, pushpa nc wrote: >> Set up your DocumentRoot properly in your Apache configuration. > > But , How to do apache configuration? you mean i should do it in .htaccess > file? DocumentRoot cannot be set in an .htaccess file. You would want to edit your main Apache configuration file, the httpd.conf file. If you do not have the ability to edit your server's httpd.conf, then you may be limited in how you can set up your CakePHP app. -- 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: ODBC listSources() giving Out of Memory
On Mon, Mar 28, 2011 at 12:49 PM, mhamann wrote: > More info... > > I've been tearing apart the listSources() method in attempts to figure > out what's going on. I ran PHP's odbc_result_all() method on the > result and got a table with the correct number of rows, but with > really weird, messed up data. Instead of containing info from my DB, > it seemed to contain the names of 4 files in my dbo and datasources > directory. Looks something like this... > > TABLE_CAT > > TABLE_SCHEM > TABLE_NAME > TABLE_TYPE > REMARKS > Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// > app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ > plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ > plugins/datasources/models/datasources/soap_source.php > Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// > app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ > plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ > plugins/datasources/models/datasources/soap_source.php > Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// > app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ > plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ > plugins/datasources/models/datasources/soap_source.php > Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// > app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ > plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ > plugins/datasources/models/datasources/soap_source.php > Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// > app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ > plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ > plugins/datasources/models/datasources/soap_source.php > Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// > app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ > plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ > plugins/datasources/models/datasources/soap_source.php > > > Never seen anything like this before... Could you post some of the code itself? -- 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: issue with saving data in model
$this->create(); API: http://api13.cakephp.org/class/model#method-Modelcreate Initializes the model for writing a new record, loading the default values for those fields that are not defined in $data, and clearing previous validation errors. Especially helpful for saving data in loops. -Original Message- From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of Rishab Jain Sent: Monday, March 28, 2011 3:12 PM To: cake-php@googlegroups.com Subject: Re: issue with saving data in model Thanks Jeremy. It worked. If possible, do feed in your 2 cents on how this worked. regards, Rishab On 3/28/11, Jeremy Burns | Class Outfit wrote: > Add $this->create(); to your loop before you do the save. If not, you are > just updating the same record. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.com > http://www.classoutfit.com > > On 28 Mar 2011, at 16:21, Rishab Jain wrote: > >> Hi All, >> >> I'm facing a very weird problem. I'm trying to save data in a loop >> where 1 person is sending msg to many people.. Here's the print_r of >> the 3 arrays before I call the 'save' function in the model. >> >> Array >> ( >>[Message] => Array >>( >>[sender_uid_fk_users] => 1 >>[subject] => hey >>[body] => hey >>[recipient_uid_fk_users] => 2 >>[date] => 2011:03:28 10:52:41 >>) >> >> ) >> Array >> ( >>[Message] => Array >>( >>[sender_uid_fk_users] => 1 >>[subject] => hey >>[body] => hey >>[recipient_uid_fk_users] => 4 >>[date] => 2011:03:28 10:52:41 >>) >> >> ) >> Array >> ( >>[Message] => Array >>( >>[sender_uid_fk_users] => 1 >>[subject] => hey >>[body] => hey >>[recipient_uid_fk_users] => 6 >>[date] => 2011:03:28 10:52:41 >>) >> >> ) >> >> The only difference here is the different 'recipient_uid_fk_users' in >> all the 3 arrays with values '2', '4', and, '6'. >> >> All I'm doing then is, >> foreach(recipient...) >> { >>/// prepare $arrayMessagesInfo / >> $this->save($arrayMessagesInfo); >> } >> >> The issue I'm facing is that only the first value gets inserted, and >> the rest of the two queries becomes 'update' queries. I'm not even >> mentioning the primary key in the array. >> >> These are the cakephp debugging logs: >> >> 4 INSERT INTO `messages` (`sender_uid_fk_users`, `subject`, >> `body`, `recipient_uid_fk_users`, `date`) VALUES (1, 'hey', 'hey', 2, >> '2011:03:28 10:48:33')1 0 >> 5 SELECT LAST_INSERT_ID() AS insertID 1 1 0 >> 6 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 7 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 8 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = >> 'hey', `body` = 'hey', `recipient_uid_fk_users` = 4, `date` = >> '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 1 >> 0 >> 9 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 10 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 11 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = >> 'hey', `body` = 'hey', `recipient_uid_fk_users` = 6, `date` = >> '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 >> >> Here's the table structure: >> CREATE TABLE `messages` ( >> `id` int(10) unsigned NOT NULL AUTO_INCREMENT, >> `subject` varchar(100) NOT NULL, >> `body` varchar(500) NOT NULL, >> `sender_uid_fk_users` int(10) unsigned NOT NULL, >> `date` datetime NOT NULL, >> `recipient_uid_fk_users` int(10) unsigned NOT NULL, >> PRIMARY KEY (`id`), >> KEY `sender_uid_fk_users` (`sender_uid_fk_users`), >> KEY `recipient_uid_fk_users` (`recipient_uid_fk_users`), >> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | >> >> >> It would be great if anybody can help me out here. >> >> regards, >> Rishab >> >> -- >> 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 > > -- > 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/
Re: issue with saving data in model
There's no mystery (especially if you read the guide). As I said, if you don't include the create statement you are not creating a new record (the value of $this->id hasn't changed) therefore you stay on the first record you create or navigate to and only ever update. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 28 Mar 2011, at 18:42, Rishab Jain wrote: > Thanks Jeremy. It worked. > > If possible, do feed in your 2 cents on how this worked. > > regards, > Rishab > > On 3/28/11, Jeremy Burns | Class Outfit wrote: >> Add $this->create(); to your loop before you do the save. If not, you are >> just updating the same record. >> >> Jeremy Burns >> Class Outfit >> >> jeremybu...@classoutfit.com >> http://www.classoutfit.com >> >> On 28 Mar 2011, at 16:21, Rishab Jain wrote: >> >>> Hi All, >>> >>> I'm facing a very weird problem. I'm trying to save data in a loop >>> where 1 person is sending msg to many people.. Here's the print_r of >>> the 3 arrays before I call the 'save' function in the model. >>> >>> Array >>> ( >>> [Message] => Array >>> ( >>> [sender_uid_fk_users] => 1 >>> [subject] => hey >>> [body] => hey >>> [recipient_uid_fk_users] => 2 >>> [date] => 2011:03:28 10:52:41 >>> ) >>> >>> ) >>> Array >>> ( >>> [Message] => Array >>> ( >>> [sender_uid_fk_users] => 1 >>> [subject] => hey >>> [body] => hey >>> [recipient_uid_fk_users] => 4 >>> [date] => 2011:03:28 10:52:41 >>> ) >>> >>> ) >>> Array >>> ( >>> [Message] => Array >>> ( >>> [sender_uid_fk_users] => 1 >>> [subject] => hey >>> [body] => hey >>> [recipient_uid_fk_users] => 6 >>> [date] => 2011:03:28 10:52:41 >>> ) >>> >>> ) >>> >>> The only difference here is the different 'recipient_uid_fk_users' in >>> all the 3 arrays with values '2', '4', and, '6'. >>> >>> All I'm doing then is, >>> foreach(recipient...) >>> { >>> /// prepare $arrayMessagesInfo / >>>$this->save($arrayMessagesInfo); >>> } >>> >>> The issue I'm facing is that only the first value gets inserted, and >>> the rest of the two queries becomes 'update' queries. I'm not even >>> mentioning the primary key in the array. >>> >>> These are the cakephp debugging logs: >>> >>> 4 INSERT INTO `messages` (`sender_uid_fk_users`, `subject`, >>> `body`, `recipient_uid_fk_users`, `date`) VALUES (1, 'hey', 'hey', 2, >>> '2011:03:28 10:48:33')1 0 >>> 5 SELECT LAST_INSERT_ID() AS insertID 1 1 0 >>> 6 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >>> `Message`.`id` = 31 1 0 >>> 7 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >>> `Message`.`id` = 31 1 0 >>> 8 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = >>> 'hey', `body` = 'hey', `recipient_uid_fk_users` = 4, `date` = >>> '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 1 >>> 0 >>> 9 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >>> `Message`.`id` = 31 1 0 >>> 10 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >>> `Message`.`id` = 31 1 0 >>> 11 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = >>> 'hey', `body` = 'hey', `recipient_uid_fk_users` = 6, `date` = >>> '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 >>> >>> Here's the table structure: >>> CREATE TABLE `messages` ( >>> `id` int(10) unsigned NOT NULL AUTO_INCREMENT, >>> `subject` varchar(100) NOT NULL, >>> `body` varchar(500) NOT NULL, >>> `sender_uid_fk_users` int(10) unsigned NOT NULL, >>> `date` datetime NOT NULL, >>> `recipient_uid_fk_users` int(10) unsigned NOT NULL, >>> PRIMARY KEY (`id`), >>> KEY `sender_uid_fk_users` (`sender_uid_fk_users`), >>> KEY `recipient_uid_fk_users` (`recipient_uid_fk_users`), >>> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | >>> >>> >>> It would be great if anybody can help me out here. >>> >>> regards, >>> Rishab >>> >>> -- >>> 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 >> >> -- >> 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://group
Re: issues with document root and rewrite urls
On Mon, Mar 28, 2011 at 2:02 PM, Rishab Jain wrote: > Hi, > > I have a setup where I want the document root to set to the main > directory where my application is residing. > > Currently, the path to my directory is something like this: > /var/www/html/dev.mydomain.com/aaa/code_project/ > app/ > cake/ > index.php > plugins > README > vendors > > Now the point where all this started was when I was writing URLs for > my navigation tabs. > > For eg, to access the tab 'inbox', I wanted to write the URL in the > file to be was '/inbox/'. But when I did that, the URL actually > pointed to http://dev.mydomain.com/inbox/. I guess that means my > document root is not pointing to the code_project directory but to the > dev.mydomain.com directory. That looks correct. Maybe you typed the wrong thing? These are equivalent: http://dev.mydomain.com/inbox/ /inbox/ The only difference is that one has the full domain information. > I wrote the following line in the .htaccess file, > > > RewriteEngine on > RewriteRule ^$ app/webroot/ [L] > RewriteRule (.*) app/webroot/$1 [L] > > # this line was added by me > #DocumentRoot > /var/www/html/dev.mydomain.com/aaa/bbb/code_project/app/webroot/ > > > But, when I tried accessing the url, it gave me a 500 error. > > Can anybody help me gaining knowledge of how exactly this thing works > and how to set it all up? You're on the right track, but DocumentRoot should not be placed there. In fact, it must not appear anywhere inside an htaccess file. It belongs in the main httpd.conf or that of a virtual host. If you have the ability to edit those, do so. And also disable htaccess there as it will speed up requests moderately. -- snip -- DocumentRoot /path/to/site/app/webroot Options FollowSymLinks # disable .htaccess AllowOverride None Order allow,deny Allow from all DirectoryIndex index.php index.html # copied from app/webroot/.htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] -- snip -- -- 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
issues with document root and rewrite urls
Hi, I have a setup where I want the document root to set to the main directory where my application is residing. Currently, the path to my directory is something like this: /var/www/html/dev.mydomain.com/aaa/code_project/ app/ cake/ index.php plugins README vendors Now the point where all this started was when I was writing URLs for my navigation tabs. For eg, to access the tab 'inbox', I wanted to write the URL in the file to be was '/inbox/'. But when I did that, the URL actually pointed to http://dev.mydomain.com/inbox/. I guess that means my document root is not pointing to the code_project directory but to the dev.mydomain.com directory. I wrote the following line in the .htaccess file, RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] # this line was added by me #DocumentRoot /var/www/html/dev.mydomain.com/aaa/bbb/code_project/app/webroot/ But, when I tried accessing the url, it gave me a 500 error. Can anybody help me gaining knowledge of how exactly this thing works and how to set it all up? Thanking you guys in advance and looking forward to some replies. regards, Rishab -- 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: issue with saving data in model
Thanks Jeremy. It worked. If possible, do feed in your 2 cents on how this worked. regards, Rishab On 3/28/11, Jeremy Burns | Class Outfit wrote: > Add $this->create(); to your loop before you do the save. If not, you are > just updating the same record. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.com > http://www.classoutfit.com > > On 28 Mar 2011, at 16:21, Rishab Jain wrote: > >> Hi All, >> >> I'm facing a very weird problem. I'm trying to save data in a loop >> where 1 person is sending msg to many people.. Here's the print_r of >> the 3 arrays before I call the 'save' function in the model. >> >> Array >> ( >>[Message] => Array >>( >>[sender_uid_fk_users] => 1 >>[subject] => hey >>[body] => hey >>[recipient_uid_fk_users] => 2 >>[date] => 2011:03:28 10:52:41 >>) >> >> ) >> Array >> ( >>[Message] => Array >>( >>[sender_uid_fk_users] => 1 >>[subject] => hey >>[body] => hey >>[recipient_uid_fk_users] => 4 >>[date] => 2011:03:28 10:52:41 >>) >> >> ) >> Array >> ( >>[Message] => Array >>( >>[sender_uid_fk_users] => 1 >>[subject] => hey >>[body] => hey >>[recipient_uid_fk_users] => 6 >>[date] => 2011:03:28 10:52:41 >>) >> >> ) >> >> The only difference here is the different 'recipient_uid_fk_users' in >> all the 3 arrays with values '2', '4', and, '6'. >> >> All I'm doing then is, >> foreach(recipient...) >> { >>/// prepare $arrayMessagesInfo / >> $this->save($arrayMessagesInfo); >> } >> >> The issue I'm facing is that only the first value gets inserted, and >> the rest of the two queries becomes 'update' queries. I'm not even >> mentioning the primary key in the array. >> >> These are the cakephp debugging logs: >> >> 4 INSERT INTO `messages` (`sender_uid_fk_users`, `subject`, >> `body`, `recipient_uid_fk_users`, `date`) VALUES (1, 'hey', 'hey', 2, >> '2011:03:28 10:48:33')1 0 >> 5 SELECT LAST_INSERT_ID() AS insertID 1 1 0 >> 6 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 7 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 8 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = >> 'hey', `body` = 'hey', `recipient_uid_fk_users` = 4, `date` = >> '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 1 >> 0 >> 9 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 10 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE >> `Message`.`id` = 31 1 0 >> 11 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = >> 'hey', `body` = 'hey', `recipient_uid_fk_users` = 6, `date` = >> '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 >> >> Here's the table structure: >> CREATE TABLE `messages` ( >> `id` int(10) unsigned NOT NULL AUTO_INCREMENT, >> `subject` varchar(100) NOT NULL, >> `body` varchar(500) NOT NULL, >> `sender_uid_fk_users` int(10) unsigned NOT NULL, >> `date` datetime NOT NULL, >> `recipient_uid_fk_users` int(10) unsigned NOT NULL, >> PRIMARY KEY (`id`), >> KEY `sender_uid_fk_users` (`sender_uid_fk_users`), >> KEY `recipient_uid_fk_users` (`recipient_uid_fk_users`), >> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | >> >> >> It would be great if anybody can help me out here. >> >> regards, >> Rishab >> >> -- >> 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 > > -- > 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 > -- 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: ODBC listSources() giving Out of Memory
More info... I've been tearing apart the listSources() method in attempts to figure out what's going on. I ran PHP's odbc_result_all() method on the result and got a table with the correct number of rows, but with really weird, messed up data. Instead of containing info from my DB, it seemed to contain the names of 4 files in my dbo and datasources directory. Looks something like this... TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ plugins/datasources/models/datasources/soap_source.php Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ plugins/datasources/models/datasources/soap_source.php Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ plugins/datasources/models/datasources/soap_source.php Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ plugins/datasources/models/datasources/soap_source.php Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ plugins/datasources/models/datasources/soap_source.php Ü //app/plugins/datasources/models/datasources/dbo/dbo_db2.php Ûþ¨// app/plugins/datasources/models/datasources/dbo/dbo_adodb.php Ü (//app/ plugins/datasources/models/datasources/xmlrpc_source.php Ûý˜//app/ plugins/datasources/models/datasources/soap_source.php Never seen anything like this before... On Mar 28, 10:40 am, mhamann wrote: > Outside the CakePHP framework, the same odbc_tables() call followed by > pushing the returned values into an array (i.e. the same thing the > ODBC driver is doing) requires less than 1MB of memory. Obviously, > Cake will require more than that due to additional overhead, but I > can't see any reason for it to be pushing 526MB. I'll check with my > admins to see if they can tell what's up, but any further suggestions > regarding the issue would be most appreciated! > > On Mar 25, 6:52 pm, Ryan Schmidt wrote: > > > > > > > > > On Mar 24, 2011, at 16:31, mhamann wrote: > > > > I'm trying to access a DB2 database via ODBC and I'm getting the > > > following error when Cake attempts to list all of the tables: > > > "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried > > > to allocate 551995385 bytes)" > > > Your PHP is configured for a maximum of 32MB of memory per process, but it > > tried to allocate 526MB. This is clearly quite large, so I'd look into why > > this much memory was requested. Would the results of your query be > > enormous? Try a smaller query. -- 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: Upload Multiple images in Cakephp
Post your function upload() code, see what you have first off and the js you are using to upload with the script. Cant help if no one knows where your going wrong. K From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of Shashank Sent: Monday, March 28, 2011 1:36 PM To: cake-php@googlegroups.com Subject: Re: Upload Multiple images in Cakephp My mistake. I tried the Jquery FileUpload - http://aquantum-demo.appspot.com/file-upload... but i am not getting how to implement it. I mean i use it into my cakephp installation but i am not getting how and from where to get a databse entry of the uploaded images and also i am getting error in saving the images. On Mon, Mar 28, 2011 at 9:32 PM, Krissy Masters wrote: Not working? Ok. Now that explains it. Don't put too much effort into your question there. Would not want you to strain yourself. If you want a decent answer ask a decent question. -- 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 -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- 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 -- 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: Upload Multiple images in Cakephp
I need some help over here to resolve this issue. Its urgent...What all i need i that: 1. A user can select multiple images to upload. 2. Once he uploads all the images, they get save into the uploads folder and also i want individual entries for every image being uploaded in database. On Mon, Mar 28, 2011 at 9:41 PM, Shashank wrote: > Even if i just download the source code, and run the example index.html > file, i am getting an error like ds in my firebug " > *uncaught exception: Invalid JSON: {"name":"'.$file['name'].'","type":"'.$file['type'].'","size":"'.$file['size'].'"}'; > ?>* > **" > > I am not getting what to do now??? > > On Mon, Mar 28, 2011 at 9:36 PM, Shashank wrote: > >> My mistake. I tried the Jquery FileUpload - >> http://aquantum-demo.appspot.com/file-upload... but i am not getting how >> to implement it. I mean i use it into my cakephp installation but i am not >> getting how and from where to get a databse entry of the uploaded images and >> also i am getting error in saving the images. >> >> >> On Mon, Mar 28, 2011 at 9:32 PM, Krissy Masters < >> naked.cake.ba...@gmail.com> wrote: >> >>> Not working? Ok. Now that explains it. >>> >>> Don't put too much effort into your question there. >>> Would not want you to strain yourself. >>> >>> If you want a decent answer ask a decent question. >>> >>> -- >>> 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 >>> >> >> >> >> -- >> Shashank Singh >> B.E.(Computer Science) >> Software Developer >> +91-9711882054 >> +91-9560545085 >> Skype id: shashank.singh87 >> Email: shashank.si...@sourcefuse.com >> >> > > > -- > Shashank Singh > B.E.(Computer Science) > Software Developer > +91-9711882054 > +91-9560545085 > Skype id: shashank.singh87 > Email: shashank.si...@sourcefuse.com > > -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- 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: Upload Multiple images in Cakephp
Even if i just download the source code, and run the example index.html file, i am getting an error like ds in my firebug " *uncaught exception: Invalid JSON: * **" I am not getting what to do now??? On Mon, Mar 28, 2011 at 9:36 PM, Shashank wrote: > My mistake. I tried the Jquery FileUpload - > http://aquantum-demo.appspot.com/file-upload... but i am not getting how > to implement it. I mean i use it into my cakephp installation but i am not > getting how and from where to get a databse entry of the uploaded images and > also i am getting error in saving the images. > > > On Mon, Mar 28, 2011 at 9:32 PM, Krissy Masters < > naked.cake.ba...@gmail.com> wrote: > >> Not working? Ok. Now that explains it. >> >> Don't put too much effort into your question there. >> Would not want you to strain yourself. >> >> If you want a decent answer ask a decent question. >> >> -- >> 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 >> > > > > -- > Shashank Singh > B.E.(Computer Science) > Software Developer > +91-9711882054 > +91-9560545085 > Skype id: shashank.singh87 > Email: shashank.si...@sourcefuse.com > > -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- 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: Upload Multiple images in Cakephp
My mistake. I tried the Jquery FileUpload - http://aquantum-demo.appspot.com/file-upload... but i am not getting how to implement it. I mean i use it into my cakephp installation but i am not getting how and from where to get a databse entry of the uploaded images and also i am getting error in saving the images. On Mon, Mar 28, 2011 at 9:32 PM, Krissy Masters wrote: > Not working? Ok. Now that explains it. > > Don't put too much effort into your question there. > Would not want you to strain yourself. > > If you want a decent answer ask a decent question. > > -- > 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 > -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- 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: Upload Multiple images in Cakephp
Not working? Ok. Now that explains it. Don't put too much effort into your question there. Would not want you to strain yourself. If you want a decent answer ask a decent question. -- 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: Upload Multiple images in Cakephp
Its not working!!! On Mon, Mar 28, 2011 at 2:52 PM, Ryan Snowden wrote: > Try Jquery FileUpload - http://aquantum-demo.appspot.com/file-upload > > I went through a lot... and it did the trick without all the fuss. > > On 28 March 2011 16:43, Shashank wrote: > >> Hi Guys, >> I want to know is there any way so that i can select multiple images >> and upload them on a single click. I searched for it over internet and >> i found that "Multiple Image Upload by Koa", but that doesnt seem to >> be good enough for me because it stores all the three names of the >> uploaded images in a single entry in database. Moreover in that >> approach i have to select the 3 images separately by clicking browse, >> but i want this to be done on a single click. Even if i leave this >> requirement, i need that there should be multile entries in the >> database for every image. Is there any way of doing this. >> >> Thanks >> >> -- >> 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 >> > > -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- 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: issue with saving data in model
Add $this->create(); to your loop before you do the save. If not, you are just updating the same record. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 28 Mar 2011, at 16:21, Rishab Jain wrote: > Hi All, > > I'm facing a very weird problem. I'm trying to save data in a loop > where 1 person is sending msg to many people.. Here's the print_r of > the 3 arrays before I call the 'save' function in the model. > > Array > ( >[Message] => Array >( >[sender_uid_fk_users] => 1 >[subject] => hey >[body] => hey >[recipient_uid_fk_users] => 2 >[date] => 2011:03:28 10:52:41 >) > > ) > Array > ( >[Message] => Array >( >[sender_uid_fk_users] => 1 >[subject] => hey >[body] => hey >[recipient_uid_fk_users] => 4 >[date] => 2011:03:28 10:52:41 >) > > ) > Array > ( >[Message] => Array >( >[sender_uid_fk_users] => 1 >[subject] => hey >[body] => hey >[recipient_uid_fk_users] => 6 >[date] => 2011:03:28 10:52:41 >) > > ) > > The only difference here is the different 'recipient_uid_fk_users' in > all the 3 arrays with values '2', '4', and, '6'. > > All I'm doing then is, > foreach(recipient...) > { >/// prepare $arrayMessagesInfo / > $this->save($arrayMessagesInfo); > } > > The issue I'm facing is that only the first value gets inserted, and > the rest of the two queries becomes 'update' queries. I'm not even > mentioning the primary key in the array. > > These are the cakephp debugging logs: > > 4 INSERT INTO `messages` (`sender_uid_fk_users`, `subject`, > `body`, `recipient_uid_fk_users`, `date`) VALUES (1, 'hey', 'hey', 2, > '2011:03:28 10:48:33')1 0 > 5 SELECT LAST_INSERT_ID() AS insertID 1 1 0 > 6 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE > `Message`.`id` = 31 1 0 > 7 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE > `Message`.`id` = 31 1 0 > 8 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = > 'hey', `body` = 'hey', `recipient_uid_fk_users` = 4, `date` = > '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 1 > 0 > 9 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE > `Message`.`id` = 31 1 0 > 10 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE > `Message`.`id` = 31 1 0 > 11 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = > 'hey', `body` = 'hey', `recipient_uid_fk_users` = 6, `date` = > '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 > > Here's the table structure: > CREATE TABLE `messages` ( > `id` int(10) unsigned NOT NULL AUTO_INCREMENT, > `subject` varchar(100) NOT NULL, > `body` varchar(500) NOT NULL, > `sender_uid_fk_users` int(10) unsigned NOT NULL, > `date` datetime NOT NULL, > `recipient_uid_fk_users` int(10) unsigned NOT NULL, > PRIMARY KEY (`id`), > KEY `sender_uid_fk_users` (`sender_uid_fk_users`), > KEY `recipient_uid_fk_users` (`recipient_uid_fk_users`), > ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | > > > It would be great if anybody can help me out here. > > regards, > Rishab > > -- > 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 -- 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: Cron job permission denied on vodahost
cake file has executable permissions? The path is correct? How did you set up your cron, with crontab -e? 2011/3/28 Cakenya > I hosted a cakePHP site on vodahost that I want a cron job to be > sending my customers emails. > Below is my cron: > /home/aaorwbwc/public_html/tumasenti/cake/console/cake -app /home/ > aaorwbwc/public_html/tumasenti/app getcodes > > This is the error am getting when the cronjob executes: > /bin/sh: /home/aaorwbwc/public_html/tumasenti/cake/console/cake: > Permission denied > > Has anyone encountered this type of problem before? > Please help!!! > > -- > 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 > -- 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
issue with saving data in model
Hi All, I'm facing a very weird problem. I'm trying to save data in a loop where 1 person is sending msg to many people.. Here's the print_r of the 3 arrays before I call the 'save' function in the model. Array ( [Message] => Array ( [sender_uid_fk_users] => 1 [subject] => hey [body] => hey [recipient_uid_fk_users] => 2 [date] => 2011:03:28 10:52:41 ) ) Array ( [Message] => Array ( [sender_uid_fk_users] => 1 [subject] => hey [body] => hey [recipient_uid_fk_users] => 4 [date] => 2011:03:28 10:52:41 ) ) Array ( [Message] => Array ( [sender_uid_fk_users] => 1 [subject] => hey [body] => hey [recipient_uid_fk_users] => 6 [date] => 2011:03:28 10:52:41 ) ) The only difference here is the different 'recipient_uid_fk_users' in all the 3 arrays with values '2', '4', and, '6'. All I'm doing then is, foreach(recipient...) { /// prepare $arrayMessagesInfo / $this->save($arrayMessagesInfo); } The issue I'm facing is that only the first value gets inserted, and the rest of the two queries becomes 'update' queries. I'm not even mentioning the primary key in the array. These are the cakephp debugging logs: 4 INSERT INTO `messages` (`sender_uid_fk_users`, `subject`, `body`, `recipient_uid_fk_users`, `date`) VALUES (1, 'hey', 'hey', 2, '2011:03:28 10:48:33')1 0 5 SELECT LAST_INSERT_ID() AS insertID 1 1 0 6 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE `Message`.`id` = 31 1 0 7 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE `Message`.`id` = 31 1 0 8 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = 'hey', `body` = 'hey', `recipient_uid_fk_users` = 4, `date` = '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 1 0 9 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE `Message`.`id` = 31 1 0 10 SELECT COUNT(*) AS `count` FROM `messages` AS `Message` WHERE `Message`.`id` = 31 1 0 11 UPDATE `messages` SET `sender_uid_fk_users` = 1, `subject` = 'hey', `body` = 'hey', `recipient_uid_fk_users` = 6, `date` = '2011:03:28 10:48:33' WHERE `messages`.`id` = 3 Here's the table structure: CREATE TABLE `messages` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `subject` varchar(100) NOT NULL, `body` varchar(500) NOT NULL, `sender_uid_fk_users` int(10) unsigned NOT NULL, `date` datetime NOT NULL, `recipient_uid_fk_users` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `sender_uid_fk_users` (`sender_uid_fk_users`), KEY `recipient_uid_fk_users` (`recipient_uid_fk_users`), ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | It would be great if anybody can help me out here. regards, Rishab -- 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: ODBC listSources() giving Out of Memory
Outside the CakePHP framework, the same odbc_tables() call followed by pushing the returned values into an array (i.e. the same thing the ODBC driver is doing) requires less than 1MB of memory. Obviously, Cake will require more than that due to additional overhead, but I can't see any reason for it to be pushing 526MB. I'll check with my admins to see if they can tell what's up, but any further suggestions regarding the issue would be most appreciated! On Mar 25, 6:52 pm, Ryan Schmidt wrote: > On Mar 24, 2011, at 16:31, mhamann wrote: > > > I'm trying to access a DB2 database via ODBC and I'm getting the > > following error when Cake attempts to list all of the tables: > > "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried > > to allocate 551995385 bytes)" > > Your PHP is configured for a maximum of 32MB of memory per process, but it > tried to allocate 526MB. This is clearly quite large, so I'd look into why > this much memory was requested. Would the results of your query be enormous? > Try a smaller query. -- 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: Session in Model
I hear cricket's point of view, but in a fairly complex model function you might need to read from or write to the session several times and in a dependent way (based on what happens inside the model function) so you don't necessarily know what variables to send in (unless you're a belt and braces fan). I often find myself returning an array from the model so that the controller function can parse it and do things like redirect to the right place, work out if/what error occurred, set the flash message etc. The model could do some of that stuff (I'm not suggesting a redirect there of course). Sometimes a controller function has to just let go of the situation and lose contact with the data while the model function does its stuff and it doesn't really know what's coming back, how to handle it or what to do next. That adds unnecessary overhead to the controller function that could be relieved somewhat by the model. I don't see a huge problem with working that way. Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 28 Mar 2011, at 11:44, euromark wrote: > it is a very neat thing to have access to the session inside the model > check out Miles' approach > he uses it in his forum plugin: > http://milesj.me/resources/script/forum-plugin > > On 28 Mrz., 08:00, cricket wrote: >> On Mon, Mar 28, 2011 at 12:54 AM, Krissy Masters >> >> >> >> >> >> >> >> >> >> wrote: >>> Why is the Session data not available in the Model? >>> Why is it breaking MVC? >>> I do not understand since all data comes from the database basically and if >>> I am saving my session data to the db why would grabbing that data in the >>> model be bad? >> >>> I found Miles J snip for the app_model which I plan to use to get session >>> data since it makes more sense to grab user.id from the session directly in >>> the model rather than grab it in controller only to pass it to the model in >>> the controller function to be used in the model function. >> >>> public function __construct($id = false, $table = null, $ds = null) { >>>parent::__construct($id, $table, $ds); >> >>>$this->Session = new CakeSession(); >>> } >> >>> Any insight on how this breaks MVC? >> >> The request shoud be irrelevant to the model. That's for the >> controller to deal with. If you have model methods which are dependent >> on request data (which, essentially, is what session vars are) just >> pass them to your model methods from the controller. >> >> If you've got a lot of params to send, consider using an associative >> array, the way most everything else in Cake works. > > -- > 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 -- 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: Release Notes for CakePHP 2.0.0-dev.
http://lmgtfy.com/?q=cakephp+wamp On 28 Mrz., 13:06, a kashyap wrote: > Hello, > > i am php developer . > i am using first time cake php. > > when i running at localhost show this message > > i make the database setting. > > Release Notes for CakePHP 2.0.0-dev. > > plz guide me how to setup cakephp first time with wamp server. > anybody plz help me. > > thank you in advace. -- 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
Cron job permission denied on vodahost
I hosted a cakePHP site on vodahost that I want a cron job to be sending my customers emails. Below is my cron: /home/aaorwbwc/public_html/tumasenti/cake/console/cake -app /home/ aaorwbwc/public_html/tumasenti/app getcodes This is the error am getting when the cronjob executes: /bin/sh: /home/aaorwbwc/public_html/tumasenti/cake/console/cake: Permission denied Has anyone encountered this type of problem before? Please help!!! -- 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
Release Notes for CakePHP 2.0.0-dev.
Hello, i am php developer . i am using first time cake php. when i running at localhostshow this message i make the database setting. Release Notes for CakePHP 2.0.0-dev. plz guide me how to setup cakephp first time with wamp server. anybody plz help me. thank you in advace. -- 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: how to hide rewrite url in cakephp?
Thanks for reply Ryan, But , How to do apache configuration? you mean i should do it in .htaccess file? Pushpa. On Sun, Mar 27, 2011 at 4:54 AM, Ryan Schmidt wrote: > > On Mar 26, 2011, at 00:51, push wrote: > > > I am doing web application, I want hide my url for security purpose. > > My home page url is www.mydomine.com/cakephp. I want my home page url > > to be www.mydomine.com , Please tell me how to hide cakephp? > > Set up your DocumentRoot properly in your Apache configuration. > > > -- > 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 > -- 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: Can I use a helper in bootstrap.php
On Sun, Mar 27, 2011 at 9:02 AM, Nitin Khanna wrote: > Hi! > > I need to use the geoip helper in bootstrap.php. Is is possible. > Sure, you can do App::import in your bootstrap.php, i.e : App::import('Helper', 'Time'); $my_time = new TimeHelper; echo $my_time->format('d/m/Y', date('d-m-Y')); -- regards, Akeda Bagus -- 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: Session in Model
it is a very neat thing to have access to the session inside the model check out Miles' approach he uses it in his forum plugin: http://milesj.me/resources/script/forum-plugin On 28 Mrz., 08:00, cricket wrote: > On Mon, Mar 28, 2011 at 12:54 AM, Krissy Masters > > > > > > > > > > wrote: > > Why is the Session data not available in the Model? > > Why is it breaking MVC? > > I do not understand since all data comes from the database basically and if > > I am saving my session data to the db why would grabbing that data in the > > model be bad? > > > I found Miles J snip for the app_model which I plan to use to get session > > data since it makes more sense to grab user.id from the session directly in > > the model rather than grab it in controller only to pass it to the model in > > the controller function to be used in the model function. > > > public function __construct($id = false, $table = null, $ds = null) { > > parent::__construct($id, $table, $ds); > > > $this->Session = new CakeSession(); > > } > > > Any insight on how this breaks MVC? > > The request shoud be irrelevant to the model. That's for the > controller to deal with. If you have model methods which are dependent > on request data (which, essentially, is what session vars are) just > pass them to your model methods from the controller. > > If you've got a lot of params to send, consider using an associative > array, the way most everything else in Cake works. -- 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: Can I use a helper in bootstrap.php
what geoip helper? seems like you have a helper which should in fact be something very different (like a vendor class or in cake1.3 a lib!). it is possible but really not recommended App::import('Helper', 'MyHelper'); my suggestion: think about converting it to a lib. On 28 Mrz., 06:12, Tilen Majerle wrote: > No... > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2011/3/27 Nitin Khanna > > > > > > > > > Hi! > > > I need to use the geoip helper in bootstrap.php. Is is possible. > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 > > athttp://groups.google.com/group/cake-php -- 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
Caching
I'm working on a site that is very data intensive, has hardly any images and is light on static content. Its key functionality is close to a that of a search engine where customers can run searches against a business database. I'm struggling to get my head round a sensible caching policy - a change in one model can impact many others as there are a lot of model relationships. Does anyone have any good resources I can check for deciding the right caching strategy - if indeed one is needed? -- 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: $this->Session->valid() strangely returning false
$this->Session->valid() isn't listed as an official method in 1.3 http://book.cakephp.org/view/1466/Methods Perhaps you want to try: if($this->Session->check('somvar') == true) { // Session exists } else { // Session does not exist } On 27 March 2011 19:09, Roland Pish wrote: > Hello there. > > I have this code: > > $this->Session->write('somevar',array(1,6)); // Creating somevar test > session variable > debug($this->Session->read()); // Dumping session contents. NOTE: this > displays correctly the contents of "somevar" > if ($this->Session->valid()) { >debug('Session is valid'); > } > else { >debug('Session is NOT valid'); > } > > But $this->Session->valid() always returns false. Why does this happen > if a line before I can successfully print the contents of "somevar" > session variable? > > Thanks in advance. > > -- > 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 > -- Kind Regards Stephen http://www.ninjacodermonkey.co.uk -- 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: Upload Multiple images in Cakephp
Try Jquery FileUpload - http://aquantum-demo.appspot.com/file-upload I went through a lot... and it did the trick without all the fuss. On 28 March 2011 16:43, Shashank wrote: > Hi Guys, > I want to know is there any way so that i can select multiple images > and upload them on a single click. I searched for it over internet and > i found that "Multiple Image Upload by Koa", but that doesnt seem to > be good enough for me because it stores all the three names of the > uploaded images in a single entry in database. Moreover in that > approach i have to select the 3 images separately by clicking browse, > but i want this to be done on a single click. Even if i leave this > requirement, i need that there should be multile entries in the > database for every image. Is there any way of doing this. > > Thanks > > -- > 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 > -- 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
Upload Multiple images in Cakephp
Hi Guys, I want to know is there any way so that i can select multiple images and upload them on a single click. I searched for it over internet and i found that "Multiple Image Upload by Koa", but that doesnt seem to be good enough for me because it stores all the three names of the uploaded images in a single entry in database. Moreover in that approach i have to select the 3 images separately by clicking browse, but i want this to be done on a single click. Even if i leave this requirement, i need that there should be multile entries in the database for every image. Is there any way of doing this. Thanks -- 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: Length of session_id()
On Mar 28, 2011, at 01:30, Simon Males wrote: > I'm wondering what the maximum length of session_id() can be. > > The maximum length in my DB is 32 characters, and thus I feel a > VARCHAR column of 255 is overkill. > > http://au2.php.net/session_id > http://api.cakephp.org/view_source/cake-session/#l-251 The length would vary depending on what you set for session.hash_function and session.hash_bits_per_character in php.ini. -- 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