1.3 Session issue
Hi, i'm having trouble getting sessions to work in 1.3. I've understodd that I need to load the component and helper manually in the AppController. However I get this error-message when trying to load the component with var $component = array('Session'); Fatal error: Cannot redeclare AppController::$components in app_controller.php any ideas? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: 1.3 Session issue
Have you got the code doubled?? within the app controller? - S On 29 April 2010 20:16, Jørn superdup...@gmail.com wrote: Hi, i'm having trouble getting sessions to work in 1.3. I've understodd that I need to load the component and helper manually in the AppController. However I get this error-message when trying to load the component with var $component = array('Session'); Fatal error: Cannot redeclare AppController::$components in app_controller.php any ideas? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: 1.3 Session issue
Its public $components, not public $component. On Apr 29, 2:10 pm, Sam Sherlock sam.sherl...@gmail.com wrote: Have you got the code doubled?? within the app controller? - S On 29 April 2010 20:16, Jørn superdup...@gmail.com wrote: Hi, i'm having trouble getting sessions to work in 1.3. I've understodd that I need to load the component and helper manually in the AppController. However I get this error-message when trying to load the component with var $component = array('Session'); Fatal error: Cannot redeclare AppController::$components in app_controller.php any ideas? Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Help a noob with a session(?) issue
For anyone who comes across this later, the errors went away when I switched the cache engine in core.php to memcached :) On 16 Mar, 09:07, jorgt...@gmail.com jorgt...@gmail.com wrote: The tmp directories aren't affected, I only upload the controllers/ views/layouts that I've modified. The tmp dirs are still chmoded 777. On 15 Mar, 14:25, Julian 86 julianbohnenk...@googlemail.com wrote: How are you working on the server?? Did you push the new code with a ftp programm? Then you override the permissions of the tmp directory... On 15 Mrz., 14:19, jorgt...@gmail.com jorgt...@gmail.com wrote: I keep getting these error messages, they don't show up every time I view a page, but every 20th pageview or so. My tmp and session directory are set chmod 777. I've tried switching the session engine from php to cake's own, but that didn't make a difference. Has anyone come across this before, or has an idea of what I can try to fix it? Here's the error: Warning (2): fopen(/tmp/sess_4bbc6925e4dc2234b2253a5a6d370c27) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] $mode = rb $force = false fopen - [internal], line ?? File::open() - CORE/cake/libs/file.php, line 156 File::read() - CORE/cake/libs/file.php, line 175 FileEngine::clear() - CORE/cake/libs/cache/file.php, line 225 FileEngine::gc() - CORE/cake/libs/cache/file.php, line 109 Cache::engine() - CORE/cake/libs/cache.php, line 160 Cache::config() - CORE/cake/libs/cache.php, line 126 include - APP/config/core.php, line 238 Configure::__loadBootstrap() - CORE/cake/libs/configure.php, line 648 Configure::getInstance() - CORE/cake/libs/configure.php, line 137 include - CORE/cake/bootstrap.php, line 43 [main] - APP/webroot/index.php, line 77 Warning (2): fopen(/tmp/sess_60bc2ba565993335f0ad0be8d63af1eb) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_ac46f56f90566da28651803e9d8f8997) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_da8afc546b848ea90fd55b7f117c0ab6) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_fc0fe5113eb55f71fc9b1eb20de04999) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] ..and so on, this list continues endlessly (until I press stop in the browser) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Help a noob with a session(?) issue
The tmp directories aren't affected, I only upload the controllers/ views/layouts that I've modified. The tmp dirs are still chmoded 777. On 15 Mar, 14:25, Julian 86 julianbohnenk...@googlemail.com wrote: How are you working on the server?? Did you push the new code with a ftp programm? Then you override the permissions of the tmp directory... On 15 Mrz., 14:19, jorgt...@gmail.com jorgt...@gmail.com wrote: I keep getting these error messages, they don't show up every time I view a page, but every 20th pageview or so. My tmp and session directory are set chmod 777. I've tried switching the session engine from php to cake's own, but that didn't make a difference. Has anyone come across this before, or has an idea of what I can try to fix it? Here's the error: Warning (2): fopen(/tmp/sess_4bbc6925e4dc2234b2253a5a6d370c27) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] $mode = rb $force = false fopen - [internal], line ?? File::open() - CORE/cake/libs/file.php, line 156 File::read() - CORE/cake/libs/file.php, line 175 FileEngine::clear() - CORE/cake/libs/cache/file.php, line 225 FileEngine::gc() - CORE/cake/libs/cache/file.php, line 109 Cache::engine() - CORE/cake/libs/cache.php, line 160 Cache::config() - CORE/cake/libs/cache.php, line 126 include - APP/config/core.php, line 238 Configure::__loadBootstrap() - CORE/cake/libs/configure.php, line 648 Configure::getInstance() - CORE/cake/libs/configure.php, line 137 include - CORE/cake/bootstrap.php, line 43 [main] - APP/webroot/index.php, line 77 Warning (2): fopen(/tmp/sess_60bc2ba565993335f0ad0be8d63af1eb) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_ac46f56f90566da28651803e9d8f8997) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_da8afc546b848ea90fd55b7f117c0ab6) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_fc0fe5113eb55f71fc9b1eb20de04999) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] ..and so on, this list continues endlessly (until I press stop in the browser) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Help a noob with a session(?) issue
I keep getting these error messages, they don't show up every time I view a page, but every 20th pageview or so. My tmp and session directory are set chmod 777. I've tried switching the session engine from php to cake's own, but that didn't make a difference. Has anyone come across this before, or has an idea of what I can try to fix it? Here's the error: Warning (2): fopen(/tmp/sess_4bbc6925e4dc2234b2253a5a6d370c27) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] $mode = rb $force = false fopen - [internal], line ?? File::open() - CORE/cake/libs/file.php, line 156 File::read() - CORE/cake/libs/file.php, line 175 FileEngine::clear() - CORE/cake/libs/cache/file.php, line 225 FileEngine::gc() - CORE/cake/libs/cache/file.php, line 109 Cache::engine() - CORE/cake/libs/cache.php, line 160 Cache::config() - CORE/cake/libs/cache.php, line 126 include - APP/config/core.php, line 238 Configure::__loadBootstrap() - CORE/cake/libs/configure.php, line 648 Configure::getInstance() - CORE/cake/libs/configure.php, line 137 include - CORE/cake/bootstrap.php, line 43 [main] - APP/webroot/index.php, line 77 Warning (2): fopen(/tmp/sess_60bc2ba565993335f0ad0be8d63af1eb) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_ac46f56f90566da28651803e9d8f8997) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_da8afc546b848ea90fd55b7f117c0ab6) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_fc0fe5113eb55f71fc9b1eb20de04999) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] ..and so on, this list continues endlessly (until I press stop in the browser) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Help a noob with a session(?) issue
How are you working on the server?? Did you push the new code with a ftp programm? Then you override the permissions of the tmp directory... On 15 Mrz., 14:19, jorgt...@gmail.com jorgt...@gmail.com wrote: I keep getting these error messages, they don't show up every time I view a page, but every 20th pageview or so. My tmp and session directory are set chmod 777. I've tried switching the session engine from php to cake's own, but that didn't make a difference. Has anyone come across this before, or has an idea of what I can try to fix it? Here's the error: Warning (2): fopen(/tmp/sess_4bbc6925e4dc2234b2253a5a6d370c27) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] $mode = rb $force = false fopen - [internal], line ?? File::open() - CORE/cake/libs/file.php, line 156 File::read() - CORE/cake/libs/file.php, line 175 FileEngine::clear() - CORE/cake/libs/cache/file.php, line 225 FileEngine::gc() - CORE/cake/libs/cache/file.php, line 109 Cache::engine() - CORE/cake/libs/cache.php, line 160 Cache::config() - CORE/cake/libs/cache.php, line 126 include - APP/config/core.php, line 238 Configure::__loadBootstrap() - CORE/cake/libs/configure.php, line 648 Configure::getInstance() - CORE/cake/libs/configure.php, line 137 include - CORE/cake/bootstrap.php, line 43 [main] - APP/webroot/index.php, line 77 Warning (2): fopen(/tmp/sess_60bc2ba565993335f0ad0be8d63af1eb) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_ac46f56f90566da28651803e9d8f8997) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_da8afc546b848ea90fd55b7f117c0ab6) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] Warning (2): fopen(/tmp/sess_fc0fe5113eb55f71fc9b1eb20de04999) [function.fopen]: failed to open stream: Permission denied [CORE/cake/ libs/file.php, line 156] ..and so on, this list continues endlessly (until I press stop in the browser) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
DB Session Issue 1.2.3.8166
Hi, I can't seem to get DB session to work in 1.2.3.8166. I have used DB sessions many times before in the eariler versions. This is what i've done: 1. download version 1.2.3.8166 2. set db and salt and cake sessions to point to cake_sessions table 3. verified table exists 4. open site and make sure its all green 5. created simple controller to test sessions CODE: - ?php class TestsController extends AppController { var $uses = array(); var $components = array('Session'); function index() { Configure::write('debug',2); $this-autoRender = false; $this-Session-write('mykey','100'); pr($this-Session-read()); } } ? 6. access tests page in browser and the session data is outputted to screen, BUT no data has been saved to the DB table. 7. i have tried to set session security level to low WHAT HAVE I MISSED?? its doing my head in!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: DB Session Issue 1.2.3.8166
bump...can anyone help me? even if you have db sessions working in 1.2.3.8166 can you just let me know? thanks trav. On May 24, 5:47 pm, trav johnstont...@gmail.com wrote: Hi, I can't seem to get DB session to work in 1.2.3.8166. I have used DB sessions many times before in the eariler versions. This is what i've done: 1. download version 1.2.3.8166 2. set db and salt and cake sessions to point to cake_sessions table 3. verified table exists 4. open site and make sure its all green 5. created simple controller to test sessions CODE: - ?php class TestsController extends AppController { var $uses = array(); var $components = array('Session'); function index() { Configure::write('debug',2); $this-autoRender = false; $this-Session-write('mykey','100'); pr($this-Session-read()); } } ? 6. access tests page in browser and the session data is outputted to screen, BUT no data has been saved to the DB table. 7. i have tried to set session security level to low WHAT HAVE I MISSED?? its doing my head in!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: DB Session Issue 1.2.3.8166
FYI: i can't explain it but the issue was to have NO new lines after the close php tag ? On May 25, 7:39 am, trav johnstont...@gmail.com wrote: bump...can anyone help me? even if you have db sessions working in 1.2.3.8166 can you just let me know? thanks trav. On May 24, 5:47 pm, trav johnstont...@gmail.com wrote: Hi, I can't seem to get DB session to work in 1.2.3.8166. I have used DB sessions many times before in the eariler versions. This is what i've done: 1. download version 1.2.3.8166 2. set db and salt and cake sessions to point to cake_sessions table 3. verified table exists 4. open site and make sure its all green 5. created simple controller to test sessions CODE: - ?php class TestsController extends AppController { var $uses = array(); var $components = array('Session'); function index() { Configure::write('debug',2); $this-autoRender = false; $this-Session-write('mykey','100'); pr($this-Session-read()); } } ? 6. access tests page in browser and the session data is outputted to screen, BUT no data has been saved to the DB table. 7. i have tried to set session security level to low WHAT HAVE I MISSED?? its doing my head in!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Session issue.
If you're using 1.1.x Look in your app_dir . /config/core.php: /** * Set level of Cake security. * */ define('CAKE_SECURITY', 'high'); /** * Set Cake Session time out. * If CAKE_SECURITY define is set * high: multiplied by 10 * medium: is multiplied by 100 * low is: multiplied by 300 * * Number below is seconds. */ define('CAKE_SESSION_TIMEOUT', '120'); The default timeout is 20 mins. You can try increasing the timeout value. I use dAuth v0.3, and I do believe it uses the cake session settings. On May 16, 5:12 pm, Tazz [EMAIL PROTECTED] wrote: Not sure this is a Cake issue. I'm using dAuth component to protect my admin pages and the users of my application have complained that they randomly get kicked out within seconds of loging in. I have experienced this issue as well. Login click on a link or tow and then bam login page. I also experienced this with another php application I installed. Do you guys know what it could be? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Session issue.
Not sure this is a Cake issue. I'm using dAuth component to protect my admin pages and the users of my application have complained that they randomly get kicked out within seconds of loging in. I have experienced this issue as well. Login click on a link or tow and then bam login page. I also experienced this with another php application I installed. Do you guys know what it could be? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Session issue
[EMAIL PROTECTED] wrote: Ok, that sounds good to me but since I'm using the default CakePHP template (for now) how can I specify a favicon path? Create /view/layouts/default.thtml (or copy the one from inside the Cake folder) and change this line in your layout to be an absolute path: link rel=shortcut icon href=favicon.ico type=image/x-icon / Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
THANKS! Problem solved! ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok then you should place a favicon.ico in C:\xampp\htdocs\The problem is FireFox calls this on the first request to the server, at least it used to.Check you Apache logs and you will see if this is the case. So do like I suggested many post above. Add the file. You will see that most, if not all the time when I suggest something on this list I am correct. If this does not correct your problem, then we can debug more. But until you do what I suggest, I think it will be wasted time... -- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok so, I put favicon.ico into the C:\xampp\htdocs but the error still persist...no ID in session. So I had a sneak look into Apache logs and here it's the extract: 127.0.0.1 - - [10/May/2006:14:32:26 +0200] GET /process_strategy/customers/favicon.ico HTTP/1.1 200 2677 127.0.0.1 - - [10/May/2006:14:32:27 +0200] GET /process_strategy/assessments/index/1 HTTP/1.1 200 2142 127.0.0.1 - - [10/May/2006:14:32:27 +0200] GET /process_strategy/assessments/index/favicon.ico HTTP/1.1 200 1858 127.0.0.1 - - [10/May/2006:14:32:30 +0200] GET /process_strategy/projects/index/1 HTTP/1.1 200 2454 127.0.0.1 - - [10/May/2006:14:32:30 +0200] GET /process_strategy/projects/index/favicon.ico HTTP/1.1 200 1888 There's no way to avoid this favicon? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok, that sounds good to me but since I'm using the default CakePHP template (for now) how can I specify a favicon path? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Try this (for testing purposes): function index($id='1') { //$_SESSION['Customers.id'] = $id; $this-set('data',$this-Assessment-findAllByCustomerId($id)); } Obviously, you'd replace the '1' in the function def with an id you know is valid. See if everything else works without the session. This way, you'll know if the problem is a weird session issue, or if there is something else going on. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Hi Alberto, And nothing...I get always that favicon.ico. What exactly does this mean? Are you saying that h1?php echo $customers_id; ?/h1 ... rest of file ... in your view file outputs h1favicon.ico/h1 ... rest of file ... ? AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
The problem is that when I need to read the Customers.id value I geta strange text: favicon.ico. How can I avoid that?Thanks to all for the help!Try adding the favicon.ico to your DOCUMENT ROOT. There is one in the app/webroot/ copy it to your DOCUMENT ROOT If you have DOCUMENT ROOT set to app/webroot this should not be an issue. -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @accesspublic */ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok so, the favicon.ico location is not the problem because I never changed roots. I'm using Windows XP Home, Mozilla Firefox latest version and CakePHP cake_1.0.1.2708. Here's the code: 1) this is the controller of customers, the first page I access ?php class CustomersController extends AppController { var $name = 'Customers'; function index() { $this-Session-renew(); $this-set('data',$this-Customer-findAll()); } function add() { if (empty($this-params['data'])) { $this-render(); } else { if ($this-Customer-save($this-params['data'])) { $this-flash('Customer added.','/customers'); } } } function destroy($id) { if ($this-Customer-del($id, $cascade=true)) { $this-flash('Customer has been destroyed.', '/customers'); } } } ? 2) this is the code of assessments controller, I access this one after I selected a customer and $id is passed via URL ?php class AssessmentsController extends AppController { var $name = 'Assessments'; function index($id) { $this-Session-write('Customers.id',$id); $this-set('data',$this-Assessment-findAllByCustomerId($id)); } function add() { $this-set('customers',$this-Assessment-Customer-generateList()); if (empty($this-params['data'])) { $this-render(); } else { if ($this-Assessment-save($this-params['data'])) { $this-flash('Assessment added.','/customers'); } } } function destroy($id) { if ($this-Assessment-del($id, $cascade=true)) { $this-flash('Assessment has been destroyed.', '/customers'); } } } ? 3) this is the code from project controller. I access the projects page after I selected an assessment so $id is passed via URL and is the id of an assessment ?php class ProjectsController extends AppController { var $name = 'Projects'; function index($id) { $this-set('data',$this-Project-findAllByAssessmentId($id)); } function add() { $c_id = $this-Session-read('Customers.id'); $this-set('customer',$this-Project-Assessment-Customer-findAllById($c_id)); $this-set('assessment',$this-Project-Assessment-generateList()); if (empty($this-params['data'])) { $this-render(); } else { if ($this-Project-save($this-params['data'])) { $this-flash('Project added.','/customers'); } } } function destroy($id) { if ($this-Project-del($id, $cascade=true)) { $this-flash('Project has been destroyed.', '/customers'); } } } ? 4) Now I should have saved the Customer ID into the session because when I want to add a new project I NEED to know the customer to which it will depend. Here's the view of the INDEX of projects: the print of the value stored in the session is only for debugging purposes: h1Registered Projects/h1 table tr thId/th thProject/th thnbsp;/th /tr ?php foreach ($data as $project): ? tr td?php echo $project['Project']['id']; ?/td td ?php echo $html-link( $project['Project']['name'], /projects/index/{$project['Project']['id']} ); ? /td td?php echo $html-link('Delete',/projects/destroy/{$project['Project']['id']}, null, Are you sure you want to delete?)? /td /tr ?php endforeach; ? /table ?php echo $html-link(Back, /customers/index); ?nbsp;|nbsp;?php echo Customer ID: . $this-controller-Session-read('Customers.id'); ? this problem is driving me mad... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok so, the favicon.ico location is not the problem because I neverchanged roots. Is the favicon.ico in your DOCUMENT ROOT? -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @accesspublic */ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Well it's in the default app/webroot directory. How can I see my document root? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
When your page is rendered view the HTML source in your web browser.Send us that code so we can see where things are getting printed out too.On 5/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well it's in the default app/webroot directory.How can I see my document root? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Here it is man: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleCakePHP : A Rapid Development Framework :: Projects/title link rel=shortcut icon href=favicon.ico type=image/x-icon / meta http-equiv=Content-Type content=text/html; charset=UTF-8 /link rel=stylesheet type=text/css href=/process_strategy/css/cake.default.css /!--[if lt IE 7] link rel=stylesheet type=text/css href=/process_strategy/css/cake.ie.css /![endif]-- /head body div id=wrapper div id=header img src=/process_strategy/img/cake.logo.png alt=CakePHP : Rapid Development Framework border=0 //div div id=content h1Registered Projects/h1 table tr thId/th thProject/th thnbsp;/th /tr tr td1/td td a href=/process_strategy/projects/index/1 Geran BR 8.0/a/td tda href=/process_strategy/projects/destroy/1 onclick=return confirm('Are you sure you want to delete?');Delete/a/td /tr tr td2/td td a href=/process_strategy/projects/index/2 Geran BR 9.0/a/td tda href=/process_strategy/projects/destroy/2 onclick=return confirm('Are you sure you want to delete?');Delete/a/td /tr /table a href=/process_strategy/customers/index Back/anbsp;|nbsp;Customer ID: favicon.ico /div div id=footer pCakePHP :: a href=http://www.cakefoundation.org/pages/copyright/;copy; 2006 Cake Software Foundation, Inc./a /p br / p !--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO-- a href=http://www.cakephp.org/; target=_blank img src=/process_strategy/img/cake.power.png alt=CakePHP : Rapid Development Framework height=15 width=80 //a /p p a href=http://validator.w3.org/check?uri=referer; img src=/process_strategy/img/w3c_xhtml10.png alt=Valid XHTML 1.0 Transitional height=15 width=80 //a a href=http://jigsaw.w3.org/css-validator/check/referer; img src=/process_strategy/img/w3c_css.png alt=Valid CSS! height=15 width=80 //a /p /div /div /body /html!-- 0.2375s -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok. In your view (at the top) do the following and then send us the output when you view your html page. ?php print pre; print_r($_SESSION); print /pre; exit; ? This should give us the contents of your session while your view is rendering. On 5/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Here it is man: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleCakePHP : A Rapid Development Framework :: Projects/title link rel=shortcut icon href=favicon.ico type=image/x-icon / meta http-equiv=Content-Type content=text/html; charset=UTF-8 /link rel=stylesheet type=text/css href=/process_strategy/css/cake.default.css /!--[if lt IE 7] link rel=stylesheet type=text/css href=/process_strategy/css/cake.ie.css /![endif]-- /head body div id=wrapper div id=header img src=/process_strategy/img/cake.logo.png alt=CakePHP : Rapid Development Framework border=0 //div div id=content h1Registered Projects/h1 table tr thId/th thProject/th thnbsp;/th /tr tr td1/td td a href=/process_strategy/projects/index/1 Geran BR 8.0/a/td tda href=/process_strategy/projects/destroy/1 onclick=return confirm('Are you sure you want to delete?');Delete/a/td /tr tr td2/td td a href=/process_strategy/projects/index/2 Geran BR 9.0/a/td tda href=/process_strategy/projects/destroy/2 onclick=return confirm('Are you sure you want to delete?');Delete/a/td /tr /table a href=/process_strategy/customers/index Back/anbsp;|nbsp;Customer ID: favicon.ico /div div id=footer pCakePHP :: a href=http://www.cakefoundation.org/pages/copyright/;copy; 2006 Cake Software Foundation, Inc./a /p br / p !--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO-- a href=http://www.cakephp.org/; target=_blank img src=/process_strategy/img/cake.power.png alt=CakePHP : Rapid Development Framework height=15 width=80 //a /p p a href=http://validator.w3.org/check?uri=referer; img src=/process_strategy/img/w3c_xhtml10.png alt=Valid XHTML 1.0 Transitional height=15 width=80 //a a href=http://jigsaw.w3.org/css-validator/check/referer; img src=/process_strategy/img/w3c_css.png alt=Valid CSS! height=15 width=80 //a /p /div /div /body /html!-- 0.2375s -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok, this is what I got: Array ( [Config] = Array ( [rand] = 2397 [time] = 1147224143 [userAgent] = ed1c6dfd48691613681e0b701c02a7d4 ) [Customers] = Array ( [id] = favicon.ico ) ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok lets try this one last time.You DOCUMENT ROOT in the path where apache looks for the app/webroot.Where did you install cake? Is it in a sub directory of your web accessible path?If this is the case, or you do not have DOCUMENT ROOT set to app/webroot, then you need to copy the favicon.ico to your webservers root pathThis would be www.example.com/ where ever this would be directedAnd correct me if I am wrong this only happens with Fire Fox? -- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic*/On 5/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok, this is what I got:Array([Config] = Array([rand] = 2397[time] = 1147224143[userAgent] = ed1c6dfd48691613681e0b701c02a7d4 )[Customers] = Array([id] = favicon.ico)) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Ok so: first of all the problem occours only with Firefox, not with IE why? And I installed Cake into: C:\xampp\htdocs\process_strategy\ Web accessible path I assume is C:\xampp\htdocs so in browser: http://localhost/process_strategy/ I feel we are near to the solution... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
Try using $this-Session-write('Customers.id', $id); and $this-Session-read('Customers.id'); to write and read from the session. On 5/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I'm new here, from Italy!Well, I'm developing an Intranet system based on the last version of XAMPP and CakePHP 1.0; I encounter the following issue: I access a pagewhere I list some customers, then if you click on one customer you gointo a page where are listed all the assessments coupled to thatcustomer. Quite simple uh? Nice, but I need to store the selected customer id in a session for future usage and so this is my controllerof the page where I access once I selected a customer:class AssessmentsController extends AppController{var $name = 'Assessments'; function index($id){$_SESSION['Customers.id'] = $id;$this-set('data',$this-Assessment-findAllByCustomerId($id)); }function add(){$this-set('customers',$this-Assessment-Customer-generateList());if (empty($this-params['data'])){ $this-render();}else{if ($this-Assessment-save($this-params['data'])){$this-flash('Assessment added.','/customers'); }}}function destroy($id){if ($this-Assessment-del($id, $cascade=true)){$this-flash('Assessment has been destroyed.', '/customers');}}}The problem is that when I need to read the Customers.id value I geta strange text: favicon.ico. How can I avoid that? Thanks to all for the help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session issue
How are you writing the session variable? In the code you pasted you were using $_SESSION['Customers.id'] .. did you try $this-Session-write('Customers.id ', $customer_id); ?On 5/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Well, actually I did that but no way...when I print the value in the view I get always the favicon.ico.The code is:in the controller - to retrieve the value$customer_id = $this-Session-read('Customers.id');$this-set('customers_id',$customer_id); in the view - to print it?php echo $customers_id; ?And nothing...I get always that favicon.ico.Any solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---