Re: This is more of a general application design question than a CakePHP question...
Making the remote service API requests for every one of your page requests is a bad idea - you have to use some kind of caching (save locally). Otherwise your page load times could be completely unstable (what if there is a 5 second delay between your server and one of the services?), plus you could be making way too many requests (if you are getting 100 requests/sec, your server is making 500 service requests/ sec?). So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. On May 12, 12:03 pm, Action [EMAIL PROTECTED] wrote: Yeah, comments would be an afterthought if I had the data locally, so that's what I originally thought about doing. BUT the problem with that is that how do I determine when I save that data? Do I just run a save query 15 times each time a page is loaded (or the cache is updated) with isUnique set in the model's validation parameters? On May 11, 9:52 pm, Jonathan Snook [EMAIL PROTECTED] wrote: My answers below... On Sun, May 11, 2008 at 9:44 PM, Action [EMAIL PROTECTED] wrote: I'm trying to make a tumblelog using CakePHP. What this application will do is pull in a list of recent activity on services like flickr, twitter, delicious, youtube, etc. and display any posts made on them in chronological order. If you're not already, I'd pull all of these items and save them to a local table, normalising them into a consistent format (date, title, body). The problem I've encountered is how to deal with a comment system. Each item would have a unique ID and a comment would simply be attached to that ID. comment to the post). The problem here is how do I get a comments count next to each post without running a separate query for each post title? You'll need to do one query using COUNT and GROUP BY to sum up comment totals for each item. -Jonathan Snook --~--~-~--~~~---~--~~ 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: Query Question
City belongsTo State Assuming Cake 1.2: $cities = $this-City-find('list', array('fields'=array('City.id', City.name', 'State.name'), 'recursive'=1) ); Then you can have a form select with cities as the data source, you should get exactly what you want. On May 12, 9:00 am, Kyle Decot [EMAIL PROTECTED] wrote: I want to make a side nave bar with states and cities of that state as sub items. How would I write a query to do this? I want something like: Florida _Orlando _Daytona Ohio _Columbus _New Albany etc... Thanks as always for the help. --~--~-~--~~~---~--~~ 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: Insallation
I am not familiar with appserv but you seem to be running a very picky version of PHP 5 that complains about everything in CakePHP 1.1 that is not in accord with the Strict standards of PHP 5. (Cake is still being developed for both PHPp4 and 5) The only wild guess I can provide on the subject is to make absolutely sure you are letting CakePHP override Apache and PHP settings. And also of-course that all the .htaccess-files have actually being copied to the server. On May 12, 1:31 am, Killmon [EMAIL PROTECTED] wrote: I am new to php and is why I want to install cakephp (to play with it alittle), however, I am far from new to computing and html. I am general a quick study and if I have access to the the correct info and able to execute with little trouble. But if this is what you are after then why bother? Not with Cake but with this server-setup. The absolutely fastest way to get a full development kit set up is to install WAMP or MAMP (for WIndows of Mac OS). This is a standalone (and standard-configuration) apache/php/ mysql phpmyadmin... kit you run on your computer. Following the installation guide for Cake should work perfectly with these and you don't need to have a home server running. This will also provide you with a working examples of all the configurations. You can check and tweak them and also try to set your server up with similar settings. /Martin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using the log function - log to database
The cookbook: http://book.cakephp.org/view/157/logging states.. //Executing this inside a CakePHP class: $this-log(Something didn't work!); //Results in this being appended to app/tmp/logs/error.log 2007-11-02 10:22:02 Error: Something didn't work! I wonder, if there is a quick setting that instead that this will write to a default log file, it will write to a database table instead.. Or, its better to create my own anyways... -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) --~--~-~--~~~---~--~~ 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: forced download
What headers would your session like to set after your file outputs? I would honestly be interested in knowing but I can't figure out what would come after the file headers. In my head, the session is initiated and taken care of way before I end up in a view outputting a file. /Martin On May 11, 9:44 pm, crazyDavid [EMAIL PROTECTED] wrote: Thank you Traique and jonknee for the reply. But as i'm using session, it doesn't allow me to send header info later. On May 7, 5:32 pm, jonknee [EMAIL PROTECTED] wrote: hi! i'm developing an application where the user uploads and downloads file. But during downloads, the files like jpegs, txt, those openable in the browser open in the browser itself. but i need them to come out as pop-ups or dialouge box with save as or a download manager/ accelerator software to assist in download. how can this be done? thanks for the help! You need to send a content-disposition header. Example in PHP: ?php header('Content-Disposition: attachment; filename=my.jpg'); ? The header() docs have more information:http://us.php.net/header --~--~-~--~~~---~--~~ 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: Problemas con $form-dateTime('birthDate', $dateFormat = 'DMY', $timeFormat = 'NONE',null, null, false);
Buenas a todos, como hago para colocar las fechas en idioma español, no entendi bien la explicacion, por favor si me pueden explicar nuevamente aa otra cosa es que en febrero muestra 31 dias como se puede corregir esto hi, please, can you explain again i can't change or display months in spanish. other thing, when i selected febraury, day display 31 and this is wrong, who do you fix? On Sat, Jan 5, 2008 at 5:46 AM, Trencavel [EMAIL PROTECTED] wrote: On Samstag, 5. Januar 2008 wrote ballbrk: Saludos. Hi, $form-dateTime('birthDate', $dateFormat = 'DMY', $timeFormat = 'NONE',null, null, false); Mi problema es que los meses salen en ingles. Hay alguna posibilidad que salgan en el idioma de Cervantes? You could set the locales: setlocale(LC_TIME, 'es-ES'); or for utf-8 setlocale(LC_TIME, 'es-ES.UTF8'); If this locale is installed on the server the name of days and months should be displayed in spanish. Saludos Tolo Trenc -- Cordialmente, ING. HERNAN DURAN SANCHEZ [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Skype: randuh Blog: http://lamentehueca.blogspot.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Vacancy Lead Developer cakephp And Senior Developer Cakephp
One of client in UK is looking to hire Lead Developer cakephp And Senior Developer Cakephp Type Permanent Location: London Salary Excellent 28 t0 50 K Experience dependent GPB Job Description: Lead Developer Cakephp 5 years+ experience with PHP My sql - Experienced with MVC frameworks such as CAKE - Experience with Agile development methodologies - Experience managing web-build team Senior Software Developer Cakephp Role will involve code level development, testing, documentation and ongoing maintenance Job Description: Senior Developer - 2 years+ experience with PHP My sql - Experienced with MVC frameworks such as CAKE - Experience with Agile development methodologies For both roles, you will need to be a PHP guru with experience of CAKE, ideally within the e-commerce sector. You'll be a really keen developer, happy to work under pressure, with a real passion to innovate. For further details contact me on the number given below and please reply to this email with your latest CV with examples of your work (port folio) and please let us know what is your current status Availability and Required Salary You Must be eligible to work in UK Richard King, Technical IT Recruiter Realskill Limited www.real-skill.co.uk [EMAIL PROTECTED] 44 (0)1274 900332 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can requestAction authenticate itself to an action protected by SecurityComponent?
Hi there, I am building a few small APIs for an application and have run into a problem I can't seem to figure out. One of these APIs will on occasion need to request an action in the another API. Both APIs are protected by basic auth with Security component. Making them both use the same realm and users lets the requestAction get through but would like to avoid this since that would give any API-user access to everything in all APIs Is there a way for requestAction to pass user:pass data along with the request? Disclaimer: Yes yes, I know basic authentication is far from secure in todays world. I know I gain little by typing user:pass into my code. But every bit helps :) /Martin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Validation on Update in Cake using VALID_UNIQUE
Hi, I'm having a little trouble with updating in my validation. I have validation that checks that an email has not already been used. function loadValidation(){ $this-validate = array( 'email' = array( 'required' = array( 'method' = VALID_NOT_EMPTY, 'message' = 'You have not entered an Email address', ), 'email' = array( 'method' = VALID_EMAIL, 'message' = 'The Email address entered is not in proper format' ), 'unique' = array( 'method' = VALID_UNIQUE, 'message' = 'The Email address entered is already in use', 'on' = 'create' ), ) However, it is giving me the error message when I am trying to do an update, as well as when I am trying to do a save. As you can see, I've got an 'on'='create' in the setting, but it is not registering. Have I got this in the wrong spot, or can anyone give me some advice on what I should be doing instead? I couldn't find anything beyond the 'on'='create' on the bakery. Thankyou Dianne. ) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
can't get a session to work :(
Hey everybody, I'm sorry the first thing I do here is ask for you help, but I'm really stuck on something that should be simple. I'm using the cakephp 1.2 beta, and I'm trying to write something to a session. This is the relevant controller and function class ProductsController extends AppController { var $helpers = array('Form', 'Html', 'Number', 'Time', 'Ajax', 'Session'); var $uses = array('Product', 'Categoryproperty'); function view($id = null) { $this - Session - write(test, test); print_r($this-Session-read()); } When I run this page, it prints the session array containing 'test' and 'test'. But as soon as I refresh the page, it's gone. In my core.php it says 'Configure::write('Session.save', 'php');' After about 4 hours of trying to just write a simple value to a session, I figured something must've been wrong to the php save method. I created the database table, and set 'Configure::write('Session.save', 'database');' (I also uncommented the other lines). When I run the page with this setting, it also prints the session array, but I see no extra queries in debug mode, so I figure nothing is being written to the database. I checked in phpmyadmin and the table is indeed still empty. Am I doing something wrong here, or is there anything else you need to know/see (files?)? Thanks in advance, Regards! Aeg --~--~-~--~~~---~--~~ 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: Three-level hasMany in view with form helper
For this type I use a kind of hack in the field names : echo $form-input('Chapter/0][paragraph][0][field]', ... ) That does the trick, but I did not check so many levels in the controller .. ie : be sure to check that $this-data is correct. hth On May 12, 2:26 am, James K [EMAIL PROTECTED] wrote: Having the exact same issue here - looks like Cake simply doesn't support hasMany past one level with the dot notation. On Apr 18, 8:41 am, Max Romantschuk [EMAIL PROTECTED] wrote: I'm working on a form for a three-levelhasManyrelationship. Conceptually: BookhasManyChapterhasManyParagraph. (Model names for illustrative purposes.) I'm using the form helper to render my form. The main parent model (Book) stuff works fine, and I can do the Chapters by supplying Chapter.0.field, Chapter.1.field etc. to the form helper. The fields are populated nicely, and the inputs are named data[Chapter][0] [field], data[Chapter][1][field] etc. However, when I try giving the form helper the next level with Chapter.0.Paragraph.0.field that won't work and Cake falls back to the parent Book model, naming the input data[Book] and breaking the form. I'm sure I could get the data to populate with Paragraph. 0.field, but then I'd have no clue which paragraph goes in which Chapter after the form is submitted. Has anyone gotten Cake to populate a three-levelhasManyrelationship like this? Doing the third level manually is pretty trivial in this case, it's only two fields of data, so maybe I should just do that? --~--~-~--~~~---~--~~ 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: can't get a session to work :(
Sorry, never mind, I fixed the problem by deleting two spaces in the model... pfff --~--~-~--~~~---~--~~ 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: forced download
I wrote a small rant about MediaView and file downloads, see if you can make some use of it: http://dsi.vozibrale.com/articles/view/mediaview-is-a-bleeding-bastard Cheers! On May 7, 2:27 pm, crazyDavid [EMAIL PROTECTED] wrote: hi! i'm developing an application where the user uploads and downloads file. But during downloads, the files like jpegs, txt, those openable in the browser open in the browser itself. but i need them to come out as pop-ups or dialouge box with save as or a download manager/ accelerator software to assist in download. how can this be done? thanks for the help! --~--~-~--~~~---~--~~ 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: Problems with open_basedir
I have the default directory structure, so the fields will look like this but I still get an error. Fatal error: Class 'Configure' not found in /var/www/ingmar/trumpf.ro/ app/config/core.php on line 43 define('ROOT', '/var/www/ingmar/trumpf.ro'); define('APP_DIR', 'app'); define('CAKE_CORE_INCLUDE_PATH', ''); Thank you so much! Silviu On May 10, 7:27 pm, Mathew Nik Foscarini [EMAIL PROTECTED] wrote: Did you define your absolute paths using your /home/username account for your web server? Mine are setup something like this. define('ROOT','/home/username/public_html'); define('APP_DIR','../../folder/cake_1_2.app'); define('CAKE_CORE_INCLUDE_PATH', '/home/username/folder/cake_1.2.0'); When you log into your account web host providers will often map your folder to a linked folder. Something like ~/ as the root for your account. So it looks like your local path is /www but it isn't. It's really /home/username/www - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Saturday, May 10, 2008 9:38:55 AM Subject: Problems with open_basedir Hi! I've put a fresh install of cakephp on this serverhttp://trumpf.ro and it doesn't work(visit the address and you can guess why). What can I do to maek it work besides modifying open_basedir? I've busting my head for several hours now and why I got it to show only the first page by modifying app/webroot/index.php under the do not edit line :p But it borke everything else. Thanks! ___ _ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: Query Question
They're not stored in separate tables. They're stored in my skateparks table which has: id | name | address | city | state ...etc --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cake Installation - sorry to have to ask
I am having trouble getting the demo blog program to run in Cake (and hence any real programs). It must be something simple, but I can not figure it out. I installed xampp. Tested everything. works OK. xampp in directory: program files/xampp. Also installed cake. Everything is put into directory structure as: program files/xampp/htdocs/cake stuff. When I run http://localhost, the cakephp index file seems to run just fine and tells me that tmp file is writeable, caching is OK, mysql database configuration is present and connected. I have run phpinfo() to determine that my document root is: program files/xampp/htdocs I created the three demo files for the blog demo, put one in app/ controllers, one in app/models and the other, index.ctp, in a folder called posts in the directory app/views. When I try to run the blog demo (localhost/posts or any variation thereof that I can think of), I get the error: Object not found, requested URL not found on this server. It does not tell me what URL exactly. I have read and re-read the cake manual and the blog demo for installation, and can not figure out what simple thing I have done wrong or am not doing corrrectly. The only strange thing, is that originally I put cakephp in the subdirectory /program files/xampp/htdocs/xampp, thinking this was the root. Cake is still sitting there, but I do not believe this is the cause of my problem. I would really appreciate if someone can help me asap. Thanks, Rubin PS If someone wants to give me their phone number, I would even call them. --~--~-~--~~~---~--~~ 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: Query Question
look at self relating the table by using a field named parent_id if your baking cake will recognise that the relationship is a child/parent id | parent id | name | address | city | state ...etc 2008/5/12 Kyle Decot [EMAIL PROTECTED]: They're not stored in separate tables. They're stored in my skateparks table which has: id | name | address | city | state ...etc --~--~-~--~~~---~--~~ 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: Problem with drake and Drupal Menu's
Yes, drupal seems to theme my cakePHP pages just as if they were a node in drupal itself. (CSS only, im not sure about the more advanced theme stuff as i am very new to all of this) --~--~-~--~~~---~--~~ 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: Cake Installation - sorry to have to ask
hey, try this http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ and check in the apache logs On Mon, May 12, 2008 at 12:32 PM, rubin [EMAIL PROTECTED] wrote: I am having trouble getting the demo blog program to run in Cake (and hence any real programs). It must be something simple, but I can not figure it out. I installed xampp. Tested everything. works OK. xampp in directory: program files/xampp. Also installed cake. Everything is put into directory structure as: program files/xampp/htdocs/cake stuff. When I run http://localhost, the cakephp index file seems to run just fine and tells me that tmp file is writeable, caching is OK, mysql database configuration is present and connected. I have run phpinfo() to determine that my document root is: program files/xampp/htdocs I created the three demo files for the blog demo, put one in app/ controllers, one in app/models and the other, index.ctp, in a folder called posts in the directory app/views. When I try to run the blog demo (localhost/posts or any variation thereof that I can think of), I get the error: Object not found, requested URL not found on this server. It does not tell me what URL exactly. I have read and re-read the cake manual and the blog demo for installation, and can not figure out what simple thing I have done wrong or am not doing corrrectly. The only strange thing, is that originally I put cakephp in the subdirectory /program files/xampp/htdocs/xampp, thinking this was the root. Cake is still sitting there, but I do not believe this is the cause of my problem. I would really appreciate if someone can help me asap. Thanks, Rubin PS If someone wants to give me their phone number, I would even call them. -- Marcin Domanski http://kabturek.info --~--~-~--~~~---~--~~ 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: Insallation
On May 12, 3:36 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am not familiar with appserv but you seem to be running a very picky version of PHP 5 that complains about everything in CakePHP 1.1 that is not in accord with the Strict standards of PHP 5. (Cake is still being developed for both PHPp4 and 5) The only wild guess I can provide on the subject is to make absolutely sure you are letting CakePHP override Apache and PHP settings. And also of-course that all the .htaccess-files have actually being copied to the server. On May 12, 1:31 am, Killmon [EMAIL PROTECTED] wrote: I will give them a try Thanks! Allthough, my impression is that WAMP is the same thing as appserv ( a stand alone package of Msql, appache, phpadmin, php) I supose WAMP may be better configured for cake out of the box, So awway I go! Has anyone heard of phpadmin asking for a login frm the start? I am new to php and is why I want to install cakephp (to play with it alittle), however, I am far from new to computing and html. I am general a quick study and if I have access to the the correct info and able to execute with little trouble. But if this is what you are after then why bother? Not with Cake but with this server-setup. The absolutely fastest way to get a full development kit set up is to install WAMP or MAMP (for WIndows of Mac OS). This is a standalone (and standard-configuration) apache/php/ mysql phpmyadmin... kit you run on your computer. Following the installation guide for Cake should work perfectly with these and you don't need to have a home server running. This will also provide you with a working examples of all the configurations. You can check and tweak them and also try to set your server up with similar settings. /Martin --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
Is that possible to do on a shared host? On May 12, 2:52 am, Grant Cox [EMAIL PROTECTED] wrote: Making the remote service API requests for every one of your page requests is a bad idea - you have to use some kind of caching (save locally). Otherwise your page load times could be completely unstable (what if there is a 5 second delay between your server and one of the services?), plus you could be making way too many requests (if you are getting 100 requests/sec, your server is making 500 service requests/ sec?). So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. On May 12, 12:03 pm, Action [EMAIL PROTECTED] wrote: Yeah, comments would be an afterthought if I had the data locally, so that's what I originally thought about doing. BUT the problem with that is that how do I determine when I save that data? Do I just run a save query 15 times each time a page is loaded (or the cache is updated) with isUnique set in the model's validation parameters? On May 11, 9:52 pm, Jonathan Snook [EMAIL PROTECTED] wrote: My answers below... On Sun, May 11, 2008 at 9:44 PM, Action [EMAIL PROTECTED] wrote: I'm trying to make a tumblelog using CakePHP. What this application will do is pull in a list of recent activity on services like flickr, twitter, delicious, youtube, etc. and display any posts made on them in chronological order. If you're not already, I'd pull all of these items and save them to a local table, normalising them into a consistent format (date, title, body). The problem I've encountered is how to deal with a comment system. Each item would have a unique ID and a comment would simply be attached to that ID. comment to the post). The problem here is how do I get a comments count next to each post without running a separate query for each post title? You'll need to do one query using COUNT and GROUP BY to sum up comment totals for each item. -Jonathan Snook --~--~-~--~~~---~--~~ 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: Validation on Update in Cake using VALID_UNIQUE
I have posted what I have in my User model (running 1.2.x.x) at http://bin.cakephp.org/view/646962640 --~--~-~--~~~---~--~~ 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: Cake Installation - sorry to have to ask
The fact that you're getting a standard Apache error, rather than a cake specific error page, does indeed imply that it's something in your Apache setup - perhaps Mod Rewrite, and related settings. The error log is (as Marcin says) your best bet. On 12 May, 12:34, Marcin Domanski [EMAIL PROTECTED] wrote: hey, try thishttp://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ and check in the apache logs On Mon, May 12, 2008 at 12:32 PM, rubin [EMAIL PROTECTED] wrote: I am having trouble getting the demo blog program to run in Cake (and hence any real programs). It must be something simple, but I can not figure it out. I installed xampp. Tested everything. works OK. xampp in directory: program files/xampp. Also installed cake. Everything is put into directory structure as: program files/xampp/htdocs/cake stuff. When I runhttp://localhost, the cakephp index file seems to run just fine and tells me that tmp file is writeable, caching is OK, mysql database configuration is present and connected. I have run phpinfo() to determine that my document root is: program files/xampp/htdocs I created the three demo files for the blog demo, put one in app/ controllers, one in app/models and the other, index.ctp, in a folder called posts in the directory app/views. When I try to run the blog demo (localhost/posts or any variation thereof that I can think of), I get the error: Object not found, requested URL not found on this server. It does not tell me what URL exactly. I have read and re-read the cake manual and the blog demo for installation, and can not figure out what simple thing I have done wrong or am not doing corrrectly. The only strange thing, is that originally I put cakephp in the subdirectory /program files/xampp/htdocs/xampp, thinking this was the root. Cake is still sitting there, but I do not believe this is the cause of my problem. I would really appreciate if someone can help me asap. Thanks, Rubin PS If someone wants to give me their phone number, I would even call them. -- Marcin Domanskihttp://kabturek.info --~--~-~--~~~---~--~~ 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: Three-level hasMany in view with form helper
This almost works for me - it fails if you have additional models called in the $uses array of the controller. Cake ends up putting the name of the first model in the uses at the front of those form field names. So if I have another model called ListItem which I use to pull generic list items into controllers, when I do Chater[0][paragraph][0][field], it outputs ListItemChapter[0][paragraph][0][field] as the name property for the form element. On May 12, 5:46 am, francky06l [EMAIL PROTECTED] wrote: For this type I use a kind of hack in the field names : echo $form-input('Chapter/0][paragraph][0][field]', ... ) That does the trick, but I did not check so many levels in the controller .. ie : be sure to check that $this-data is correct. hth On May 12, 2:26 am, James K [EMAIL PROTECTED] wrote: Having the exact same issue here - looks like Cake simply doesn't support hasMany past one level with the dot notation. On Apr 18, 8:41 am, Max Romantschuk [EMAIL PROTECTED] wrote: I'm working on a form for a three-levelhasManyrelationship. Conceptually: BookhasManyChapterhasManyParagraph. (Model names for illustrative purposes.) I'm using the form helper to render my form. The main parent model (Book) stuff works fine, and I can do the Chapters by supplying Chapter.0.field, Chapter.1.field etc. to the form helper. The fields are populated nicely, and the inputs are named data[Chapter][0] [field], data[Chapter][1][field] etc. However, when I try giving the form helper the next level with Chapter.0.Paragraph.0.field that won't work and Cake falls back to the parent Book model, naming the input data[Book] and breaking the form. I'm sure I could get the data to populate with Paragraph. 0.field, but then I'd have no clue which paragraph goes in which Chapter after the form is submitted. Has anyone gotten Cake to populate a three-levelhasManyrelationship like this? Doing the third level manually is pretty trivial in this case, it's only two fields of data, so maybe I should just do that? --~--~-~--~~~---~--~~ 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: Cake Installation - sorry to have to ask
To get a more specific and detailed error message, you can set Configure::write('debug', 1); in your app/config/core.php On 12 Mai, 12:32, rubin [EMAIL PROTECTED] wrote: I am having trouble getting the demo blog program to run in Cake (and hence any real programs). It must be something simple, but I can not figure it out. I installed xampp. Tested everything. works OK. xampp in directory: program files/xampp. Also installed cake. Everything is put into directory structure as: program files/xampp/htdocs/cake stuff. When I runhttp://localhost, the cakephp index file seems to run just fine and tells me that tmp file is writeable, caching is OK, mysql database configuration is present and connected. I have run phpinfo() to determine that my document root is: program files/xampp/htdocs I created the three demo files for the blog demo, put one in app/ controllers, one in app/models and the other, index.ctp, in a folder called posts in the directory app/views. When I try to run the blog demo (localhost/posts or any variation thereof that I can think of), I get the error: Object not found, requested URL not found on this server. It does not tell me what URL exactly. I have read and re-read the cake manual and the blog demo for installation, and can not figure out what simple thing I have done wrong or am not doing corrrectly. The only strange thing, is that originally I put cakephp in the subdirectory /program files/xampp/htdocs/xampp, thinking this was the root. Cake is still sitting there, but I do not believe this is the cause of my problem. I would really appreciate if someone can help me asap. Thanks, Rubin PS If someone wants to give me their phone number, I would even call them. --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
Nvm, looks like my shared host does support cron jobs. On May 12, 7:34 am, Action [EMAIL PROTECTED] wrote: Is that possible to do on a shared host? On May 12, 2:52 am, Grant Cox [EMAIL PROTECTED] wrote: Making the remote service API requests for every one of your page requests is a bad idea - you have to use some kind of caching (save locally). Otherwise your page load times could be completely unstable (what if there is a 5 second delay between your server and one of the services?), plus you could be making way too many requests (if you are getting 100 requests/sec, your server is making 500 service requests/ sec?). So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. On May 12, 12:03 pm, Action [EMAIL PROTECTED] wrote: Yeah, comments would be an afterthought if I had the data locally, so that's what I originally thought about doing. BUT the problem with that is that how do I determine when I save that data? Do I just run a save query 15 times each time a page is loaded (or the cache is updated) with isUnique set in the model's validation parameters? On May 11, 9:52 pm, Jonathan Snook [EMAIL PROTECTED] wrote: My answers below... On Sun, May 11, 2008 at 9:44 PM, Action [EMAIL PROTECTED] wrote: I'm trying to make a tumblelog using CakePHP. What this application will do is pull in a list of recent activity on services like flickr, twitter, delicious, youtube, etc. and display any posts made on them in chronological order. If you're not already, I'd pull all of these items and save them to a local table, normalising them into a consistent format (date, title, body). The problem I've encountered is how to deal with a comment system. Each item would have a unique ID and a comment would simply be attached to that ID. comment to the post). The problem here is how do I get a comments count next to each post without running a separate query for each post title? You'll need to do one query using COUNT and GROUP BY to sum up comment totals for each item. -Jonathan Snook --~--~-~--~~~---~--~~ 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: Three-level hasMany in view with form helper
Try to set the model to null in your form-create and give the model name in the input names .. (just a hint, not sure that will work..) I did not try 'Chapter.0][paragraph .. ' maybe this will solve the model name problem. On May 12, 2:01 pm, James K [EMAIL PROTECTED] wrote: This almost works for me - it fails if you have additional models called in the $uses array of the controller. Cake ends up putting the name of the first model in the uses at the front of those form field names. So if I have another model called ListItem which I use to pull generic list items into controllers, when I do Chater[0][paragraph][0][field], it outputs ListItemChapter[0][paragraph][0][field] as the name property for the form element. On May 12, 5:46 am, francky06l [EMAIL PROTECTED] wrote: For this type I use a kind of hack in the field names : echo $form-input('Chapter/0][paragraph][0][field]', ... ) That does the trick, but I did not check so many levels in the controller .. ie : be sure to check that $this-data is correct. hth On May 12, 2:26 am, James K [EMAIL PROTECTED] wrote: Having the exact same issue here - looks like Cake simply doesn't support hasMany past one level with the dot notation. On Apr 18, 8:41 am, Max Romantschuk [EMAIL PROTECTED] wrote: I'm working on a form for a three-levelhasManyrelationship. Conceptually: BookhasManyChapterhasManyParagraph. (Model names for illustrative purposes.) I'm using the form helper to render my form. The main parent model (Book) stuff works fine, and I can do the Chapters by supplying Chapter.0.field, Chapter.1.field etc. to the form helper. The fields are populated nicely, and the inputs are named data[Chapter][0] [field], data[Chapter][1][field] etc. However, when I try giving the form helper the next level with Chapter.0.Paragraph.0.field that won't work and Cake falls back to the parent Book model, naming the input data[Book] and breaking the form. I'm sure I could get the data to populate with Paragraph. 0.field, but then I'd have no clue which paragraph goes in which Chapter after the form is submitted. Has anyone gotten Cake to populate a three-levelhasManyrelationship like this? Doing the third level manually is pretty trivial in this case, it's only two fields of data, so maybe I should just do that? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Getting data from a helper?
My site has side columns that are part of the layout, and a central content column that is filled by the current controller/action. Now in a side column I want to show data (e.g. the most recent comments on the site). Typically I fill side columns with helpers, but in this case I need to access data (e.g. from the comments table). What's the best way to do this? A link to an example would be great. I know this is a pretty fundamental question that's probably been discussed before, but I couldn't find a solution through search --~--~-~--~~~---~--~~ 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: Getting data from a helper?
On Mon, May 12, 2008 at 6:14 PM, Filip Camerman [EMAIL PROTECTED] wrote: the site). Typically I fill side columns with helpers, but in this case I need to access data (e.g. from the comments table). What's the best way to do this? A link to an example would be great. Use components - Search for mini controllers by AD7Six Tarique -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ 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: Query Question
I'd just use SELECT state, city FROM skateparks ORDER BY state, city Then loop it end everytime the state changes you print the state, otherwise just the city. On May 12, 12:39 pm, Kyle Decot [EMAIL PROTECTED] wrote: They're not stored in separate tables. They're stored in my skateparks table which has: id | name | address | city | state ...etc --~--~-~--~~~---~--~~ 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: Query Question
// Controller $parks = $this-Skatepark-find('list', array( 'fields' = array( 'Skatepark.id', // Key path 'Skatepark.city', // Value path 'Skatepark.state' // Group path ), 'order' = 'Skatepark.city ASC, Skatepark.state ASC' ); $this-set(compact('parks')); // parks looks like this // array('Florida' = array(23 = 'Orlando', 17 = 'Daytona'), 'Ohio' = [...]) // View echo 'ul'; foreach ($parks as $state = $parksList) { echo 'li' ; echo $state; echo 'ul'; foreach ($parksList as $id = $city) { echo 'li' . $html-link($city, array('controller' = 'skateparks', 'action' = 'view', $id)) . '/li'; } echo '/ul'; echo '/li'; } echo '/ul'; On May 12, 11:46 am, Sam Sherlock [EMAIL PROTECTED] wrote: look at self relating the table by using a field named parent_id if your baking cake will recognise that the relationship is a child/parent id | parent id | name | address | city | state ...etc 2008/5/12 Kyle Decot [EMAIL PROTECTED]: They're not stored in separate tables. They're stored in my skateparks table which has: id | name | address | city | state ...etc --~--~-~--~~~---~--~~ 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: Getting data from a helper?
Thanx Tarique, exactly what I needed. --~--~-~--~~~---~--~~ 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: Cake Installation - sorry to have to ask
I have gone to the apache error logs, and see the following messages every time I run the cakephp index.php page: [error] [client 127.0.0.1] File does not exist: C:/Program Files/xampp/ htdocs/css, referer: http://localhost/ [error] [client 127.0.0.1] File does not exist: C:/Program Files/xampp/ htdocs/img, referer: http://localhost/ I don't know if this message means that mod rewrite is not working, or some other problem. Obviously, these two folders are in the webroot folder. My document root is set to (program files/xampp/htdocs) and not to (program files/xampp/htdocs/webroot) Directory (program files/xampp/htdocs) is set for allowoverwrite all. I will try the debug setting and see if it gives more information. Rubin On May 12, 5:08 am, schneimi [EMAIL PROTECTED] wrote: To get a more specific and detailed error message, you can set Configure::write('debug', 1); in your app/config/core.php On 12 Mai, 12:32, rubin [EMAIL PROTECTED] wrote: I am having trouble getting the demo blog program to run in Cake (and hence any real programs). It must be something simple, but I can not figure it out. I installed xampp. Tested everything. works OK. xampp in directory: program files/xampp. Also installed cake. Everything is put into directory structure as: program files/xampp/htdocs/cake stuff. When I runhttp://localhost, thecakephpindex file seems to run just fine and tells me that tmp file is writeable, caching is OK, mysql database configuration is present and connected. I have run phpinfo() to determine that my document root is: program files/xampp/htdocs I created the three demo files for the blog demo, put one in app/ controllers, one in app/models and the other, index.ctp, in a folder called posts in the directory app/views. When I try to run the blog demo (localhost/posts or any variation thereof that I can think of), I get the error: Object not found, requested URL not found on this server. It does not tell me what URL exactly. I have read and re-read the cake manual and the blog demo for installation, and can not figure out what simple thing I have done wrong or am not doing corrrectly. The only strange thing, is that originally I putcakephpin the subdirectory /program files/xampp/htdocs/xampp, thinking this was the root. Cake is still sitting there, but I do not believe this is the cause of my problem. I would really appreciate if someone can help me asap. Thanks, Rubin PS If someone wants to give me their phone number, I would even call them.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Cake Installation - sorry to have to ask
My debug setting has been at 2 all this time, so setting it to 1, will not help (I don't think). Rubin On May 12, 6:06 am, rubin [EMAIL PROTECTED] wrote: I have gone to the apache error logs, and see the following messages every time I run thecakephpindex.php page: [error] [client 127.0.0.1] File does not exist: C:/Program Files/xampp/ htdocs/css, referer:http://localhost/ [error] [client 127.0.0.1] File does not exist: C:/Program Files/xampp/ htdocs/img, referer:http://localhost/ I don't know if this message means that mod rewrite is not working, or some other problem. Obviously, these two folders are in the webroot folder. My document root is set to (program files/xampp/htdocs) and not to (program files/xampp/htdocs/webroot) Directory (program files/xampp/htdocs) is set for allowoverwrite all. I will try the debug setting and see if it gives more information. Rubin On May 12, 5:08 am, schneimi [EMAIL PROTECTED] wrote: To get a more specific and detailed error message, you can set Configure::write('debug', 1); in your app/config/core.php On 12 Mai, 12:32, rubin [EMAIL PROTECTED] wrote: I am having trouble getting the demo blog program to run in Cake (and hence any real programs). It must be something simple, but I can not figure it out. I installed xampp. Tested everything. works OK. xampp in directory: program files/xampp. Also installed cake. Everything is put into directory structure as: program files/xampp/htdocs/cake stuff. When I runhttp://localhost, thecakephpindex file seems to run just fine and tells me that tmp file is writeable, caching is OK, mysql database configuration is present and connected. I have run phpinfo() to determine that my document root is: program files/xampp/htdocs I created the three demo files for the blog demo, put one in app/ controllers, one in app/models and the other, index.ctp, in a folder called posts in the directory app/views. When I try to run the blog demo (localhost/posts or any variation thereof that I can think of), I get the error: Object not found, requested URL not found on this server. It does not tell me what URL exactly. I have read and re-read the cake manual and the blog demo for installation, and can not figure out what simple thing I have done wrong or am not doing corrrectly. The only strange thing, is that originally I putcakephpin the subdirectory /program files/xampp/htdocs/xampp, thinking this was the root. Cake is still sitting there, but I do not believe this is the cause of my problem. I would really appreciate if someone can help me asap. Thanks, Rubin PS If someone wants to give me their phone number, I would even call them.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Insallation
Oups, I thought appserve was some kind of physlcal server (like those smart NAS boxes with apache and php). WAMP should work like dream with Cake. Phpmyadmin usually does ask for a password... your mysql password. It is probably documented in appserve what it was set to at installation. On May 12, 12:51 pm, Killmon [EMAIL PROTECTED] wrote: On May 12, 3:36 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am not familiar with appserv but you seem to be running a very picky version of PHP 5 that complains about everything in CakePHP 1.1 that is not in accord with the Strict standards of PHP 5. (Cake is still being developed for both PHPp4 and 5) The only wild guess I can provide on the subject is to make absolutely sure you are letting CakePHP override Apache and PHP settings. And also of-course that all the .htaccess-files have actually being copied to the server. On May 12, 1:31 am, Killmon [EMAIL PROTECTED] wrote: I will give them a try Thanks! Allthough, my impression is that WAMP is the same thing as appserv ( a stand alone package of Msql, appache, phpadmin, php) I supose WAMP may be better configured for cake out of the box, So awway I go! Has anyone heard of phpadmin asking for a login frm the start? I am new to php and is why I want to install cakephp (to play with it alittle), however, I am far from new to computing and html. I am general a quick study and if I have access to the the correct info and able to execute with little trouble. But if this is what you are after then why bother? Not with Cake but with this server-setup. The absolutely fastest way to get a full development kit set up is to install WAMP or MAMP (for WIndows of Mac OS). This is a standalone (and standard-configuration) apache/php/ mysql phpmyadmin... kit you run on your computer. Following the installation guide for Cake should work perfectly with these and you don't need to have a home server running. This will also provide you with a working examples of all the configurations. You can check and tweak them and also try to set your server up with similar settings. /Martin --~--~-~--~~~---~--~~ 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: Three-level hasMany in view with form helper
Oh! I thought that was a typo - Chapter.0][paragraph][0][field] etc works On May 12, 8:21 am, francky06l [EMAIL PROTECTED] wrote: Try to set the model to null in your form-create and give the model name in the input names .. (just a hint, not sure that will work..) I did not try 'Chapter.0][paragraph .. ' maybe this will solve the model name problem. On May 12, 2:01 pm, James K [EMAIL PROTECTED] wrote: This almost works for me - it fails if you have additional models called in the $uses array of the controller. Cake ends up putting the name of the first model in the uses at the front of those form field names. So if I have another model called ListItem which I use to pull generic list items into controllers, when I do Chater[0][paragraph][0][field], it outputs ListItemChapter[0][paragraph][0][field] as the name property for the form element. On May 12, 5:46 am, francky06l [EMAIL PROTECTED] wrote: For this type I use a kind of hack in the field names : echo $form-input('Chapter/0][paragraph][0][field]', ... ) That does the trick, but I did not check so many levels in the controller .. ie : be sure to check that $this-data is correct. hth On May 12, 2:26 am, James K [EMAIL PROTECTED] wrote: Having the exact same issue here - looks like Cake simply doesn't support hasMany past one level with the dot notation. On Apr 18, 8:41 am, Max Romantschuk [EMAIL PROTECTED] wrote: I'm working on a form for a three-levelhasManyrelationship. Conceptually: BookhasManyChapterhasManyParagraph. (Model names for illustrative purposes.) I'm using the form helper to render my form. The main parent model (Book) stuff works fine, and I can do the Chapters by supplying Chapter.0.field, Chapter.1.field etc. to the form helper. The fields are populated nicely, and the inputs are named data[Chapter][0] [field], data[Chapter][1][field] etc. However, when I try giving the form helper the next level with Chapter.0.Paragraph.0.field that won't work and Cake falls back to the parent Book model, naming the input data[Book] and breaking the form. I'm sure I could get the data to populate with Paragraph. 0.field, but then I'd have no clue which paragraph goes in which Chapter after the form is submitted. Has anyone gotten Cake to populate a three-levelhasManyrelationship like this? Doing the third level manually is pretty trivial in this case, it's only two fields of data, so maybe I should just do that? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing for plugins: good idea, no implementation
I have a pretty good idea how I would like urls for plugins to be a little more pretty. I have read up on routes but I have not found how to tell the router to do this: default plugin routing for index action on PizzaOrders controller in pizza plugin: www.example.com/pizza/pizzaOrders/index Small change to: www.example.com/pizza/orders/index The advantage is obviously prettier urls and you will not run into class declared since you can keep prefixing all controllers with the plugin name. This is a bit like prefixes in the router but on a controller level. I am not sure router supports this kind of rewriting but it would be soo cool if it did. Has anyone tried, succeded or failed in similar attempts at changing the names of controllers and actions with routes? /Martin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Wordpress CakePHP
Hi, Wondering if anybody has tried or has prior experience in using WP for the CMS functionalities of a website, but coded the additional business logic using CakePHP. Well this is what i am trying to achieve - I am trying to build a system which has 80% similar functionalities of wordpress (like posts, comments on posts, monthly archives etc). But essentially each post would have dynamic form (similar to a poll) associated to it.Registered users of the system can complete and submit the form. What i am wondering is if its possible to develop a backend (in cake) to design the form and then somehow associate the designed form to a wordpress post and publish it to the website. So when the blog post is opened by the user he gets to see the form. I hope this is not a too crazy an idea.. Any suggestions or views will be greatly appreciated. Thanks --~--~-~--~~~---~--~~ 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: Error Undefined property: pdfHelper::$helpers [CORE\cake\libs\view\view.php, line 875]
I have var $helpers = array('Form','Session','Javascript','fpdf'); my error it isn't why the inicializate of the $helpers the problem is the instruction is_array(${$camelBackedHelper}-helpers this property produce the error because say that undefined property if you can say something more.. very thanks try adding var $helpers = arrary(); to the class declaration Sam D then if it works send me an email and tell me to update the damn tutorial you lazy wonk ;) the lazy wonk being me :P On Fri, May 9, 2008 at 8:55 AM, Regi81 [EMAIL PROTECTED] wrote: Hello, I was integrated the fpdf library and it`s producing this error : Undefined property: pdfHelper::$helpers [CORE\cake\libs\view\view.php, line 875] if something can help me... Very thanks -- View this message in context: http://www.nabble.com/Error-Undefined-property%3A--pdfHelper%3A%3A%24helpers--CORE%5Ccake%5Clibs%5Cview%5Cview.php%2C-line-875--tp17149659p17149659.html Sent from the CakePHP mailing list archive at Nabble.com. -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ --~--~-~--~~~---~--~~ 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: Wordpress CakePHP
You should try to integrate them together using this approach: http://www.gigapromoters.com/blog/2007/01/28/joining-powers-of-two-great-systems-joomla-and-cakephp/ On May 12, 4:37 pm, darkblack [EMAIL PROTECTED] wrote: Hi, Wondering if anybody has tried or has prior experience in using WP for the CMS functionalities of a website, but coded the additional business logic using CakePHP. Well this is what i am trying to achieve - I am trying to build a system which has 80% similar functionalities of wordpress (like posts, comments on posts, monthly archives etc). But essentially each post would have dynamic form (similar to a poll) associated to it.Registered users of the system can complete and submit the form. What i am wondering is if its possible to develop a backend (in cake) to design the form and then somehow associate the designed form to a wordpress post and publish it to the website. So when the blog post is opened by the user he gets to see the form. I hope this is not a too crazy an idea.. Any suggestions or views will be greatly appreciated. Thanks --~--~-~--~~~---~--~~ 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: Routing for plugins: good idea, no implementation
On Mon, May 12, 2008 at 9:31 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: default plugin routing for index action on PizzaOrders controller in pizza plugin: www.example.com/pizza/pizzaOrders/index Small change to: www.example.com/pizza/orders/index The pizza example is a little confusing because it uses pizza for the controller name as well, which isn't necessary. To have the URL structure you're looking for, just create a controller named OrdersController. It'll automatically pull from the right place. Alternatively, to help avoid class name conflicts, you can keep your original class name and change it like so: Router::connect('/pizza/orders/*', array('plugin'='pizza', 'controller' = 'pizza_orders')); -Jonathan Snook --~--~-~--~~~---~--~~ 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: Error Undefined property: pdfHelper::$helpers [CORE\cake\libs\view\view.php, line 875]
I meant to add it to the class declaration of the fpdf helper not your controller. This is I think what I did to fix it for myself a month or so ago like class fpdfHelper extends FPDF { var $helpers = array(); var $title... Sam D On Mon, May 12, 2008 at 5:39 AM, [EMAIL PROTECTED] wrote: I have var $helpers = array('Form','Session','Javascript','fpdf'); my error it isn't why the inicializate of the $helpers the problem is the instruction is_array(${$camelBackedHelper}-helpers this property produce the error because say that undefined property if you can say something more.. very thanks try adding var $helpers = arrary(); to the class declaration Sam D then if it works send me an email and tell me to update the damn tutorial you lazy wonk ;) the lazy wonk being me :P On Fri, May 9, 2008 at 8:55 AM, Regi81 [EMAIL PROTECTED] wrote: Hello, I was integrated the fpdf library and it`s producing this error : Undefined property: pdfHelper::$helpers [CORE\cake\libs\view\view.php, line 875] if something can help me... Very thanks -- View this message in context: http://www.nabble.com/Error-Undefined-property%3A--pdfHelper%3A%3A%24helpers--CORE%5Ccake%5Clibs%5Cview%5Cview.php%2C-line-875--tp17149659p17149659.html Sent from the CakePHP mailing list archive at Nabble.com. -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ meant ot add ot --~--~-~--~~~---~--~~ 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: Wordpress CakePHP
Well this is what i am trying to achieve - I am trying to build a system which has 80% similar functionalities of wordpress (like posts, comments on posts, monthly archives etc). But essentially each post would have dynamic form (similar to a poll) associated to it.Registered users of the system can complete and submit the form. Sounds like it would be easier to write a WordPress plug-in honestly. But if you wanted CakePHP, the easiest way would probably be to load the form through AJAX (with the request call going to a CakePHP address on your server). --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. That's waaay to frequent and could easily look like abuse. Even large aggregators like Google Reader and Bloglines don't do that. And since this is a tumble log it's much worse because it's all personalized feeds (instead of a single RSS feed for CNN, you have an RSS feed for each Flickr user). So instead of making a request every 30 seconds, with just 100 users you are making 3 requests a second. That's definitely going to be noticed. I'd start at one or half hour intervals, perhaps with an option to poll more frequently (15 minutes?). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Somebody konw any library for receive html code and generate document pdf?
I intend generate a document pdf when it receive like input html code, but i don't find any library --~--~-~--~~~---~--~~ 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: Error Undefined property: pdfHelper::$helpers [CORE\cake\libs\view\view.php, line 875]
Oh, I'm so sorry, very thanks for your response I meant to add it to the class declaration of the fpdf helper not your controller. This is I think what I did to fix it for myself a month or so ago like class fpdfHelper extends FPDF { var $helpers = array(); var $title... Sam D On Mon, May 12, 2008 at 5:39 AM, [EMAIL PROTECTED] wrote: I have var $helpers = array('Form','Session','Javascript','fpdf'); my error it isn't why the inicializate of the $helpers the problem is the instruction is_array(${$camelBackedHelper}-helpers this property produce the error because say that undefined property if you can say something more.. very thanks try adding var $helpers = arrary(); to the class declaration Sam D then if it works send me an email and tell me to update the damn tutorial you lazy wonk ;) the lazy wonk being me :P On Fri, May 9, 2008 at 8:55 AM, Regi81 [EMAIL PROTECTED] wrote: Hello, I was integrated the fpdf library and it`s producing this error : Undefined property: pdfHelper::$helpers [CORE\cake\libs\view\view.php, line 875] if something can help me... Very thanks -- View this message in context: http://www.nabble.com/Error-Undefined-property%3A--pdfHelper%3A%3A%24helpers--CORE%5Ccake%5Clibs%5Cview%5Cview.php%2C-line-875--tp17149659p17149659.html Sent from the CakePHP mailing list archive at Nabble.com. -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ meant ot add ot --~--~-~--~~~---~--~~ 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: Somebody konw any library for receive html code and generate document pdf?
try html2fpdf Tarique On Mon, May 12, 2008 at 8:01 PM, peper81 [EMAIL PROTECTED] wrote: I intend generate a document pdf when it receive like input html code, but i don't find any library -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ 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: Somebody konw any library for receive html code and generate document pdf?
The wonders of modern-day search engines: http://www.google.com/search?client=safarirls=en-usq=html+to+pdf+phpie=UTF-8oe=UTF-8 On May 12, 11:13 am, Dr. Tarique Sani [EMAIL PROTECTED] wrote: try html2fpdf Tarique On Mon, May 12, 2008 at 8:01 PM, peper81 [EMAIL PROTECTED] wrote: I intend generate a document pdf when it receive like input html code, but i don't find any library -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com = --~--~-~--~~~---~--~~ 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: Somebody konw any library for receive html code and generate document pdf?
http://framework.zend.com/manual/en/zend.pdf.html - Original Message From: Dr. Tarique Sani [EMAIL PROTECTED] To: cake-php@googlegroups.com Sent: Monday, May 12, 2008 11:13:21 AM Subject: Re: Somebody konw any library for receive html code and generate document pdf? try html2fpdf Tarique On Mon, May 12, 2008 at 8:01 PM, peper81 [EMAIL PROTECTED] wrote: I intend generate a document pdf when it receive like input html code, but i don't find any library -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: habtm count() query
My $.02: use finderQuery. That's only a hunch though, and not based on practical experience. On Sun, May 11, 2008 at 3:44 AM, woldhekkie [EMAIL PROTECTED] wrote: Users want to plan routes to ride together on a a motor bike. tables: users (id, name,phone,email) routes (id,date,time,startplace,info,user_id) (user_id is user who planned the route) routes_users (id,route_id,user_id) (extra table for which user goes on which route with habtm) Having HABTM working, i see the following route view: Routes: Date Time Startplace infoOwner Totalusers 10-10-200909:00Amsterdam Nice route round Amsterdam woldhekkie How to get the count() of Totalusers per route. Do i have to do it from the controller (conditions) or from the model (finderquery,conditions) or best to do it in PHP array ? Thanks in advance --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
So, what is the best way to determine if a controller method is being called from a cron job vs a normal user? I don't want normal users to be able to goto the controller method that makes the requests from these webservices. On May 12, 10:17 am, jonknee [EMAIL PROTECTED] wrote: So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. That's waaay to frequent and could easily look like abuse. Even large aggregators like Google Reader and Bloglines don't do that. And since this is a tumble log it's much worse because it's all personalized feeds (instead of a single RSS feed for CNN, you have an RSS feed for each Flickr user). So instead of making a request every 30 seconds, with just 100 users you are making 3 requests a second. That's definitely going to be noticed. I'd start at one or half hour intervals, perhaps with an option to poll more frequently (15 minutes?). --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
On Mon, May 12, 2008 at 11:36 AM, Action [EMAIL PROTECTED] wrote: So, what is the best way to determine if a controller method is being called from a cron job vs a normal user? I don't want normal users to be able to goto the controller method that makes the requests from these webservices. Protect people from accessing it using the Auth component. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Somebody konw any library for receive html code and generate document pdf?
one helpers for cakephp? On May 12, 3:31 pm, peper81 [EMAIL PROTECTED] wrote: I intend generate a document pdf when it receive like input html code, but i don't find any library --~--~-~--~~~---~--~~ 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: Somebody konw any library for receive html code and generate document pdf?
On Mon, May 12, 2008 at 11:42 AM, peper81 [EMAIL PROTECTED] wrote: one helpers for cakephp? I suggest you read this document to provide you with some helpful hints on the best way to use this mailing list: http://www.catb.org/~esr/faqs/smart-questions.html A lot of people on this mailing list have benefited from it. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
Well, wouldn't the remote address have the same IP address as the server? Then again, I can't remember if $_SERVER is defined when running from the command line? if( $_SERVER['SERVER_ADDR'] === $_SERVER['REMOTE_ADDR']) { // the client has the same IP as the server. } Another approach would be to check if the command line arguments are set. When you run PHP from the command line it defines argv and argc to hold the cli arguments. if( isset( $argv ) isset( $argc ) ) { // the command line arguments exist } You could always check the command line for a secret hash code. if( $argv[1] === md5('my secret password') ) { // I'm run from the command line. } - Original Message From: Action [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 11:36:22 AM Subject: Re: This is more of a general application design question than a CakePHP question... So, what is the best way to determine if a controller method is being called from a cron job vs a normal user? I don't want normal users to be able to goto the controller method that makes the requests from these webservices. On May 12, 10:17 am, jonknee [EMAIL PROTECTED] wrote: So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. That's waaay to frequent and could easily look like abuse. Even large aggregators like Google Reader and Bloglines don't do that. And since this is a tumble log it's much worse because it's all personalized feeds (instead of a single RSS feed for CNN, you have an RSS feed for each Flickr user). So instead of making a request every 30 seconds, with just 100 users you are making 3 requests a second. That's definitely going to be noticed. I'd start at one or half hour intervals, perhaps with an option to poll more frequently (15 minutes?). Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: Problem with drake and Drupal Menu's
CSS is interpreted at the client, which doesn't distinguish between Drupal's and Cake's share of the screen. You'll have to override those styles that are affecting whatver it is that Cake is providing. View source to get any IDs or classes you need and it should be fairly straightforward to cancel the Drupal theme styles. An aside: what versions of Drupal and Cake are you using? I recently took a long look at using Drupal 6 Cake for a project but Drake (the latest version) was a non-starter for my requirements. I considered trying to update it myself but ran out of time (decisions, decisions) before I could fully grasp how the heck Drupal functions ;-) On Mon, May 12, 2008 at 7:08 AM, Wassy [EMAIL PROTECTED] wrote: Yes, drupal seems to theme my cakePHP pages just as if they were a node in drupal itself. (CSS only, im not sure about the more advanced theme stuff as i am very new to all of this) --~--~-~--~~~---~--~~ 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: Routing for plugins: good idea, no implementation
Thanks for your input Snook. Class name conflicts is exactly why I wanted to try for something more like prefixing. (I think the naming in the pizza example is pretty sound if only I can hide it when it is time for launch.) Doing a normal route as you suggest works but will quickly become tiresome when the number of controllers and plugins start to grow. But I guess what I am looking for is not something that the router can do (at present at least)? I have not found any documentation or examples of any general rewriting of names, only the admin and prefix routing. I'll go with your suggestion for now and also do a little poking around in the router to see if I can make sense of it. Thanks. /Martin On May 12, 3:59 pm, Jonathan Snook [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 9:31 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: default plugin routing for index action on PizzaOrders controller in pizza plugin: www.example.com/pizza/pizzaOrders/index Small change to: www.example.com/pizza/orders/index The pizza example is a little confusing because it uses pizza for the controller name as well, which isn't necessary. To have the URL structure you're looking for, just create a controller named OrdersController. It'll automatically pull from the right place. Alternatively, to help avoid class name conflicts, you can keep your original class name and change it like so: Router::connect('/pizza/orders/*', array('plugin'='pizza', 'controller' = 'pizza_orders')); -Jonathan Snook --~--~-~--~~~---~--~~ 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: Routing for plugins: good idea, no implementation
I'll go with your suggestion for now and also do a little poking around in the router to see if I can make sense of it. Oh, were you hoping for something automatic such that every plugin request would automatically look for a controller with the plugin name attached? (in obvious hopes to avoid class name clashes.) That's an interesting thought and maybe one that should be presented to the core devs to consider (if it isn't already in the core, which I don't think it is). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Quick question about translation
I tried figuring this out from the source code, but after 15 minutes of poking around in various files I thought someone here may know if off the top of their head. Do the Html and Form helpers do automatic translation for field names? In other words, do I need to do this: echo $form-input('username', array('label'=__('Username',true)); ...or will the label attribute (whether specified like here or generated automatically) be put through __() before rendering? And while we're on the topic, does flash() do that as well? TIA, Derek --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Image Resize Helper
I'm using the image resizer I found at the bakery( http://bakery.cakephp.org/articles/view/image-resize-helper ), but I'm having a problem with it. I want to use the image it generates as a css background image. here is my code: echo div id = 'full_thumb' onClick = 'full_size();' style = 'width: 300px; background-image:url( . $image-resize(/park_photos/ . $p[location], 300, 225, true) . ); height:225px; position:relative;'; ..//etc it returns the image address wrapped in the img tag, when all I need is the address. Anyone know how to do this? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
500 Error
My app is throwing up a server 500 error and I can't figure out why/ where. The page isn't helpful either, only showing this: Missing Method in ContestsController Error: The action 500.shtml is not defined in controller ContestsController Error: Create ContestsController::500.shtml() in file: app/controllers/ contests_controller.php. Is there any way to have it give you more info about the error rather then there is a missing method? --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
check php_sapi_name() output, if its cli then its being invoked by the cron job since you would use php cli to invoke console jobs. place a check at the start of the controller if (php_sapi_name() == cli) { // proceed } Thanks. On Mon, May 12, 2008 at 9:18 PM, Mathew Nik Foscarini [EMAIL PROTECTED] wrote: Well, wouldn't the remote address have the same IP address as the server? Then again, I can't remember if $_SERVER is defined when running from the command line? if( $_SERVER['SERVER_ADDR'] === $_SERVER['REMOTE_ADDR']) { // the client has the same IP as the server. } Another approach would be to check if the command line arguments are set. When you run PHP from the command line it defines argv and argc to hold the cli arguments. if( isset( $argv ) isset( $argc ) ) { // the command line arguments exist } You could always check the command line for a secret hash code. if( $argv[1] === md5('my secret password') ) { // I'm run from the command line. } - Original Message From: Action [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 11:36:22 AM Subject: Re: This is more of a general application design question than a CakePHP question... So, what is the best way to determine if a controller method is being called from a cron job vs a normal user? I don't want normal users to be able to goto the controller method that makes the requests from these webservices. On May 12, 10:17 am, jonknee [EMAIL PROTECTED] wrote: So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. That's waaay to frequent and could easily look like abuse. Even large aggregators like Google Reader and Bloglines don't do that. And since this is a tumble log it's much worse because it's all personalized feeds (instead of a single RSS feed for CNN, you have an RSS feed for each Flickr user). So instead of making a request every 30 seconds, with just 100 users you are making 3 requests a second. That's definitely going to be noticed. I'd start at one or half hour intervals, perhaps with an option to poll more frequently (15 minutes?). -- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- Thanks Regards, Novice (http://ishuonweb.wordpress.com/). --~--~-~--~~~---~--~~ 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: This is more of a general application design question than a CakePHP question...
Nice, that's much better. - Original Message From: Novice Programmer [EMAIL PROTECTED] To: cake-php@googlegroups.com Sent: Monday, May 12, 2008 1:02:43 PM Subject: Re: This is more of a general application design question than a CakePHP question... check php_sapi_name() output, if its cli then its being invoked by the cron job since you would use php cli to invoke console jobs. place a check at the start of the controller if (php_sapi_name() == cli) { // proceed } Thanks. On Mon, May 12, 2008 at 9:18 PM, Mathew Nik Foscarini [EMAIL PROTECTED] wrote: Well, wouldn't the remote address have the same IP address as the server? Then again, I can't remember if $_SERVER is defined when running from the command line? if( $_SERVER['SERVER_ADDR'] === $_SERVER['REMOTE_ADDR']) { // the client has the same IP as the server. } Another approach would be to check if the command line arguments are set. When you run PHP from the command line it defines argv and argc to hold the cli arguments. if( isset( $argv ) isset( $argc ) ) { // the command line arguments exist } You could always check the command line for a secret hash code. if( $argv[1] === md5('my secret password') ) { // I'm run from the command line. } - Original Message From: Action [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 11:36:22 AM Subject: Re: This is more of a general application design question than a CakePHP question... So, what is the best way to determine if a controller method is being called from a cron job vs a normal user? I don't want normal users to be able to goto the controller method that makes the requests from these webservices. On May 12, 10:17 am, jonknee [EMAIL PROTECTED] wrote: So just have a process that checks the remote services every 30-60 seconds or so, it'll be frequently enough and it'll make the whole local data thing so much easier. That's waaay to frequent and could easily look like abuse. Even large aggregators like Google Reader and Bloglines don't do that. And since this is a tumble log it's much worse because it's all personalized feeds (instead of a single RSS feed for CNN, you have an RSS feed for each Flickr user). So instead of making a request every 30 seconds, with just 100 users you are making 3 requests a second. That's definitely going to be noticed. I'd start at one or half hour intervals, perhaps with an option to poll more frequently (15 minutes?). Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. -- Thanks Regards, Novice (http://ishuonweb.wordpress.com/). Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: Quick question about translation
Hello Derek, field names seem to be automatically translated, see line 412 of form.php: http://api.cakephp.org/1.2/form_8php-source.html#l00398 No, flash does not seem to translate the message: http://api.cakephp.org/1.2/libs_2controller_2controller_8php-source.html#l00760 Regards, Christoph On 12 Mai, 18:28, drumdance [EMAIL PROTECTED] wrote: I tried figuring this out from the source code, but after 15 minutes of poking around in various files I thought someone here may know if off the top of their head. Do the Html and Form helpers do automatic translation for field names? In other words, do I need to do this: echo $form-input('username', array('label'=__('Username',true)); ...or will the label attribute (whether specified like here or generated automatically) be put through __() before rendering? And while we're on the topic, does flash() do that as well? TIA, Derek --~--~-~--~~~---~--~~ 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: Custom tags no longer working in 1.2 Beta...has something changed?
Have you tried using custom tags in 1.2 beta? Is it working for you? If so, can you copy/paste you app_helper.php and tags.php files? On May 11, 10:34 pm, Sam Sherlock [EMAIL PROTECTED] wrote: function __construct(){ parent::__construct(); $this-loadConfig(); } try putting that in the helper, i got results doing that with debug($this-tags) in a method of the helper 2008/5/12 Action [EMAIL PROTECTED]: This is what I have: app/app_helper.php : ?php class AppHelper extends Helper { function __construct(){ parent::__construct(); $this-loadConfig(); } } ? app/config/tags.php : ?php $tags = array( 'block' = 'p%s%s/p', 'blockstart' = 'p%s', 'blockend' = '/p' ) ? On May 11, 7:37 pm, Sam Sherlock [EMAIL PROTECTED] wrote: try in your helper function __construct(){ parent::__construct(); $this-loadConfig(); } that displays what I have in the $tags array of config/tags.php and to load $this-loadConfig('mytags'); you'd have a file named core/mytags.php and the array in $tags = Array( ) hth - S 2008/5/11 Action [EMAIL PROTECTED]: That is exactly what I am doing and what I've always done. The problem is that it no longer works. On May 11, 6:33 pm, Sam Sherlock [EMAIL PROTECTED] wrote: In 1.2 to load the custom tags you can create your own AppHelper class in app/app_helper.php. ?php class AppHelper extends Helper { function __construct(){ $this-loadConfig(); parent::__construct(); }} ? https://trac.cakephp.org/ticket/2081 - S 2008/5/11 Marcin Domanski [EMAIL PROTECTED]: It changed - look at $this-tags in helper(s) On Sun, May 11, 2008 at 10:10 PM, Action [EMAIL PROTECTED] wrote: I built an app using 1.2 pre-beta that uses a tags.php in app/config called from app/app_helper.php that sets custom html tags for certain helper-generated markup. In 1.2 Beta, it no longer works. It simply isn't applying my custom tags. Has this changed from pre-beta to beta...or is it simply broken now? -- Marcin Domanski http://kabturek.info --~--~-~--~~~---~--~~ 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: 500 Error
On Mon, May 12, 2008 at 1:01 PM, John R [EMAIL PROTECTED] wrote: My app is throwing up a server 500 error and I can't figure out why/ where. The page isn't helpful either, only showing this: It sounds like an .htaccess issue and it's trying to route to a local 500.shtml file which it can't find. I suspect it's completely unrelated to CakePHP. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cookbook overhaul proposal
I propose that the Cake team use MediaWiki with the FlaggedRevs extension (http://www.mediawiki.org/wiki/Extension:FlaggedRevs) instead of their homegrown wiki, which currently has a closed review process. This extension, which will be integrated into Wikipedia in the coming months, allows for people to edit the draft of a page, and for users with a special privilege of reviewer to tweak and approve and even rate the proposed changes. This would effectively carry over the functionality of the homemade wiki that book.cakephp.org now uses. Some advantages would include: - Outsiders could see not only the default last-reviewed page, but also see the proposed changes. The process would be more open. - People could engage in MediaWik-style discussions that are attached to a page. - Instead of a progressive chapter breakdown of the content, I would hope that the Cake team would allow for larger pages to split into specific topical pages. I also propose using a more comprehensive front page for the wiki, which would have a handy taxonomy of links to those simply using the wiki as a reference guide. This would be much more intuitive than the current menu on the Cookbook. - The efSyntaxHighlight_GeSHiSetup MediaWiki extension could be used to prettify code. - The CakePHP team wouldn't have to bother maintaining/improving their home-made wiki application. MediaWiki is a great wiki project that continues to grow and be improved. Wikipedia uses it, so it's not likely at all that the application development would go inactive. - MediaWiki's template can be customized to the liking of the CakePHP team. I also propose that the Cookbook be put under a Creative Commons license, but I hear that this is already forthcoming. Thoughts? --~--~-~--~~~---~--~~ 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: 500 Error
Agree with Jonathan, seems you have mod-rewrite problem or your app does not handle the requested controller/action (if triggered by a link, check the link) and Apache is try to find a default page for error 500. Does this happen only for 1 controller or you have other controllers correctly working ? On May 12, 7:12 pm, Jonathan Snook [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 1:01 PM, John R [EMAIL PROTECTED] wrote: My app is throwing up a server 500 error and I can't figure out why/ where. The page isn't helpful either, only showing this: It sounds like an .htaccess issue and it's trying to route to a local 500.shtml file which it can't find. I suspect it's completely unrelated to CakePHP. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
HABTM relation without jointable
HI I have a HABTM relation between two model that it's defined by a finderQuery and It hasn't a jointable. But i get always an error from cake 1.2 that the join table misses. In cake 1.13 all works perfectly. How can I do? --~--~-~--~~~---~--~~ 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: hasMany hasOne problem
Thx adam, working perfectly Regards, On May 3, 3:43 am, Adam Royle [EMAIL PROTECTED] wrote: As long as you have var $belongsTo = array('Author'); in your Comment model, just set recursive to a higher value. $this-Post-recursive = 2; $posts = $this-Post-findAll(); Cheers, Adam On May 3, 3:40 am, deeps [EMAIL PROTECTED] wrote: Ok, i m trying cakephp for one of my application, till now no errors are there cakephp is making life easy but now i am stuck in one simple problem I am having these tables in database Post -id (PK) -title -description Comment -id (PK) -comment -post_id (FK) -author_id (FK) Author -id (PK) -name -email -website Now Post will have many comments each comment will have One author Now in post if i write ?php var $name = 'Post'; var $hasMany = array('Comment' = array('className'= 'Comment', 'conditions' = '', 'order'= '', 'limit'= '', 'foreignKey' = 'post_id', 'dependent'= true, 'exclusive'= false, 'finderQuery' = '', 'fields' = '', 'offset' = '', 'counterQuery' = '')); ? i will get Array ( [0] = Array ( [Post] = Array ( [id] = 1 [title] = xyz [description] = xyz ) [Comment] = Array ( [id] = 1 [comment] = xyz [post_id] = 1 [author_id] = 1 ) What i want is instead of having author id in this particular result, i want to show up author name with built in functionality of cakephp or any shortcut method of cake instead of writing any custom query.?? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Advanced web routing for webservices
Hello, i m having an url for my sitemap http://www.xyz.com/xml/sitemaps/sitemap which i want to convert to http://www.xyz.com/sitemap.xml using cakephp routing. What will be the best way for using that? i m using cakephp 1.1.x.x Regards, --~--~-~--~~~---~--~~ 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: Routing for plugins: good idea, no implementation
Just do this in your routes.php Router::($Router-)connect('/pizza/orders/:action/*', array('plugin' = 'pizza', 'controller' = 'PizzaOrders')); In the parathesis is for Cake 1.x, Router:: for Cake 1.2 Regards, -Erik On May 12, 12:05 pm, Jonathan Snook [EMAIL PROTECTED] wrote: I'll go with your suggestion for now and also do a little poking around in the router to see if I can make sense of it. Oh, were you hoping for something automatic such that every plugin request would automatically look for a controller with the plugin name attached? (in obvious hopes to avoid class name clashes.) That's an interesting thought and maybe one that should be presented to the core devs to consider (if it isn't already in the core, which I don't think it is). --~--~-~--~~~---~--~~ 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: Advanced web routing for webservices
For cake 1.1.19.x In your /app/config/routes.php file add the following. $Route-connect('/sitemap.xml', array('controller'='xml','action'='sitemaps','sitemap') ); - Original Message From: deeps [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 1:14:00 PM Subject: Advanced web routing for webservices Hello, i m having an url for my sitemap http://www.xyz.com/xml/sitemaps/sitemap which i want to convert to http://www.xyz.com/sitemap.xml using cakephp routing. What will be the best way for using that? i m using cakephp 1.1.x.x Regards, Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: Cookbook overhaul proposal
I am personally a fan of MediaWiki, I am also a fan of the CakePHP team and the hard work they do, either way I think both methods have attractors and detractors. I personally think that your ideas are valid, I too will be interested in seeing what others have to say. - People could engage in MediaWik-style discussions that are attached to a page. I am not sure this would be desired, CakePHP tries to keep everything to the mailing lists and IRC (at least for now, from what I see) -Erik --~--~-~--~~~---~--~~ 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: Cookbook overhaul proposal
While this subject is open. I would like to be able to download the manual, and read it offline. I find the Cake website feeds out pages from the manual very slowly. - Original Message From: Esoteric [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 1:48:19 PM Subject: Re: Cookbook overhaul proposal I am personally a fan of MediaWiki, I am also a fan of the CakePHP team and the hard work they do, either way I think both methods have attractors and detractors. I personally think that your ideas are valid, I too will be interested in seeing what others have to say. - People could engage in MediaWik-style discussions that are attached to a page. I am not sure this would be desired, CakePHP tries to keep everything to the mailing lists and IRC (at least for now, from what I see) -Erik Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: Cookbook overhaul proposal
Thoughts? Here is one It makes CakePHP team eat their own dogfood ;) Sam D -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ --~--~-~--~~~---~--~~ 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: 500 Error
This just happens at once specific function inside an otherwise fully working application. On May 12, 12:18 pm, francky06l [EMAIL PROTECTED] wrote: Agree with Jonathan, seems you have mod-rewrite problem or your app does not handle the requested controller/action (if triggered by a link, check the link) and Apache is try to find a default page for error 500. Does this happen only for 1 controller or you have other controllers correctly working ? On May 12, 7:12 pm, Jonathan Snook [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 1:01 PM, John R [EMAIL PROTECTED] wrote: My app is throwing up a server 500 error and I can't figure out why/ where. The page isn't helpful either, only showing this: It sounds like an .htaccess issue and it's trying to route to a local 500.shtml file which it can't find. I suspect it's completely unrelated to CakePHP. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Fatal Error when using $form
Controller: ?php class UsersController extends AppController { var $name = 'Users'; function index() { } function login() { } } ? View: h1Please Login/h1 ?=$form-create('User', array('action' = 'login')); ? p Email:br / ?=$form-input('email');? /p p Password:br / ?=$form-password('password');? /p p ?= $form-end('Login');? /p Error: Fatal error: Call to a member function on a non-object in /var/www/ vhosts/365mediaservices.com/subdomains/clients/httpdocs/app/views/ users/login.thtml on line 3 Any help? --~--~-~--~~~---~--~~ 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: Fatal Error when using $form
var $helpers = array('Form'); put that in your controller. - Original Message From: jaredonline [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 1:52:12 PM Subject: Fatal Error when using $form Controller: ?php class UsersController extends AppController { var $name = 'Users'; function index() { } function login() { } } ? View: h1Please Login/h1 ?=$form-create('User', array('action' = 'login')); ? p Email:br / ?=$form-input('email');? /p p Password:br / ?=$form-password('password');? /p p ?= $form-end('Login');? /p Error: Fatal error: Call to a member function on a non-object in /var/www/ vhosts/365mediaservices.com/subdomains/clients/httpdocs/app/views/ users/login.thtml on line 3 Any help? Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: Cookbook overhaul proposal
You can use one of the workarounds presented here on the group for the pdf version but you may expect improvements soon (in speed and in other formats) On May 12, 7:51 pm, Mathew Nik Foscarini [EMAIL PROTECTED] wrote: While this subject is open. I would like to be able to download the manual, and read it offline. I find the Cake website feeds out pages from the manual very slowly. - Original Message From: Esoteric [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 1:48:19 PM Subject: Re: Cookbook overhaul proposal I am personally a fan of MediaWiki, I am also a fan of the CakePHP team and the hard work they do, either way I think both methods have attractors and detractors. I personally think that your ideas are valid, I too will be interested in seeing what others have to say. - People could engage in MediaWik-style discussions that are attached to a page. I am not sure this would be desired, CakePHP tries to keep everything to the mailing lists and IRC (at least for now, from what I see) -Erik Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
cc validation
I'm trying to use the cc validation rule but I'm having troubles. Here is the snippet of the $validate array in my model: var $validate = array( 'cc_number' = array( 'rule' = array('cc', array('visa', 'disc', 'mc', 'jcb'), false, null), 'message' = 'The credit card number you supplied was invalid.' ), ); American Express is 15 digits, and so is jbc and diners. As there is no amex option, I'm using jcb instead. When I put in 15 digits the validation fails. I also tried diners instead of jbc but that didn't work either. I tried just setting it to all too but that didn't work. Any suggestions? --~--~-~--~~~---~--~~ 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: 500 Error
On Mon, May 12, 2008 at 1:57 PM, John R [EMAIL PROTECTED] wrote: This just happens at once specific function inside an otherwise fully working application. Then I'd look to isolate the line that is causing issue. Remove all the code from the function and then add things back in until the error occurs. Once you know the offending line, it'll be easier to troubleshoot. --~--~-~--~~~---~--~~ 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: Quick question about translation
Thanks mucho! I was trying to find exactly this in the source... --~--~-~--~~~---~--~~ 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: XML trouble
Hey David, There's quite a few ways to get th data you're asking. If you're using PHP5 you can use SimpleXML (http://us2.php.net/simplexml) which would be really straight forward. Somewhere along the lines of $xml- Response-Placemark-Point-coordinates or if you feel like using xpath something like /Response/Placement/Point/coordinates could do the trick... My XML is a little rusty and nothing is tested, but I'm sure you can figure it out from here. Take care, Bill On May 4, 2:54 am, David [EMAIL PROTECTED] wrote: Hey folks, I'm fairly new to Cake, so bear with me. My question is about Cake's XML class: Specifically, I'm trying to parse an XML file like this: kml Response name723 Chestnut Street, Philadelphia, PA 19106/name Status code200/code requestgeocode/request /Status Placemark id=p1 address723 Chestnut St, Philadelphia, PA 19106, USA/address AddressDetails Accuracy=8 Country CountryNameCodeUS/CountryNameCode AdministrativeArea AdministrativeAreaNamePA/AdministrativeAreaName Locality LocalityNamePhiladelphia/LocalityName Thoroughfare ThoroughfareName723 Chestnut St/ThoroughfareName /Thoroughfare PostalCode PostalCodeNumber19106/PostalCodeNumber /PostalCode /Locality /AdministrativeArea /Country /AddressDetails Point coordinates-75.153277,39.949768,0/coordinates /Point /Placemark /Response /kml Trick is I only want the coordinates. I'm also somewhat new to working with XML, so I might be missing something completely obvious here. Anywho, I can get the XML to load fine with $feed = new XML($url); I just can't figure out how to parse it and get to that one piece of data. You're help is greatly appreciated. Thanks in advance. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Popup color picker.
Hi, Does anyone have a helper for a view that will show a color popup picker? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
include CSS and Javascript into layout 'on demand'
Is it possible to include CSS and Javascript into a layout based on what the specific view requires? I would like to use one layout for all my views but there are some javascript libraries that are onl required for very few actions. I remember reading that this is possible a while back but I can't seem to find anything about it. Could someone provide some pointers where to look for info about this? thanks in advance, Marc --~--~-~--~~~---~--~~ 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: include CSS and Javascript into layout 'on demand'
I do this by rendering my HTML header with an element, and then passing it parameters from the controller. - Original Message From: MarcS [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Monday, May 12, 2008 3:45:23 PM Subject: include CSS and Javascript into layout 'on demand' Is it possible to include CSS and Javascript into a layout based on what the specific view requires? I would like to use one layout for all my views but there are some javascript libraries that are onl required for very few actions. I remember reading that this is possible a while back but I can't seem to find anything about it. Could someone provide some pointers where to look for info about this? thanks in advance, Marc Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~-~--~~~---~--~~ 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: include CSS and Javascript into layout 'on demand'
Put $scripts_for_layout in your (X)HTML head. Then, from any view you can include JS/CSS by setting the $inline option to false. $javascript-link('awesome_js_file', false); and $html-css('most_awesome_css', null, array(), false); -Joel. On May 12, 3:45 pm, MarcS [EMAIL PROTECTED] wrote: Is it possible to include CSS and Javascript into a layout based on what the specific view requires? I would like to use one layout for all my views but there are some javascript libraries that are onl required for very few actions. I remember reading that this is possible a while back but I can't seem to find anything about it. Could someone provide some pointers where to look for info about this? thanks in advance, Marc --~--~-~--~~~---~--~~ 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: Popup color picker.
Do you have a specific color picker in mind? There are plenty of good color pickers for JQuery and Prototype. Most of the time it's just a few lines of code to implement, so you could pop that into your own helper. http://plugins.jquery.com/search/node/Color+Picker On May 12, 9:16 pm, mustan9 [EMAIL PROTECTED] wrote: Hi, Does anyone have a helper for a view that will show a color popup picker? --~--~-~--~~~---~--~~ 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: Image Resize Helper
I'm using another one I've found at the same time i've found the one you're using. Finally, I've edited it a lot to suit it to my needs. It has a parameter $tag which in FALSE returns only the image url without IMG tag. So, look for MagickConvertHelper. Remember, I said I've modified it cos it did not work as I wanted. Good luck. On Mon, May 12, 2008 at 1:41 PM, Kyle Decot [EMAIL PROTECTED] wrote: I'm using the image resizer I found at the bakery( http://bakery.cakephp.org/articles/view/image-resize-helper ), but I'm having a problem with it. I want to use the image it generates as a css background image. here is my code: echo div id = 'full_thumb' onClick = 'full_size();' style = 'width: 300px; background-image:url( . $image-resize(/park_photos/ . $p[location], 300, 225, true) . ); height:225px; position:relative;'; ..//etc it returns the image address wrapped in the img tag, when all I need is the address. Anyone know how to do this? -- Nicolás Andrade www.nicoandra.com.ar www.treintaguita.com.ar --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Common Dev Question
Creating a Register form I found with the classic dilemma: Uploading a picture. Uploaded file will be named UserId.OriginalExtension. I mean 5565.jpg is photo from user 5565 and is in JPEG format. Not bad. But what happens when Model does not validate, Insert is not done and there is no ID to use as filename? Does cake have something to help in this classic doubt? What's better? MICROTIME + SESSIONID . Extension may be the image's new name, and then keep it included in a HIDDEN field in form, may be a solution. Then File can be renamed to LastInsertedId. How do you solve this kind of common and normal issues? See you! n. --~--~-~--~~~---~--~~ 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: Image Resize Helper
If you use php5 and gd2 i wrote a image helper also.. it has a crop / resize function and saves png with transparent bg.. the one on the bakery didn't http://www.mech7.net/articles/view/2/cakephp-image-helper If you want it to return only the paths then change the html-image functions for example: return $this-Html-image($this-relativeImgPath.$cache_filename, $htmlAttributes); becomes : return $this-relativeImgPath.$cache_filename; On May 12, 6:41 pm, Kyle Decot [EMAIL PROTECTED] wrote: I'm using the image resizer I found at the bakery(http://bakery.cakephp.org/articles/view/image-resize-helper), but I'm having a problem with it. I want to use the image it generates as a css background image. here is my code: echo div id = 'full_thumb' onClick = 'full_size();' style = 'width: 300px; background-image:url( . $image-resize(/park_photos/ . $p[location], 300, 225, true) . ); height:225px; position:relative;'; ..//etc it returns the image address wrapped in the img tag, when all I need is the address. Anyone know how to do this? --~--~-~--~~~---~--~~ 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: include CSS and Javascript into layout 'on demand'
Watch what I did to use different layouts to different specific views: In app_controller.php : function beforeRender(){ if(isset($this-params[Configure::read('Routing.admin')])){ $this-layout = 'default_admin'; // Uses layout for /admin/ pages } if(property_exists($this, 'customLayouts') is_array($this-customLayouts)){ if (sizeof($this-customLayouts) array_key_exists($this-action, $this-customLayouts)){ $this-layout = $this-customLayouts[$this-action]; } if(array_key_exists($this-action, $this-customLayouts) $this-customLayouts[$this-action] == 'empty'){ Configure::write('debug', 0); } } } And in each controller I define desired layouts for specific methods, like this: var $customLayouts = array('admin_ajaxDeleteImage' = 'empty', 'index' = 'empty', 'admin_ajaxGetVideosFromArtist' = 'empty'); It will use layout empty when VideosController::admin_ajaxDeleteImage() is ran. On Mon, May 12, 2008 at 4:45 PM, MarcS [EMAIL PROTECTED] wrote: Is it possible to include CSS and Javascript into a layout based on what the specific view requires? I would like to use one layout for all my views but there are some javascript libraries that are onl required for very few actions. I remember reading that this is possible a while back but I can't seem to find anything about it. Could someone provide some pointers where to look for info about this? thanks in advance, Marc -- Nicolás Andrade www.nicoandra.com.ar www.treintaguita.com.ar --~--~-~--~~~---~--~~ 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: How to create tabs?
Could you clarify what you mean by a Cake-specific problem? Are you saying Cake doesn't help with generating the HTML/CSS, just with accessing the database? If so, is there a framework that does? I looked at the link you suggested and it looked like a lot of work to get some very ugly tabs. I'm looking for a high- level solution to creating a website, I don't want to be hand-coding stuff like tabs. Should I use an HTML editor and then use Cake to stuff the data into the form? Forgive my newbie questions... On May 10, 4:23 pm, daphonz [EMAIL PROTECTED] wrote: This doesn't sound like a Cake-specific problem. Cake will provide you the data you need in your views, and it's inside your views that need to code the data to display as tabs using HTML/CSS. You might try this tutorial:http://www.htmldog.com/articles/tabs/ Most likely you'll have whatever data you have to display as a tab in an array sent to your view. Then you can cycle through that data and echo them out as unordered list elements. For example: ul ?php foreach ($data as $item) { echo 'li'.$item['title'].'/li';} ? /ul -casey On May 9, 8:29 pm, wesleygray [EMAIL PROTECTED] wrote: I can't seem to find any examples of how to create a page of tabs using CakePHP. I would like to read rows from a table and create a tab for each one. The closes thing I could find is this:http://bakery.cakephp.org/articles/view/threaded-lists Anyone have a pointer? --~--~-~--~~~---~--~~ 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: Common Dev Question
I'm doing something similar but images are not uploaded until a user has been enabled, so the ID will already exist, of course. You may not have that luxury. I do have a resumé upload but, instead of using the UID, I'm naming it after the user's name. I'm already creating a slug anyway from the first last names, for other purposes. Like, John Smith will get the slug, john_smith (yes, I check to make sure a slug is unique). In my case, I don't want to ever have several versions of a resumé. If I did, though, I could just append microtime as you suggest. On Mon, May 12, 2008 at 5:35 PM, Nicolás Andrade [EMAIL PROTECTED] wrote: Creating a Register form I found with the classic dilemma: Uploading a picture. Uploaded file will be named UserId.OriginalExtension. I mean 5565.jpg is photo from user 5565 and is in JPEG format. Not bad. But what happens when Model does not validate, Insert is not done and there is no ID to use as filename? Does cake have something to help in this classic doubt? What's better? MICROTIME + SESSIONID . Extension may be the image's new name, and then keep it included in a HIDDEN field in form, may be a solution. Then File can be renamed to LastInsertedId. How do you solve this kind of common and normal issues? See you! n. --~--~-~--~~~---~--~~ 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: include CSS and Javascript into layout 'on demand'
thanks everyone On May 12, 10:56 pm, Nicolás Andrade [EMAIL PROTECTED] wrote: Watch what I did to use different layouts to different specific views: In app_controller.php : function beforeRender(){ if(isset($this-params[Configure::read('Routing.admin')])){ $this-layout = 'default_admin'; // Uses layout for /admin/ pages } if(property_exists($this, 'customLayouts') is_array($this-customLayouts)){ if (sizeof($this-customLayouts) array_key_exists($this-action, $this-customLayouts)){ $this-layout = $this-customLayouts[$this-action]; } if(array_key_exists($this-action, $this-customLayouts) $this-customLayouts[$this-action] == 'empty'){ Configure::write('debug', 0); } } } And in each controller I define desired layouts for specific methods, like this: var $customLayouts = array('admin_ajaxDeleteImage' = 'empty', 'index' = 'empty', 'admin_ajaxGetVideosFromArtist' = 'empty'); It will use layout empty when VideosController::admin_ajaxDeleteImage() is ran. On Mon, May 12, 2008 at 4:45 PM, MarcS [EMAIL PROTECTED] wrote: Is it possible to include CSS and Javascript into a layout based on what the specific view requires? I would like to use one layout for all my views but there are some javascript libraries that are onl required for very few actions. I remember reading that this is possible a while back but I can't seem to find anything about it. Could someone provide some pointers where to look for info about this? thanks in advance, Marc -- Nicolás Andradewww.nicoandra.com.arwww.treintaguita.com.ar --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Security Component
I am in the process of rewriting my site from 1.1 to 1.2 and trying to utilize the built in components whenever possible but I am unsure about the security component. In my first app I built my own functions to do this -- authenticate user, hash passwords, etc. Is that pretty much all the security component gives me? What are the benefits versus using my own functions? Is the security component required to use any other components? I guess my biggest hang up is how I salted and hashed my passwords versus how the security component seems to do it which is just slightly different. If I switch I am going to have to get users to recreate their passwords. --~--~-~--~~~---~--~~ 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: Validation on Update in Cake using VALID_UNIQUE
Thank you very much! That fixed it perfectly. I would never have gotten there by myself. --~--~-~--~~~---~--~~ 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: cook up web sites fast
I am running 3 other applications without a problem and without virtual hosts. Ftom localhost I don't think I should need to use virtual hosts. On May 5, 2:32 am, simonb [EMAIL PROTECTED] wrote: You are most likely running all the sites from the same directory so the htaccess applies to all websites. assuming you are using apache you need to create a seperate entry in your virtualhosts to point to the cakephp webroot. so your default home page for cake at ~/cake/ this is where your htaccess file should sit along with the index.php file from /app/ webroot/ Look at creating virtualhosts first on google and then look at the problem you have above. It's not a cakephp issue it's a server setup problem. On May 5, 8:49 am, Kent [EMAIL PROTECTED] wrote: I know this question has been asked before but the answers have not seemed to help. I am trying to go thru this tutorial and I have created the user model the register view and the users_controller just as chapter one said. From the group I have added the RewriteBase / cake/ to the .htaccess files under ~/cake/ directory. When I run the app from localhost I get yhe register screen and I enter the data and press register. The next screen I see is the object not found 404 error with the url pointing to /localhost/users/register instead of / cake/users/register. I then copied the .htaccess file to the web root. It then worked successfully and inserted the row into the database. However the other applications I am trying ro run such as egroupware and simple invoices then went to cake also and I could not run them. So I removed the .htaccess file from root and went back to the 404 error in cake. I feel I am missing something simple here could someone please point me in the right direction?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
file_get_contents() to get response from Cake app?
Hi, I have a rather peculiar problem: I have a CakePHP app that external apps need to query some data from. Any app can basically send a request to a special controller action with a few encoded parameters in the URL, and the action will return a blank page with only the words true or false on it. Testing it in the browser works each time, I always get so see the expected result: http://mysite.com/mycontroller/myremoteaction/KHBAKFNV3A/KJB909/OU9 - true I need to query this URL from other PHP apps, and am using file_get_contents() to do so. On my local test system this method works, on my server it doesn't. I only get blank responses (HTTP headers come back, even with a Cake cookie, but no page content). Both have identical PHP versions and all. Curl-ing the address on the command line also only gives me a blank page. I have no idea what's going on, any ideas anybody? Do I need to send something using context streams or so that browsers do but PHP/curl don't for Cake to respond to me? Chrs, Dav --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---