Problems after moving to another server and PHP version - Fatal Error Error: include(): Cannot redeclare class debugger

2014-12-02 Thread Anna P
Hello. Recently the application I've created with CakePHP 2.3.0, and which was settled on a server with PHP 5.3.3-7, has been moved to new environment, based on PHP 5.4.34-1 version. On the new environment a fatal error occurs: Error: include(): Cannot redeclare class debugger File: /home/h

Re: get the id's from checkbox list

2014-10-07 Thread Anna P
Oh, and if it did not work as expected, try putting a model name before the "available" in the checkbox. Let's say that you use the "Tutor" model - the code should look like this: echo $this->Form->checkbox('Tutor.available.'.$i, array('value' => $id, 'checked' => 0, 'hiddenField'=>false); or

Re: get the id's from checkbox list

2014-10-07 Thread Anna P
Hello. I think you need to add some index to the checkboxes (so it would be rather an array), because if there are several items in $tutor variable, you keep creating checkboxes with the same name - data[*Model*][available]. So every checkbox has the same name and you keep "overwriting" them if

Problem with tree data - find('threaded') displays all, but getting threaded data from node (or using children() function) does not return all records

2014-10-07 Thread Anna P
Hello. I have a Comment model, which uses the Tree Behavior. Comments are related to Post model, with the use of post_id field in comments table. The problem is, as described in topic - when I use the find('threaded') function like this: $comments=$this->Comment->find('threaded', array( 'condi

Re: cakePHP File Download was not found or not readable

2014-01-24 Thread Anna P
Thanks for suggestion, but I already tried that. The "files" folder has 0777 permissions. I also tried to change files attributes to 0777, but the problem still occurs. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this m

Re: cakePHP File Download was not found or not readable

2014-01-23 Thread Anna P
Had anyone else same problem? I'm using ver 2.4.4 and I have problems with forced downloading files. When I click a "download" link, which in generalization does this: $this->response->file('files'.DS.$f['file']['file_name'].'.'.$f['File']['file_ext'],array('download'=>true,'name'=>$f['File']['fi

Paginator and multilingual routes

2013-10-02 Thread Anna P
Hello. I have a problem with paginator helper. I'm developing an app in 2 language versions. The app conatains among others blog, which is paginated. Now, the url's in routes.php look for exmaple like this: Router::connect('/blog/search/*', array('controller' => 'blog_categories', 'action' =>

Re: What are the cookies set by CakePHP automatically (cookie named "CAKEPHP") for?

2013-03-22 Thread Anna P
ious that the cookie you're looking at is the *session* > cookie. > The hashed value it contains is the session id. > > AD > > On Friday, 22 March 2013 10:01:56 UTC+1, Anna P wrote: >> >> Hello. >> >> I have following question - what are the c

Re: ajax Update in a page with 2 divs

2013-03-22 Thread Anna P
Hello. When I have to update two (or more) different elements, but both of them with different content, I simply only set 'update' in a form on a element where I have to display more complex data (for example from database), and then I update second div using JavaScript (in a view of updated el

What are the cookies set by CakePHP automatically (cookie named "CAKEPHP") for?

2013-03-22 Thread Anna P
Hello. I have following question - what are the cookies, which are set automatically by CakePHP, for? By cookies set automatically I mean the cookie named "CAKEPHP" with some hashed value. I do not use any cookies in my application (but I use sessions) and I wonder why is there always a CAKEPHP

Re: How to change order only for child elements in find('threaded').

2012-11-27 Thread Anna P
> On Mon, Nov 26, 2012 at 5:10 AM, Anna P > > wrote: > > Hello. > > > > I got problem with setting up an order for child elements different than > for > > parent elements. > > I have a blog with comments. Users can switch between comments order - &g

How to change order only for child elements in find('threaded').

2012-11-26 Thread Anna P
Hello. I got problem with setting up an order for child elements different than for parent elements. I have a blog with comments. Users can switch between comments order - comments can either be sorted descending or ascending. The problem is, when the order is set to descending, also the child

How to get posts that match specified several tags

2012-10-22 Thread Anna P
Hello. I'm creating a search engine for a blog and I've got a problem with selecting posts based on a given, several tags. I have following models: - Post (posts) - Tag (tags) - PostsTag (posts_tags) In Post model there is a hasAndBelongsToMany relationship with Tag model defined. Let's say

Re: CakeEmail SMTP syntax error 555 (#5.5.4) while sending e-mail to multiple users (with the use of bcc array)

2012-08-06 Thread Anna P
It turned out that mail server had limit on number of recipients in one e-mail (I tried to send one mail to 200 e-mail addresses, the limit was 100 recipients). -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://

CakeEmail SMTP syntax error 555 (#5.5.4) while sending e-mail to multiple users (with the use of bcc array)

2012-08-02 Thread Anna P
Hello. I have following problem: I use Smpt method to deliver e-mails from website. E-mails which are sent to just one recipient (for example: message with registration confirmation, message with new password, etc.) work just fine. The problem is when it comes to send message to multiple recip

Re: header information in outlook

2012-08-02 Thread Anna P
I didn't manage to solve the problem using the Mail transport. However, I switched e-mail transport to Smtp and now it works fine. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others

Re: header information in outlook

2012-07-30 Thread Anna P
Has somebody solved that issue or know what causes the problem? I use Outlook Express 6 on XP and it displays e-mail messages correctly (they are sent as both - text and html). But with Outlook on Windows 7 e-mail displays header information, and content in both formats. I use CakePHP 2.0.5 and

Re: Problem with CakeEmail - rewrite default config and bcc delivery does not work

2012-06-19 Thread Anna P
I managed to switch to a "newsletter" layout by creating another config in app/Config/Email.php : public $newsletter = array( 'transport' => 'Mail', 'charset' => 'utf-8', 'headerCharset' => 'utf-8', 'layout' => 'default',

Problem with CakeEmail - rewrite default config and bcc delivery does not work

2012-06-18 Thread Anna P
Hello. I have set following default config in app/Config/email.php : public $default = array( 'transport' => 'Mail', 'charset' => 'utf-8', 'headerCharset' => 'utf-8', 'layout' => 'default', 'emailFormat' => 'bo

Web conference scripts suitable for CakePHP ?

2012-02-08 Thread Anna P
Hello. I'm searching for a open source scripts / solutions for on-line web conferences (like BigBlueButton.org). Has anyone integrated such solution into CakePHP website? What scripts or software, which is easy to integrate, would you recommend? I need this for an online webinars. Thank you in

Problem with saveAll translations within one form - CakePHP multilingual website

2012-01-23 Thread Anna P
Hello. I'm making multilingual website and I want administrator to add and edit subpage in all available languages within one form. The add function works fine, the problem is when I want to edit subpage and all translations at one time - one of the fields does not want to update in i18n table.

Data validation in multilingual website (with i18n)

2012-01-23 Thread Anna P
Hello. I'm building an multilingual website in CakePHP 2.0.5 with the use of I18n. My question is: how can I define (in model class) validation rules, so they apply to specified language version (locale)? I have an i18n table, "languages" table (id,code), "subpages" table (id,created) While addi

Re: CakePHP 2.x - Call to undefined method View::fetch()

2012-01-16 Thread Anna P
Thanks very much. I've checked Cookbook again - of course I didn't notice a key information which is: "New in version 2.1." :> On 16 Sty, 17:01, Tilen Majerle wrote: > of course, > > View::fetch() is available since 2.1, but you have 2.0.5 > > use $content_for_layout instead > -- > > > > > > >

CakePHP 2.x - Call to undefined method View::fetch()

2012-01-16 Thread Anna P
Hello. I'm starting to build an app on CakePHP 2.x - I have been using version 1.2 since now. I downloaded the 2.0.5 Stable version, set it up on my localhost, created DB with simple table 'subpages' and Subpage model, created simple layout with couple of html tags and: fetch('content'); ?> A

CakePHP & AJAX auto-refresh div in specified time interval - is it possible?

2011-10-12 Thread Anna P
Hello there. I have a question - is it possible to autorefresh content of specified element (such as div) in given time interval (for example: 10 seconds)? I need AJAX to do this, because refreshing should result in fetching the data from database. I have an CakePHP app, let's call it online stor

Help with query (or subquery?)

2011-08-09 Thread Anna P
Hello. It's maybe not such a CakePHP question, but rather regarding a rather complex (for me) SQL query. I have a table storing e-mail addresses to which has been sent an invite to a website: CREATE TABLE IF NOT EXISTS `recomm_emails` ( `id` mediumint(7) unsigned NOT NULL AUTO_INCREMENT, `us

how to set session variable after render?

2010-06-03 Thread Anna P
Hello. Just like in topic: how can I set session variable after page render? The issue is: on first visit on home page, I want to display several animations (logo sliding down, some not visible boxes appearing after timeout). But I want to display animations only once, on the first visit. I want

Re: CakePHP 1.2.6 - problem with displaying form error messages

2010-04-26 Thread Anna P
Hello. What do you mean by manually? I don't want to save data to database with just checking if data is not empty. I want to validate entered data and display errors before saving to database table. As I wrote, in model I supply which fields I want to validate - I supply rule for field and messa

CakePHP 1.2.6 - problem with displaying form error messages

2010-04-23 Thread Anna P
Hello all. I have a problem with displaying error messages after form validation. Model user.php: var $validate = array( 'fname' => array( 'rule' => array('custom','/^[A-Za-z\ ]{2,30}$/'), 'message' => 'Supply real first name', 'allowEmpty' => false, ), 'lname' =>

CakePHP + JS/AJAX - performing actions on browser window close - is it possible?

2010-03-10 Thread Anna P
Hello! I have a question, is there a way to perform an action, when user tries to close browser window? For example: in an on-line store, when unregistered user places some order and doesn't proceed to payment system (its order is still not paid) and wants to leave website/close browser window. I

How to run CRON job with the setup on a virtual server?

2009-12-15 Thread Anna P
Hello. I would like to set a CRON job for my application. In my server administrative panel I want to define the path for the CRON job. The problem is, that I cannot give path as URL (like /mysite.com/users/ some_cron_function), but I have to specify physical file that is on a server (full path to

Re: Allowed memory size exhausted - on clean cakephp install

2009-08-14 Thread Anna P
OK, thanks for help, it seems that I have NO configuration file on my 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 unsubscr

Allowed memory size exhausted - on clean cakephp install

2009-08-13 Thread Anna P
Hello! I am moving my web application to dedicated server. I uploaded all of my app files and voila - under server IP I got blank page. So I've figured out to install clean cakephp version first and see if it works there. I uploaded Cakephp 1.2.4.82.84 version and it displayed me Cake's welcome pa

Re: How to set 301 redirect in htaccess for domain ".com.pl" to redirect to ".pl"

2009-06-08 Thread Anna P
Thank you for suggestion, but that doesn't seem to work either. Still when I enter .com.pl it doesn't redirect me to .pl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send em

Re: How to set 301 redirect in htaccess for domain ".com.pl" to redirect to ".pl"

2009-06-07 Thread Anna P
I also tried following: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?domain.com.pl(.*) [NC] RewriteRule ^(.*)$ http://www.domain.pl/$1 [R=301,L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] But it doesn't seem to work. When I enter on .com.p

How to set 301 redirect in htaccess for domain ".com.pl" to redirect to ".pl"

2009-06-07 Thread Anna P
Hello. I have two domains with the same content. Let's say that it's - www.domain.pl and www.domain.com.pl I want to redirect .com.pl domain to .pl How to set 301 redirect in htaccess file? I tried like this: RewriteEngine on RewriteRule ^www.domain.com.pl$ /www.domain.pl [R=301,L] Rew

Re: findAllThreaded root hack for version 1.2.x

2009-05-23 Thread Anna P
anyone?:) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroup

findAllThreaded root hack for version 1.2.x

2009-05-19 Thread Anna P
Hello. Can anyone help me with hacking findAllThreaded function for version 1.2.x ? In 1.1.x it looked like it to set the root ID for function: function findAllThreaded($root = null, $conditions = null, $fields = null, $sort = null) { return $this->__doThread(Model::findAll($conditions, $fie

Re: Strange "Reguested URL not found" problem.

2009-05-08 Thread Anna P
Thanks for a hint, I didn't realize it could be that kind of problem. I just changed link from "icons" to "web-icons" and voila :-) It works. Thanks again! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gro

Strange "Reguested URL not found" problem.

2009-05-06 Thread Anna P
Hello. I have searched all over the web about the "The requested URL was not found on this server" and still can't solve the problem. It's rather strange, because with one parameter it works (page is displayed) and with other - it doesn't. You can see it here: http://www.gurufreebies.com/icons W

Simple chat between two persons? Please help

2009-03-25 Thread Anna P
Hello. I'm looking for simple chat code for CakePHP 1.2. The chat must be only between two logged persons (it's not a general chat for everyone, but a kind of private messaging). If anyone could help I would be very appreciated. Anna --~--~-~--~~~---~--~~ You receiv

Ajax form FIELDS validation :-) How to?

2008-11-27 Thread Anna P
Hello! I have a register form with several fields, which I want to validate in "real-time" using ajax. Let's say that form has 4 fields: login_name, pass, confirm_pass, email. Validation rules in model User are: login - from 3 to 20 letters, pass - the same, email - VALID EMAIL. What I want is t

Re: How to update two divs with $ajax->link ??

2008-10-09 Thread Anna P
Hi again! I tried this way: link('Frame product', '/products/frameimage/'. $p['Product']['id'], array('update' => array('p-image','p-link')); ?> so as the second argument I gave link. But the problem is that I want to update two divs with two different things (so I want to call two functions (two

How to update two divs with $ajax->link ??

2008-10-09 Thread Anna P
Hi! I have a problem with updating divs with ajax component. I use $ajax- >link to update one div which holds picture thumbnail and link to its original size and I have to update another div with just link to the picture. How can I update two divs with one $ajax->link ? Cheers! --~--~-~--~

Validating only several fields in model

2008-10-01 Thread Anna P
Hi! I have an issue with data validation. I have model Administrator with fields : firstname,lastname,password In Administrator model I set validation for every field (let's say firstname can't be empty, lastname can't be empty and password can't be empty and can consist only letters). I want to

select options attributes in 1.2

2008-03-10 Thread Anna P
how do I set options attributes in select helper in 1.2? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this gro

findAllThreaded hack with root doesn't work

2008-02-12 Thread Anna P
Hi! I used hack for findAllThreaded function from this group - I replaced cake's function with: function findAllThreaded($root = null, $conditions = null, $fields = null, $sort = null) { return $this->__doThread(Model::findAll($conditions, $fields, $sort), $root); } I need this function

cakephp losing session after redirect

2008-02-06 Thread Anna P
I'm using version 1.1.18. The problem is: in the login action I set session variable for user and then redirect. After redirect cakephp is losing session. I tried with CAKE_SESSION_SAVE - 'php', 'cake' (with sessions folder writable), CAKE_SECURITY - 'high', 'medium','low' Nothing works. I searche

Re: Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-06 Thread Anna P
Thank you both for help! Finally, I decided to use tutorial from devmoz.com . It works, but I have one problem. I use dependent selects in registration form. Fields 'city_id' (first select) and 'district_id' (second select) must be selected by user - both of them are validated in form. The problem

Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-01 Thread Anna P
Hello! I'm wondering if anyone has any simple script or knows good tutorial about two dependent select tags. I use and understand a little of JS, but AJAX is too much for me. I just need this one functionality from AJAX - I have two tables: cities (id,name) and districts(id,city_id,name) I want t

how to redirect domain to a subfolder on my server?

2007-09-26 Thread Anna P
Hi, I've got my first cakephp app (let's say it's under www.first.com) running on server. The file structure on my server is like this: *ROOT -->app -->cake -->vendors - index.php - .htaccess So I've put my app in the root of my server. Now I've got second application and want it to be under secon

PHP session doesn't work outside controller...why?

2007-09-19 Thread Anna P
Hi again. Anyone had this thing? I use PHP sessions and in login() action, when user is authenticated i set: $_SESSION['login']=$this->data['User']['login'] Under this line i use: var_dump($_SESSION) to check if the variable was set. And it is. The problem is, it doesn't exist outside the users co

Re: Blank page after form submitting

2007-09-19 Thread Anna P
That's what I thought. Oh, and I made a mistake, I use $this->render() and the end of the code in controller:-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to

Re: Blank page after form submitting

2007-09-19 Thread Anna P
Thank you for answer:) I solved my problem by putting into controller $this->render();: function register() { $this->render(); //.code...; } Don't know why it didn't render the page correctly.. --~--~-~--~~~---~--~~ You received this message

Blank page after form submitting

2007-09-19 Thread Anna P
Hi, as in the topic - when I submit form (customer registration for example), cake php displays me blank page (without title and any content at all), although the form action, routes, URL - are good. My DEBUG is 3. Anyone please help cause it's driving me crazy:-/ --~--~-~--~~---

Re: is_file returns false - while the file exists

2007-09-05 Thread Anna P
Thank you! if(file_exists(IMAGES_DIR. 'upload' . DS . 'filename')) worked for me. Thank you once again:-)) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake

Re: is_file returns false - while the file exists

2007-09-04 Thread Anna P
OK so how to use it? When I try if(is_file("../img/upload/photo_file1_".$item['Item'] ['id'].".jpg")): (the path, which just gives me the right image) it doesn't work as well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

is_file returns false - while the file exists

2007-09-04 Thread Anna P
Hi. I have problem with web photo gallery for a store. Photos are uploaded by CMS. They are stored in webroot/img/upload and their name is like "photo_file1_{item_id}", "photo_file2_{item_id}", etc. The problem is when I try to display photos and first I want to check if the item of the store has

Re: wrong coding in layout variables from beforeRender function

2007-09-04 Thread Anna P
Yes it is:]. In fact, in the layout I use: at the beggining, so the browser knows what the encoding is. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-ph

Re: wrong coding in layout variables from beforeRender function

2007-09-04 Thread Anna P
Yes, there is UTF-8 in layout, DB stores data in UTF-8, encoding for connection with DB is set to UTF8, in cake there is UTF8 set for DB connections, I use UTF8 editor it's driving me crazy!:[ --~--~-~--~~~---~--~~ You received this message because you are sub

Re: wrong coding in layout variables from beforeRender function

2007-09-04 Thread Anna P
No, I don't use js (as for now). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: wrong coding in layout variables from beforeRender function

2007-09-04 Thread Anna P
Hi, I meant I have the table "subpages" in my DB which has fields: id, title, body. In the layout I retrieve titles of subpages as a link to a subpage like "Home page", "Contact", "About us". In the view the encoding is correct, it shows me polish letters, but in the layout it gives me question ma

wrong coding in layout variables from beforeRender function

2007-09-03 Thread Anna P
Hi! Anyone has an idea how to solve my problem?;-) I insert data to database using FCK editor, the data in DB looks OK. My DB has all the fields in UTF8, in database.php i set encoding => 'UTF8', in app_model.php I have 'set names utf8'. In the views where I display subpages and it's titles everyt

Re: Can any1 help? CAKEPHP= a lot of numbers in url and js window not opening in IE

2007-08-24 Thread Anna P
ok I managed windows in IE but the browser still gives me URL with CAKEPHP numbers. don't want to see that in my adress bar, how to get rid of it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To

Can any1 help? CAKEPHP= a lot of numbers in url and js window not opening in IE

2007-08-24 Thread Anna P
Hi. To make it quicker, I'm giving you an url to my site where the problem exists: http://wolos.pl/galeria/slub/nasza-sesja When I try to open a photo in IE it gives me error... in FF works fine code for each pic looks like: http://www.wolos.pl/zdjecia/','wolos.pl','menubar=no, toolbar=no, locati

How to set title of home page that doesn't have a controller? (../views/pages/home.thtml)

2007-08-06 Thread Anna P
Hi:) I have one question. For each page i set title in that page's controller using $this->pageTitle = '' But how do I set the title of home page (that lays in views/pages/ home.thtml) that shows up when i go to 'http://www.mysite.com' or 'http://www.mysite.com/index.php' ? That home page does

Re: submitTag - how to pass the name of submit button?:)

2007-08-02 Thread Anna P
Although the 'value' element of array is not necessery, because the value is either 'Save pass' or 'Save data' - so whatever comes after 'submitTag(' :o) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" g

Re: submitTag - how to pass the name of submit button?:)

2007-08-02 Thread Anna P
Why yes, it worked:-) Thank you very much!:) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send emai

submitTag - how to pass the name of submit button?:)

2007-08-02 Thread Anna P
Hi everyone:) I'm a begginer and got stuck with this: Let's say I have controller 'customers' and it has an 'account' view, in which user can set a new password or edit it's current name & address data. So in that view I got two forms: editing profile: formTag('/customers/account',null, array('id