Results 1 to 2 of 2

Thread: CakePHP SSL Problems with Ajax

  1. #1
    Join Date
    Aug 2007

    CakePHP SSL Problems with Ajax

    Hi all,

    I recently added some SSL security to my CakePHP application (yes, it is necessary) but I'm having a really bizarre problem.
    I have an autocompleting text-input which grabs data from the following url:
    Using POST data to specify the person's name. This has been working absolutely fine up until this point.
    Now the AJAX request has problems because it is expecting some JSON but instead gets a Cake error page saying:
    PHP Code:
    Missing Controller

    Error: Controller could not be found.

    Error: Create the class Controller below in file: app/controllers/controller.php

    class Controller extends AppController {

    $name '';
    The weird thing is, however, that if I access the page normally I get a normal JSON response (empty because I haven't POSTed any data but JSON nevertheless).

    Does anyone have any ideas?

    On a small aside: for some reason the AJAX request is being sent to an SSL page even though I'm browsing a normal HTTP:// page rather than HTTPS://. The URL is set relatively as I've shown above. That doesn't matter really, it's just odd.

  2. #2
    Join Date
    Aug 2007
    I seem to have fixed the problem. I had to turn off the Security component's "validatePost" functionality because its knowledge of the POST data was severely limited so it kept incorrectly invalidating it.
    Terribly frustrating.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center