I've tried this also. SecureImage requires a session but for some
strange reason the session is not seen. Here's the code:
/**
* Class constructor.<br />
* Because the class uses sessions, this will attempt to start a
session if there is no previous one.<br />
* If you do not start a session before calling the class, the
constructor must be called before any
* output is sent to the browser.
*
* <code>
* $securimage = new Securimage();
* </code>
*
*/
function Securimage()
{
if ( session_id() == '' ) { // no session has been started yet,
which is needed for validation
session_start();
}
}
I've tried commenting out the line: session_start();
But once that line is commented out, the secureimage session doesn't
work correctly.
I suspect it's because the cake session is named CAKEPHP and the
default session is called PHPSESSID.
Regards,
Andy
On Jan 21, 4:49 pm, francky06l <[EMAIL PROTECTED]> wrote:
> remove/comment the session creation in the code outside of cake, that
> should fix your problem.
> hth
>
> On Jan 21, 11:07 pm, GardenWeazeL <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yes there is a session_start() in the external code. The code is a
> > captcha code for form submission. I might also mention
> > that this code is also on a hosted server and the code actually on a
> > subdomain.
>
> > The session_start() in the external code is created outside of the
> > cakephp session. Obviously I only want one session per user.
>
> > Thanks in advance,
> > Andy
>
> > On Jan 21, 1:27 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > Is there any "create_session" in your external code ?
>
> > > On Jan 21, 8:05 pm, GardenWeazeL <[EMAIL PROTECTED]> wrote:
>
> > > > Hello all,
> > > > I'm fairlly new to cakephp and while it seems to be fairly fast it is
> > > > indeed difficult to grasp.
>
> > > > I have a question concerning sessions. I have a cakephp app the has
> > > > external code and is not part of my cakephp app. When a visitor
> > > > browses my web site a session is created by cakephp. I have a feedback
> > > > page this is only located in my webroot directory and I am trying to
> > > > write to the cakephp session.
>
> > > > I can write to a session but, its not the cakephp session and a
> > > > completely new session is created. Any idea why this is happening? I
> > > > have set security to "medium" in my core.php file.
>
> > > > Thanks in advance,
> > > > Andy- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---